tools/tiff2pdf.c:5262: error: Memory Leak
  memory dynamically allocated by call to `_TIFFmalloc()` at line 5241, column 34 is not reachable after line 5262, column 13.

tools/tiff2pdf.c:5232:1: start of procedure t2p_write_pdf()
5230. */
5231. 
5232. tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
      ^
5233. 
5234. 	tsize_t written=0;

tools/tiff2pdf.c:5234:2: 
5232. tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
5233. 
5234. 	tsize_t written=0;
       ^
5235. 	ttile_t i2=0;
5236. 	tsize_t streamlen=0;

tools/tiff2pdf.c:5235:2: 
5233. 
5234. 	tsize_t written=0;
5235. 	ttile_t i2=0;
       ^
5236. 	tsize_t streamlen=0;
5237. 	uint16 i=0;

tools/tiff2pdf.c:5236:2: 
5234. 	tsize_t written=0;
5235. 	ttile_t i2=0;
5236. 	tsize_t streamlen=0;
       ^
5237. 	uint16 i=0;
5238. 

tools/tiff2pdf.c:5237:2: 
5235. 	ttile_t i2=0;
5236. 	tsize_t streamlen=0;
5237. 	uint16 i=0;
       ^
5238. 
5239. 	t2p_read_tiff_init(t2p, input);

tools/tiff2pdf.c:5239:2: Skipping t2p_read_tiff_init(): empty list of specs
5237. 	uint16 i=0;
5238. 
5239. 	t2p_read_tiff_init(t2p, input);
       ^
5240. 	if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
5241. 	t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) );

tools/tiff2pdf.c:5240:5: Taking false branch
5238. 
5239. 	t2p_read_tiff_init(t2p, input);
5240. 	if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
          ^
5241. 	t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) );
5242. 	if(t2p->pdf_xrefoffsets==NULL){

tools/tiff2pdf.c:5241:2: 
5239. 	t2p_read_tiff_init(t2p, input);
5240. 	if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
5241. 	t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) );
       ^
5242. 	if(t2p->pdf_xrefoffsets==NULL){
5243. 		TIFFError(

libtiff/tif_unix.c:253:1: start of procedure _TIFFmalloc()
  251. #endif
  252. 
  253. void*
       ^
  254. _TIFFmalloc(tmsize_t s)
  255. {

libtiff/tif_unix.c:256:2: 
  254. _TIFFmalloc(tmsize_t s)
  255. {
  256. 	return (malloc((size_t) s));
        ^
  257. }
  258. 

libtiff/tif_unix.c:257:1: return from a call to _TIFFmalloc
  255. {
  256. 	return (malloc((size_t) s));
  257. }
       ^
  258. 
  259. void

tools/tiff2pdf.c:5242:5: Taking false branch
5240. 	if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
5241. 	t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) );
5242. 	if(t2p->pdf_xrefoffsets==NULL){
          ^
5243. 		TIFFError(
5244. 			TIFF2PDF_MODULE, 

tools/tiff2pdf.c:5249:2: 
5247. 		return(written);
5248. 	}
5249. 	t2p->pdf_xrefcount=0;
       ^
5250. 	t2p->pdf_catalog=1;
5251. 	t2p->pdf_info=2;

tools/tiff2pdf.c:5250:2: 
5248. 	}
5249. 	t2p->pdf_xrefcount=0;
5250. 	t2p->pdf_catalog=1;
       ^
5251. 	t2p->pdf_info=2;
5252. 	t2p->pdf_pages=3;

tools/tiff2pdf.c:5251:2: 
5249. 	t2p->pdf_xrefcount=0;
5250. 	t2p->pdf_catalog=1;
5251. 	t2p->pdf_info=2;
       ^
5252. 	t2p->pdf_pages=3;
5253. 	written += t2p_write_pdf_header(t2p, output);

tools/tiff2pdf.c:5252:2: 
5250. 	t2p->pdf_catalog=1;
5251. 	t2p->pdf_info=2;
5252. 	t2p->pdf_pages=3;
       ^
5253. 	written += t2p_write_pdf_header(t2p, output);
5254. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;

tools/tiff2pdf.c:5253:2: 
5251. 	t2p->pdf_info=2;
5252. 	t2p->pdf_pages=3;
5253. 	written += t2p_write_pdf_header(t2p, output);
       ^
5254. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
5255. 	t2p->pdf_catalog=t2p->pdf_xrefcount;

tools/tiff2pdf.c:3573:1: start of procedure t2p_write_pdf_header()
  3571. */
  3572. 
  3573. tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
        ^
  3574. 
  3575. 	tsize_t written=0;

tools/tiff2pdf.c:3575:2: 
  3573. tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
  3574. 
  3575. 	tsize_t written=0;
         ^
  3576. 	char buffer[16];
  3577. 	int buflen=0;

tools/tiff2pdf.c:3577:2: 
  3575. 	tsize_t written=0;
  3576. 	char buffer[16];
  3577. 	int buflen=0;
         ^
  3578. 	
  3579. 	buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);

