| 382 | |
| 383 | |
| 384 | ILboolean SkipExtensions(GFXCONTROL *Gfx) |
| 385 | { |
| 386 | ILint Code; |
| 387 | ILint Label; |
| 388 | ILint Size; |
| 389 | |
| 390 | // DW (06-03-2002): Apparently there can be... |
| 391 | //if (GifType == GIF87A) |
| 392 | // return IL_TRUE; // No extensions in the GIF87a format. |
| 393 | |
| 394 | do { |
| 395 | if((Code = igetc()) == IL_EOF) |
| 396 | return IL_FALSE; |
| 397 | |
| 398 | if (Code != 0x21) { |
| 399 | iseek(-1, IL_SEEK_CUR); |
| 400 | return IL_TRUE; |
| 401 | } |
| 402 | |
| 403 | if((Label = igetc()) == IL_EOF) |
| 404 | return IL_FALSE; |
| 405 | |
| 406 | switch (Label) |
| 407 | { |
| 408 | case 0xF9: |
| 409 | Gfx->Size = igetc(); |
| 410 | Gfx->Packed = igetc(); |
| 411 | Gfx->Delay = GetLittleUShort(); |
| 412 | Gfx->Transparent = igetc(); |
| 413 | Gfx->Terminator = igetc(); |
| 414 | if (ieof()) |
| 415 | return IL_FALSE; |
| 416 | Gfx->Used = IL_FALSE; |
| 417 | break; |
| 418 | /*case 0xFE: |
| 419 | break; |
| 420 | |
| 421 | case 0x01: |
| 422 | break;*/ |
| 423 | default: |
| 424 | do { |
| 425 | if((Size = igetc()) == IL_EOF) |
| 426 | return IL_FALSE; |
| 427 | iseek(Size, IL_SEEK_CUR); |
| 428 | } while (!ieof() && Size != 0); |
| 429 | } |
| 430 | |
| 431 | // @TODO: Handle this better. |
| 432 | if (ieof()) { |
| 433 | ilSetError(IL_FILE_READ_ERROR); |
| 434 | return IL_FALSE; |
| 435 | } |
| 436 | } while (1); |
| 437 | |
| 438 | return IL_TRUE; |
| 439 | } |
| 440 | |
| 441 |
no test coverage detected