2445 |
switch (text[i]) |
switch (text[i]) |
2446 |
{ |
{ |
2447 |
case 0xff: |
case 0xff: |
2448 |
|
/* At least two bytes needs to follow */ |
2449 |
if (i + 3 > length) |
if (i + 3 > length) |
2450 |
{ |
{ |
2451 |
/* short command, skip */ |
warning("Skipping short 0xff command:"); |
2452 |
|
for (j = 0; j < length; j++) |
2453 |
|
fprintf(stderr, "%02x ", text[j]); |
2454 |
|
fprintf(stderr, "\n"); |
2455 |
i = length = 0; |
i = length = 0; |
2456 |
break; |
break; |
2457 |
} |
} |
2464 |
break; |
break; |
2465 |
|
|
2466 |
case 0xfe: |
case 0xfe: |
2467 |
if (i + 3 > length) |
/* At least one byte needs to follow */ |
2468 |
|
if (i + 2 > length) |
2469 |
{ |
{ |
2470 |
/* short command, skip */ |
warning("Skipping short 0xfe command:"); |
2471 |
|
for (j = 0; j < length; j++) |
2472 |
|
fprintf(stderr, "%02x ", text[j]); |
2473 |
|
fprintf(stderr, "\n"); |
2474 |
i = length = 0; |
i = length = 0; |
2475 |
break; |
break; |
2476 |
} |
} |
2477 |
entry = cache_get_text(text[i + 1]); |
entry = cache_get_text(text[i + 1]); |
2478 |
if (entry->data != NULL) |
if (entry->data != NULL) |
2479 |
{ |
{ |
2480 |
if ((((uint8 *) (entry->data))[1] == |
if ((((uint8 *) (entry->data))[1] == 0) |
2481 |
0) && (!(flags & TEXT2_IMPLICIT_X))) |
&& (!(flags & TEXT2_IMPLICIT_X)) && (i + 2 < length)) |
2482 |
{ |
{ |
2483 |
if (flags & TEXT2_VERTICAL) |
if (flags & TEXT2_VERTICAL) |
2484 |
y += text[i + 2]; |
y += text[i + 2]; |
2488 |
for (j = 0; j < entry->size; j++) |
for (j = 0; j < entry->size; j++) |
2489 |
DO_GLYPH(((uint8 *) (entry->data)), j); |
DO_GLYPH(((uint8 *) (entry->data)), j); |
2490 |
} |
} |
2491 |
i += 3; |
if (i + 2 < length) |
2492 |
|
i += 3; |
2493 |
|
else |
2494 |
|
i += 2; |
2495 |
length -= i; |
length -= i; |
2496 |
/* this will move pointer from start to first character after FE command */ |
/* this will move pointer from start to first character after FE command */ |
2497 |
text = &(text[i]); |
text = &(text[i]); |