tools/tiff2pdf.c:3579:2: 
  3577. 	int buflen=0;
  3578. 	
  3579. 	buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
         ^
  3580. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen);
  3581. 	written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);

tools/tiff2pdf.c:3580:2: 
  3578. 	
  3579. 	buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
  3580. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen);
         ^
  3581. 	written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
  3582. 

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3581:2: 
  3579. 	buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
  3580. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen);
  3581. 	written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
         ^
  3582. 
  3583. 	return(written);

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3583:2: 
  3581. 	written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
  3582. 
  3583. 	return(written);
         ^
  3584. }
  3585. 

tools/tiff2pdf.c:3584:1: return from a call to t2p_write_pdf_header
  3582. 
  3583. 	return(written);
  3584. }
        ^
  3585. 
  3586. /*

tools/tiff2pdf.c:5254:2: 
5252. 	t2p->pdf_pages=3;
5253. 	written += t2p_write_pdf_header(t2p, output);
5254. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
       ^
5255. 	t2p->pdf_catalog=t2p->pdf_xrefcount;
5256. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);

tools/tiff2pdf.c:5255:2: 
5253. 	written += t2p_write_pdf_header(t2p, output);
5254. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
5255. 	t2p->pdf_catalog=t2p->pdf_xrefcount;
       ^
5256. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
5257. 	written += t2p_write_pdf_catalog(t2p, output);

tools/tiff2pdf.c:5256:2: 
5254. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
5255. 	t2p->pdf_catalog=t2p->pdf_xrefcount;
5256. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
       ^
5257. 	written += t2p_write_pdf_catalog(t2p, output);
5258. 	written += t2p_write_pdf_obj_end(output);

tools/tiff2pdf.c:3590:1: start of procedure t2p_write_pdf_obj_start()
  3588. */
  3589. 
  3590. tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
        ^
  3591. 
  3592. 	tsize_t written=0;

tools/tiff2pdf.c:3592:2: 
  3590. tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
  3591. 
  3592. 	tsize_t written=0;
         ^
  3593. 	char buffer[16];
  3594. 	int buflen=0;

tools/tiff2pdf.c:3594:2: 
  3592. 	tsize_t written=0;
  3593. 	char buffer[16];
  3594. 	int buflen=0;
         ^
  3595. 
  3596. 	buflen=sprintf(buffer, "%lu", (unsigned long)number);

tools/tiff2pdf.c:3596:2: 
  3594. 	int buflen=0;
  3595. 
  3596. 	buflen=sprintf(buffer, "%lu", (unsigned long)number);
         ^
  3597. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
  3598. 	written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);

tools/tiff2pdf.c:3597:2: 
  3595. 
  3596. 	buflen=sprintf(buffer, "%lu", (unsigned long)number);
  3597. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
         ^
  3598. 	written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
  3599. 

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3598:2: 
  3596. 	buflen=sprintf(buffer, "%lu", (unsigned long)number);
  3597. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
  3598. 	written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
         ^
  3599. 
  3600. 	return(written);

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3600:2: 
  3598. 	written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
  3599. 
  3600. 	return(written);
         ^
  3601. }
  3602. 

