OLD | NEW |
1 /* $Id: tif_dirread.c,v 1.191 2015-09-05 20:31:41 bfriesen Exp $ */ | 1 /* $Id: tif_dirread.c,v 1.191 2015-09-05 20:31:41 bfriesen Exp $ */ |
2 | 2 |
3 /* | 3 /* |
4 * Copyright (c) 1988-1997 Sam Leffler | 4 * Copyright (c) 1988-1997 Sam Leffler |
5 * Copyright (c) 1991-1997 Silicon Graphics, Inc. | 5 * Copyright (c) 1991-1997 Silicon Graphics, Inc. |
6 * | 6 * |
7 * Permission to use, copy, modify, distribute, and sell this software and | 7 * Permission to use, copy, modify, distribute, and sell this software and |
8 * its documentation for any purpose is hereby granted without fee, provided | 8 * its documentation for any purpose is hereby granted without fee, provided |
9 * that (i) the above copyright notices and this permission notice appear in | 9 * that (i) the above copyright notices and this permission notice appear in |
10 * all copies of the software and related documentation, and (ii) the names of | 10 * all copies of the software and related documentation, and (ii) the names of |
(...skipping 4425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4436 * nextdiroff variable has been specified, read it too. Function returns a | 4436 * nextdiroff variable has been specified, read it too. Function returns a |
4437 * number of fields in the directory or 0 if failed. | 4437 * number of fields in the directory or 0 if failed. |
4438 */ | 4438 */ |
4439 static uint16 | 4439 static uint16 |
4440 TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, | 4440 TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, |
4441 uint64 *nextdiroff) | 4441 uint64 *nextdiroff) |
4442 { | 4442 { |
4443 static const char module[] = "TIFFFetchDirectory"; | 4443 static const char module[] = "TIFFFetchDirectory"; |
4444 | 4444 |
4445 void* origdir; | 4445 void* origdir; |
4446 » uint16 dircount16; | 4446 » uint16 dircount16 = 0; |
4447 uint32 dirsize; | 4447 uint32 dirsize; |
4448 TIFFDirEntry* dir; | 4448 TIFFDirEntry* dir; |
4449 uint8* ma; | 4449 uint8* ma; |
4450 TIFFDirEntry* mb; | 4450 TIFFDirEntry* mb; |
4451 uint16 n; | 4451 uint16 n; |
4452 | 4452 |
4453 assert(pdir); | 4453 assert(pdir); |
4454 | 4454 |
4455 tif->tif_diroff = diroff; | 4455 tif->tif_diroff = diroff; |
4456 if (nextdiroff) | 4456 if (nextdiroff) |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5607 | 5607 |
5608 | 5608 |
5609 /* vim: set ts=8 sts=8 sw=8 noet: */ | 5609 /* vim: set ts=8 sts=8 sw=8 noet: */ |
5610 /* | 5610 /* |
5611 * Local Variables: | 5611 * Local Variables: |
5612 * mode: c | 5612 * mode: c |
5613 * c-basic-offset: 8 | 5613 * c-basic-offset: 8 |
5614 * fill-column: 78 | 5614 * fill-column: 78 |
5615 * End: | 5615 * End: |
5616 */ | 5616 */ |
OLD | NEW |