tools/tiff2pdf.c:3601:1: return from a call to t2p_write_pdf_obj_start
  3599. 
  3600. 	return(written);
  3601. }
        ^
  3602. 
  3603. /*

tools/tiff2pdf.c:5257:2: 
5255. 	t2p->pdf_catalog=t2p->pdf_xrefcount;
5256. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
5257. 	written += t2p_write_pdf_catalog(t2p, output);
       ^
5258. 	written += t2p_write_pdf_obj_end(output);
5259. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;

tools/tiff2pdf.c:3877:1: start of procedure t2p_write_pdf_catalog()
  3875. */
  3876. 
  3877. tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output){
        ^
  3878. 
  3879. 	tsize_t written=0;

tools/tiff2pdf.c:3879:2: 
  3877. tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output){
  3878. 
  3879. 	tsize_t written=0;
         ^
  3880. 	char buffer[16];
  3881. 	int buflen=0;

tools/tiff2pdf.c:3881:2: 
  3879. 	tsize_t written=0;
  3880. 	char buffer[16];
  3881. 	int buflen=0;
         ^
  3882. 
  3883. 	written += t2pWriteFile(output, 

tools/tiff2pdf.c:3883:2: 
  3881. 	int buflen=0;
  3882. 
  3883. 	written += t2pWriteFile(output, 
         ^
  3884. 		(tdata_t)"<< \n/Type /Catalog \n/Pages ", 
  3885. 		27);

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3886:2: 
  3884. 		(tdata_t)"<< \n/Type /Catalog \n/Pages ", 
  3885. 		27);
  3886. 	buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
         ^
  3887. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
  3888. 	written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);

tools/tiff2pdf.c:3887:2: 
  3885. 		27);
  3886. 	buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
  3887. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
         ^
  3888. 	written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
  3889. 	if(t2p->pdf_fitwindow){

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3888:2: 
  3886. 	buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
  3887. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
  3888. 	written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
         ^
  3889. 	if(t2p->pdf_fitwindow){
  3890. 		written += t2pWriteFile(output, 

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3889:5: Taking true branch
  3887. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
  3888. 	written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
  3889. 	if(t2p->pdf_fitwindow){
            ^
  3890. 		written += t2pWriteFile(output, 
  3891. 			(tdata_t) "/ViewerPreferences <</FitWindow true>>\n", 

tools/tiff2pdf.c:3890:3: 
  3888. 	written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
  3889. 	if(t2p->pdf_fitwindow){
  3890. 		written += t2pWriteFile(output, 
          ^
  3891. 			(tdata_t) "/ViewerPreferences <</FitWindow true>>\n", 
  3892. 			39);

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3894:2: 
  3892. 			39);
  3893. 	}
  3894. 	written += t2pWriteFile(output, (tdata_t)">>\n", 3);
         ^
  3895. 
  3896. 	return(written);

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3896:2: 
  3894. 	written += t2pWriteFile(output, (tdata_t)">>\n", 3);
  3895. 
  3896. 	return(written);
         ^
  3897. }
  3898. 

tools/tiff2pdf.c:3897:1: return from a call to t2p_write_pdf_catalog
  3895. 
  3896. 	return(written);
  3897. }
        ^
  3898. 
  3899. /*

tools/tiff2pdf.c:5258:2: 
5256. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
5257. 	written += t2p_write_pdf_catalog(t2p, output);
5258. 	written += t2p_write_pdf_obj_end(output);
       ^
5259. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
5260. 	t2p->pdf_info=t2p->pdf_xrefcount;

tools/tiff2pdf.c:3607:1: start of procedure t2p_write_pdf_obj_end()
  3605. */
  3606. 
  3607. tsize_t t2p_write_pdf_obj_end(TIFF* output){
        ^
  3608. 
  3609. 	tsize_t written=0;

tools/tiff2pdf.c:3609:2: 
  3607. tsize_t t2p_write_pdf_obj_end(TIFF* output){
  3608. 
  3609. 	tsize_t written=0;
         ^
  3610. 
  3611. 	written += t2pWriteFile(output, (tdata_t) "endobj\n", 7);

tools/tiff2pdf.c:3611:2: 
  3609. 	tsize_t written=0;
  3610. 
  3611. 	written += t2pWriteFile(output, (tdata_t) "endobj\n", 7);
         ^
  3612. 
  3613. 	return(written);

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3613:2: 
  3611. 	written += t2pWriteFile(output, (tdata_t) "endobj\n", 7);
  3612. 
  3613. 	return(written);
         ^
  3614. }
  3615. 

tools/tiff2pdf.c:3614:1: return from a call to t2p_write_pdf_obj_end
  3612. 
  3613. 	return(written);
  3614. }
        ^
  3615. 
  3616. /*

tools/tiff2pdf.c:5259:2: 
5257. 	written += t2p_write_pdf_catalog(t2p, output);
5258. 	written += t2p_write_pdf_obj_end(output);
5259. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
       ^
5260. 	t2p->pdf_info=t2p->pdf_xrefcount;
5261. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);

tools/tiff2pdf.c:5260:2: 
5258. 	written += t2p_write_pdf_obj_end(output);
5259. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
5260. 	t2p->pdf_info=t2p->pdf_xrefcount;
       ^
5261. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
5262. 	written += t2p_write_pdf_info(t2p, input, output);

tools/tiff2pdf.c:5261:2: 
5259. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
5260. 	t2p->pdf_info=t2p->pdf_xrefcount;
5261. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
       ^
5262. 	written += t2p_write_pdf_info(t2p, input, output);
5263. 	written += t2p_write_pdf_obj_end(output);

tools/tiff2pdf.c:3590:1: start of procedure t2p_write_pdf_obj_start()
  3588. */
  3589. 
  3590. tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
        ^
  3591. 
  3592. 	tsize_t written=0;

tools/tiff2pdf.c:3592:2: 
  3590. tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
  3591. 
  3592. 	tsize_t written=0;
         ^
  3593. 	char buffer[16];
  3594. 	int buflen=0;

tools/tiff2pdf.c:3594:2: 
  3592. 	tsize_t written=0;
  3593. 	char buffer[16];
  3594. 	int buflen=0;
         ^
  3595. 
  3596. 	buflen=sprintf(buffer, "%lu", (unsigned long)number);

tools/tiff2pdf.c:3596:2: 
  3594. 	int buflen=0;
  3595. 
  3596. 	buflen=sprintf(buffer, "%lu", (unsigned long)number);
         ^
  3597. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
  3598. 	written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);

tools/tiff2pdf.c:3597:2: 
  3595. 
  3596. 	buflen=sprintf(buffer, "%lu", (unsigned long)number);
  3597. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
         ^
  3598. 	written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
  3599. 

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3598:2: 
  3596. 	buflen=sprintf(buffer, "%lu", (unsigned long)number);
  3597. 	written += t2pWriteFile(output, (tdata_t) buffer, buflen );
  3598. 	written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
         ^
  3599. 
  3600. 	return(written);

tools/tiff2pdf.c:342:1: start of procedure t2pWriteFile()
    340. }
    341. 
    342. static tmsize_t 
         ^
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {

tools/tiff2pdf.c:345:2: 
    343. t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
          ^
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)

libtiff/tif_open.c:534:1: start of procedure TIFFClientdata()
      532.  * Return open file's clientdata.
      533.  */
      534. thandle_t
           ^
      535. TIFFClientdata(TIFF* tif)
      536. {

libtiff/tif_open.c:537:2: 
      535. TIFFClientdata(TIFF* tif)
      536. {
      537. 	return (tif->tif_clientdata);
            ^
      538. }
      539. 

libtiff/tif_open.c:538:1: return from a call to TIFFClientdata
      536. {
      537. 	return (tif->tif_clientdata);
      538. }
           ^
      539. 
      540. /*

tools/tiff2pdf.c:346:2: 
    344. {
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
          ^
    347. 	if (proc)
    348. 		return proc(client, data, size);

libtiff/tif_open.c:665:1: start of procedure TIFFGetWriteProc()
      663.  * Return pointer to file write method.
      664.  */
      665. TIFFReadWriteProc
           ^
      666. TIFFGetWriteProc(TIFF* tif)
      667. {

libtiff/tif_open.c:668:2: 
      666. TIFFGetWriteProc(TIFF* tif)
      667. {
      668. 	return (tif->tif_writeproc);
            ^
      669. }
      670. 

libtiff/tif_open.c:669:1: return from a call to TIFFGetWriteProc
      667. {
      668. 	return (tif->tif_writeproc);
      669. }
           ^
      670. 
      671. /*

tools/tiff2pdf.c:347:6: Taking false branch
    345. 	thandle_t client = TIFFClientdata(tif);
    346. 	TIFFReadWriteProc proc = TIFFGetWriteProc(tif);
    347. 	if (proc)
              ^
    348. 		return proc(client, data, size);
    349. 	return -1;

tools/tiff2pdf.c:349:2: 
    347. 	if (proc)
    348. 		return proc(client, data, size);
    349. 	return -1;
          ^
    350. }
    351. 

tools/tiff2pdf.c:350:1: return from a call to t2pWriteFile
    348. 		return proc(client, data, size);
    349. 	return -1;
    350. }
         ^
    351. 
    352. static uint64

tools/tiff2pdf.c:3600:2: 
  3598. 	written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
  3599. 
  3600. 	return(written);
         ^
  3601. }
  3602. 

tools/tiff2pdf.c:3601:1: return from a call to t2p_write_pdf_obj_start
  3599. 
  3600. 	return(written);
  3601. }
        ^
  3602. 
  3603. /*

tools/tiff2pdf.c:5262:2: Skipping t2p_write_pdf_info(): empty list of specs
5260. 	t2p->pdf_info=t2p->pdf_xrefcount;
5261. 	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
5262. 	written += t2p_write_pdf_info(t2p, input, output);
       ^
5263. 	written += t2p_write_pdf_obj_end(output);
5264. 	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;

tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
	tsize_t written=0;
	ttile_t i2=0;
	tsize_t streamlen=0;
	uint16 i=0;
	t2p_read_tiff_init(t2p, input);
	if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
	t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) );
	if(t2p->pdf_xrefoffsets==NULL){
		TIFFError(
			TIFF2PDF_MODULE,
			"Can't allocate %u bytes of memory for t2p_write_pdf",
			t2p->pdf_xrefcount * sizeof(uint32) );
		return(written);
	}
	t2p->pdf_xrefcount=0;
	t2p->pdf_catalog=1;
	t2p->pdf_info=2;
	t2p->pdf_pages=3;
	written += t2p_write_pdf_header(t2p, output);
	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
	t2p->pdf_catalog=t2p->pdf_xrefcount;
	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
	written += t2p_write_pdf_catalog(t2p, output);
	written += t2p_write_pdf_obj_end(output);
	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
	t2p->pdf_info=t2p->pdf_xrefcount;
	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
	written += t2p_write_pdf_info(t2p, input, output);
	written += t2p_write_pdf_obj_end(output);
	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
	t2p->pdf_pages=t2p->pdf_xrefcount;
	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
	written += t2p_write_pdf_pages(t2p, output);
	written += t2p_write_pdf_obj_end(output);
	for(t2p->pdf_page=0;t2p->pdf_page<t2p->tiff_pagecount;t2p->pdf_page++){
		t2p_read_tiff_data(t2p, input);
		if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
		t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
		written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
		written += t2p_write_pdf_page(t2p->pdf_xrefcount, t2p, output);
		written += t2p_write_pdf_obj_end(output);
		t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
		written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
		written += t2p_write_pdf_stream_dict_start(output);
		written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);
		written += t2p_write_pdf_stream_dict_end(output);
		written += t2p_write_pdf_stream_start(output);
		streamlen=written;
		written += t2p_write_pdf_page_content_stream(t2p, output);
		streamlen=written-streamlen;
		written += t2p_write_pdf_stream_end(output);
		written += t2p_write_pdf_obj_end(output);
		t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
		written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
		written += t2p_write_pdf_stream_length(streamlen, output);
		written += t2p_write_pdf_obj_end(output);
		if(t2p->tiff_transferfunctioncount != 0){
			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
			written += t2p_write_pdf_transfer(t2p, output);
			written += t2p_write_pdf_obj_end(output);
			for(i=0; i < t2p->tiff_transferfunctioncount; i++){
				t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
				written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
				written += t2p_write_pdf_stream_dict_start(output);
				written += t2p_write_pdf_transfer_dict(t2p, output, i);
				written += t2p_write_pdf_stream_dict_end(output);
				written += t2p_write_pdf_stream_start(output);
				streamlen=written;
				written += t2p_write_pdf_transfer_stream(t2p, output, i);
				streamlen=written-streamlen;
				written += t2p_write_pdf_stream_end(output);
				written += t2p_write_pdf_obj_end(output);
			}
		}
		if( (t2p->pdf_colorspace & T2P_CS_PALETTE) != 0){
			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
			t2p->pdf_palettecs=t2p->pdf_xrefcount;
			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
			written += t2p_write_pdf_stream_dict_start(output);
			written += t2p_write_pdf_stream_dict(t2p->pdf_palettesize, 0, output);
			written += t2p_write_pdf_stream_dict_end(output);
			written += t2p_write_pdf_stream_start(output);
			streamlen=written;
			written += t2p_write_pdf_xobject_palettecs_stream(t2p, output);
			streamlen=written-streamlen;
			written += t2p_write_pdf_stream_end(output);
			written += t2p_write_pdf_obj_end(output);
		}
		if( (t2p->pdf_colorspace & T2P_CS_ICCBASED) != 0){
			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
			t2p->pdf_icccs=t2p->pdf_xrefcount;
			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
			written += t2p_write_pdf_stream_dict_start(output);
			written += t2p_write_pdf_xobject_icccs_dict(t2p, output);
			written += t2p_write_pdf_stream_dict_end(output);
			written += t2p_write_pdf_stream_start(output);
			streamlen=written;
			written += t2p_write_pdf_xobject_icccs_stream(t2p, output);
			streamlen=written-streamlen;
			written += t2p_write_pdf_stream_end(output);
			written += t2p_write_pdf_obj_end(output);
		}
		if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount !=0){
			for(i2=0;i2<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i2++){
				t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
				written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
				written += t2p_write_pdf_stream_dict_start(output);
				written += t2p_write_pdf_xobject_stream_dict(
					i2+1,
					t2p,
					output);
				written += t2p_write_pdf_stream_dict_end(output);
				written += t2p_write_pdf_stream_start(output);
				streamlen=written;
				t2p_read_tiff_size_tile(t2p, input, i2);
				written += t2p_readwrite_pdf_image_tile(t2p, input, output, i2);
				t2p_write_advance_directory(t2p, output);
				if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
				streamlen=written-streamlen;
				written += t2p_write_pdf_stream_end(output);
				written += t2p_write_pdf_obj_end(output);
				t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
				written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
				written += t2p_write_pdf_stream_length(streamlen, output);
				written += t2p_write_pdf_obj_end(output);
			}
		} else {
			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
			written += t2p_write_pdf_stream_dict_start(output);
			written += t2p_write_pdf_xobject_stream_dict(
				0,
				t2p,
				output);
			written += t2p_write_pdf_stream_dict_end(output);
			written += t2p_write_pdf_stream_start(output);
			streamlen=written;
			t2p_read_tiff_size(t2p, input);
			written += t2p_readwrite_pdf_image(t2p, input, output);
			t2p_write_advance_directory(t2p, output);
			if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
			streamlen=written-streamlen;
			written += t2p_write_pdf_stream_end(output);
			written += t2p_write_pdf_obj_end(output);
			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
			written += t2p_write_pdf_stream_length(streamlen, output);
			written += t2p_write_pdf_obj_end(output);
		}
	}
	t2p->pdf_startxref = written;
	written += t2p_write_pdf_xreftable(t2p, output);
	written += t2p_write_pdf_trailer(t2p, output);
	t2p_disable(output);
	return(written);
}
['tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){\n\ttsize_t written=0;\n\tttile_t i2=0;\n\ttsize_t streamlen=0;\n\tuint16 i=0;\n\tt2p_read_tiff_init(t2p, input);\n\tif(t2p->t2p_error!=T2P_ERR_OK){return(0);}\n\tt2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) );\n\tif(t2p->pdf_xrefoffsets==NULL){\n\t\tTIFFError(\n\t\t\tTIFF2PDF_MODULE,\n\t\t\t"Can\'t allocate %u bytes of memory for t2p_write_pdf",\n\t\t\tt2p->pdf_xrefcount * sizeof(uint32) );\n\t\treturn(written);\n\t}\n\tt2p->pdf_xrefcount=0;\n\tt2p->pdf_catalog=1;\n\tt2p->pdf_info=2;\n\tt2p->pdf_pages=3;\n\twritten += t2p_write_pdf_header(t2p, output);\n\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\tt2p->pdf_catalog=t2p->pdf_xrefcount;\n\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\twritten += t2p_write_pdf_catalog(t2p, output);\n\twritten += t2p_write_pdf_obj_end(output);\n\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\tt2p->pdf_info=t2p->pdf_xrefcount;\n\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\twritten += t2p_write_pdf_info(t2p, input, output);\n\twritten += t2p_write_pdf_obj_end(output);\n\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\tt2p->pdf_pages=t2p->pdf_xrefcount;\n\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\twritten += t2p_write_pdf_pages(t2p, output);\n\twritten += t2p_write_pdf_obj_end(output);\n\tfor(t2p->pdf_page=0;t2p->pdf_page<t2p->tiff_pagecount;t2p->pdf_page++){\n\t\tt2p_read_tiff_data(t2p, input);\n\t\tif(t2p->t2p_error!=T2P_ERR_OK){return(0);}\n\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\twritten += t2p_write_pdf_page(t2p->pdf_xrefcount, t2p, output);\n\t\twritten += t2p_write_pdf_obj_end(output);\n\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\twritten += t2p_write_pdf_stream_dict_start(output);\n\t\twritten += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);\n\t\twritten += t2p_write_pdf_stream_dict_end(output);\n\t\twritten += t2p_write_pdf_stream_start(output);\n\t\tstreamlen=written;\n\t\twritten += t2p_write_pdf_page_content_stream(t2p, output);\n\t\tstreamlen=written-streamlen;\n\t\twritten += t2p_write_pdf_stream_end(output);\n\t\twritten += t2p_write_pdf_obj_end(output);\n\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\twritten += t2p_write_pdf_stream_length(streamlen, output);\n\t\twritten += t2p_write_pdf_obj_end(output);\n\t\tif(t2p->tiff_transferfunctioncount != 0){\n\t\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\t\twritten += t2p_write_pdf_transfer(t2p, output);\n\t\t\twritten += t2p_write_pdf_obj_end(output);\n\t\t\tfor(i=0; i < t2p->tiff_transferfunctioncount; i++){\n\t\t\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\t\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\t\t\twritten += t2p_write_pdf_stream_dict_start(output);\n\t\t\t\twritten += t2p_write_pdf_transfer_dict(t2p, output, i);\n\t\t\t\twritten += t2p_write_pdf_stream_dict_end(output);\n\t\t\t\twritten += t2p_write_pdf_stream_start(output);\n\t\t\t\tstreamlen=written;\n\t\t\t\twritten += t2p_write_pdf_transfer_stream(t2p, output, i);\n\t\t\t\tstreamlen=written-streamlen;\n\t\t\t\twritten += t2p_write_pdf_stream_end(output);\n\t\t\t\twritten += t2p_write_pdf_obj_end(output);\n\t\t\t}\n\t\t}\n\t\tif( (t2p->pdf_colorspace & T2P_CS_PALETTE) != 0){\n\t\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\t\tt2p->pdf_palettecs=t2p->pdf_xrefcount;\n\t\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\t\twritten += t2p_write_pdf_stream_dict_start(output);\n\t\t\twritten += t2p_write_pdf_stream_dict(t2p->pdf_palettesize, 0, output);\n\t\t\twritten += t2p_write_pdf_stream_dict_end(output);\n\t\t\twritten += t2p_write_pdf_stream_start(output);\n\t\t\tstreamlen=written;\n\t\t\twritten += t2p_write_pdf_xobject_palettecs_stream(t2p, output);\n\t\t\tstreamlen=written-streamlen;\n\t\t\twritten += t2p_write_pdf_stream_end(output);\n\t\t\twritten += t2p_write_pdf_obj_end(output);\n\t\t}\n\t\tif( (t2p->pdf_colorspace & T2P_CS_ICCBASED) != 0){\n\t\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\t\tt2p->pdf_icccs=t2p->pdf_xrefcount;\n\t\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\t\twritten += t2p_write_pdf_stream_dict_start(output);\n\t\t\twritten += t2p_write_pdf_xobject_icccs_dict(t2p, output);\n\t\t\twritten += t2p_write_pdf_stream_dict_end(output);\n\t\t\twritten += t2p_write_pdf_stream_start(output);\n\t\t\tstreamlen=written;\n\t\t\twritten += t2p_write_pdf_xobject_icccs_stream(t2p, output);\n\t\t\tstreamlen=written-streamlen;\n\t\t\twritten += t2p_write_pdf_stream_end(output);\n\t\t\twritten += t2p_write_pdf_obj_end(output);\n\t\t}\n\t\tif(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount !=0){\n\t\t\tfor(i2=0;i2<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i2++){\n\t\t\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\t\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\t\t\twritten += t2p_write_pdf_stream_dict_start(output);\n\t\t\t\twritten += t2p_write_pdf_xobject_stream_dict(\n\t\t\t\t\ti2+1,\n\t\t\t\t\tt2p,\n\t\t\t\t\toutput);\n\t\t\t\twritten += t2p_write_pdf_stream_dict_end(output);\n\t\t\t\twritten += t2p_write_pdf_stream_start(output);\n\t\t\t\tstreamlen=written;\n\t\t\t\tt2p_read_tiff_size_tile(t2p, input, i2);\n\t\t\t\twritten += t2p_readwrite_pdf_image_tile(t2p, input, output, i2);\n\t\t\t\tt2p_write_advance_directory(t2p, output);\n\t\t\t\tif(t2p->t2p_error!=T2P_ERR_OK){return(0);}\n\t\t\t\tstreamlen=written-streamlen;\n\t\t\t\twritten += t2p_write_pdf_stream_end(output);\n\t\t\t\twritten += t2p_write_pdf_obj_end(output);\n\t\t\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\t\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\t\t\twritten += t2p_write_pdf_stream_length(streamlen, output);\n\t\t\t\twritten += t2p_write_pdf_obj_end(output);\n\t\t\t}\n\t\t} else {\n\t\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\t\twritten += t2p_write_pdf_stream_dict_start(output);\n\t\t\twritten += t2p_write_pdf_xobject_stream_dict(\n\t\t\t\t0,\n\t\t\t\tt2p,\n\t\t\t\toutput);\n\t\t\twritten += t2p_write_pdf_stream_dict_end(output);\n\t\t\twritten += t2p_write_pdf_stream_start(output);\n\t\t\tstreamlen=written;\n\t\t\tt2p_read_tiff_size(t2p, input);\n\t\t\twritten += t2p_readwrite_pdf_image(t2p, input, output);\n\t\t\tt2p_write_advance_directory(t2p, output);\n\t\t\tif(t2p->t2p_error!=T2P_ERR_OK){return(0);}\n\t\t\tstreamlen=written-streamlen;\n\t\t\twritten += t2p_write_pdf_stream_end(output);\n\t\t\twritten += t2p_write_pdf_obj_end(output);\n\t\t\tt2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;\n\t\t\twritten += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);\n\t\t\twritten += t2p_write_pdf_stream_length(streamlen, output);\n\t\t\twritten += t2p_write_pdf_obj_end(output);\n\t\t}\n\t}\n\tt2p->pdf_startxref = written;\n\twritten += t2p_write_pdf_xreftable(t2p, output);\n\twritten += t2p_write_pdf_trailer(t2p, output);\n\tt2p_disable(output);\n\treturn(written);\n}', 'void*\n_TIFFmalloc(tmsize_t s)\n{\n\treturn (malloc((size_t) s));\n}', 'tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){\n\ttsize_t written=0;\n\tchar buffer[16];\n\tint buflen=0;\n\tbuflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);\n\twritten += t2pWriteFile(output, (tdata_t) buffer, buflen);\n\twritten += t2pWriteFile(output, (tdata_t)"\\n%\\342\\343\\317\\323\\n", 7);\n\treturn(written);\n}', 'static tmsize_t\nt2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)\n{\n\tthandle_t client = TIFFClientdata(tif);\n\tTIFFReadWriteProc proc = TIFFGetWriteProc(tif);\n\tif (proc)\n\t\treturn proc(client, data, size);\n\treturn -1;\n}', 'thandle_t\nTIFFClientdata(TIFF* tif)\n{\n\treturn (tif->tif_clientdata);\n}', 'TIFFReadWriteProc\nTIFFGetWriteProc(TIFF* tif)\n{\n\treturn (tif->tif_writeproc);\n}', 'tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){\n\ttsize_t written=0;\n\tchar buffer[16];\n\tint buflen=0;\n\tbuflen=sprintf(buffer, "%lu", (unsigned long)number);\n\twritten += t2pWriteFile(output, (tdata_t) buffer, buflen );\n\twritten += t2pWriteFile(output, (tdata_t) " 0 obj\\n", 7);\n\treturn(written);\n}', 'tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output){\n\ttsize_t written=0;\n\tchar buffer[16];\n\tint buflen=0;\n\twritten += t2pWriteFile(output,\n\t\t(tdata_t)"<< \\n/Type /Catalog \\n/Pages ",\n\t\t27);\n\tbuflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);\n\twritten += t2pWriteFile(output, (tdata_t) buffer, buflen );\n\twritten += t2pWriteFile(output, (tdata_t) " 0 R \\n", 6);\n\tif(t2p->pdf_fitwindow){\n\t\twritten += t2pWriteFile(output,\n\t\t\t(tdata_t) "/ViewerPreferences <</FitWindow true>>\\n",\n\t\t\t39);\n\t}\n\twritten += t2pWriteFile(output, (tdata_t)">>\\n", 3);\n\treturn(written);\n}', 'tsize_t t2p_write_pdf_obj_end(TIFF* output){\n\ttsize_t written=0;\n\twritten += t2pWriteFile(output, (tdata_t) "endobj\\n", 7);\n\treturn(written);\n}']