From 1f457376b478257b88d4a857f5ec1b6155442dd7 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 20 Sep 2020 03:03:26 +0000 Subject: CTAN sync 202009200303 --- support/dktools/dk3pdf.c | 594 ++++++++++++++++++++++++++++------------------- 1 file changed, 356 insertions(+), 238 deletions(-) (limited to 'support/dktools/dk3pdf.c') diff --git a/support/dktools/dk3pdf.c b/support/dktools/dk3pdf.c index 44de63ad35..e032407863 100644 --- a/support/dktools/dk3pdf.c +++ b/support/dktools/dk3pdf.c @@ -1,36 +1,14 @@ /* - WARNING: This file was generated by dkct. - Changes you make here will be lost if dkct is run again! - You should modify the original source and run dkct on it. - Original source: dk3pdf.ctr +Copyright (C) 2011-2020, Dirk Krause +SPDX-License-Identifier: BSD-3-Clause */ /* -Copyright (C) 2011-2017, Dirk Krause - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above opyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of the author nor the names of contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + WARNING: This file was generated by the dkct program (see + http://dktools.sourceforge.net/ for details). + Changes you make here will be lost if dkct is run again! + You should modify the original source and run dkct on it. + Original source: dk3pdf.ctr */ /** @file dk3pdf.c The dk3pdf module. @@ -60,11 +38,12 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "dk3bmj.h" #include "dk3bif.h" #include "dk3bifa.h" +#include "dk3unused.h" -#line 418 "dk3pdf.ctr" +#line 419 "dk3pdf.ctr" @@ -185,7 +164,7 @@ static char const * dk3pdf_c8_kw[] = { /* 7 */ "%PDF-1.4\n", /* 8 */ " 0 obj\n", /* 9 */ "endobj\n", -/* 10 */ "<<\n/Producer (http://dktools.sourceforge.net)\n", +/* 10 */ "<<\n/Producer (http://sourceforge.net/p/dktools/wiki/Home/)\n", /* 11 */ "<<\n", /* 12 */ ">>\n", /* 13 */ "/Type /Catalog\n", @@ -297,12 +276,12 @@ dk3pdf_to_range(double min, double max, double val) double back; -#line 649 "dk3pdf.ctr" +#line 650 "dk3pdf.ctr" back = val; if(back < min) { back = min; } if(back > max) { back = max; } -#line 652 "dk3pdf.ctr" +#line 653 "dk3pdf.ctr" return back; } @@ -368,11 +347,17 @@ dk3pdf_compare_pages(void const *l, void const *r, int cr) */ static int -dk3pdf_compare_object_start(void const *l, void const *r, int cr) +dk3pdf_compare_object_start( + void const *l, + void const *r, + int DK3_ARG_UNUSED(cr) +) { int back = 0; dk3_pdf_object_start_t const *pl; /* Left object start. */ dk3_pdf_object_start_t const *pr; /* Right object start. */ + + DK3_UNUSED_ARG(cr) if(l) { if(r) { pl = (dk3_pdf_object_start_t const *)l; @@ -462,7 +447,7 @@ dk3pdf_job_init(dk3_pdf_writer_job_t *job, dk3_pdf_t *pdf, FILE *of) int back = 0; -#line 810 "dk3pdf.ctr" +#line 817 "dk3pdf.ctr" job->of = NULL; job->os = NULL; job->s_objstart = NULL; @@ -481,26 +466,26 @@ dk3pdf_job_init(dk3_pdf_writer_job_t *job, dk3_pdf_t *pdf, FILE *of) job->i_objstart = dk3sto_it_open(job->s_objstart); if(job->i_objstart) { -#line 827 "dk3pdf.ctr" +#line 834 "dk3pdf.ctr" back = 1; } else { -#line 829 "dk3pdf.ctr" +#line 836 "dk3pdf.ctr" } } else { -#line 831 "dk3pdf.ctr" +#line 838 "dk3pdf.ctr" } } else { -#line 833 "dk3pdf.ctr" +#line 840 "dk3pdf.ctr" } } else { -#line 835 "dk3pdf.ctr" +#line 842 "dk3pdf.ctr" } -#line 836 "dk3pdf.ctr" +#line 843 "dk3pdf.ctr" return back; } @@ -516,7 +501,7 @@ dk3pdf_job_end(dk3_pdf_writer_job_t *job) dk3_pdf_position_t *pos; /* Traverse start position collection. */ -#line 850 "dk3pdf.ctr" +#line 857 "dk3pdf.ctr" if(job->os) { dk3stream_close(job->os); } @@ -535,7 +520,7 @@ dk3pdf_job_end(dk3_pdf_writer_job_t *job) } job->s_objstart = NULL; -#line 867 "dk3pdf.ctr" +#line 874 "dk3pdf.ctr" } @@ -549,10 +534,10 @@ dk3pdf_xobject_delete(dk3_pdf_xobject_t *xo) { -#line 879 "dk3pdf.ctr" +#line 886 "dk3pdf.ctr" if(xo) { -#line 880 "dk3pdf.ctr" +#line 887 "dk3pdf.ctr" if(xo->tempfilename) { dk3sf_remove_file_app(xo->tempfilename, NULL); dk3_delete(xo->tempfilename); @@ -570,7 +555,7 @@ dk3pdf_xobject_delete(dk3_pdf_xobject_t *xo) dk3_delete(xo); } -#line 896 "dk3pdf.ctr" +#line 903 "dk3pdf.ctr" } @@ -588,7 +573,7 @@ dk3pdf_xobject_new(dk3_pdf_t *pdf) int ok = 0; /* Flag: Success so far. */ -#line 912 "dk3pdf.ctr" +#line 919 "dk3pdf.ctr" back = dk3_new_app(dk3_pdf_xobject_t,1,pdf->app); if(back) { back->tempfilename = NULL; @@ -616,7 +601,7 @@ dk3pdf_xobject_new(dk3_pdf_t *pdf) } } -#line 938 "dk3pdf.ctr" +#line 945 "dk3pdf.ctr" return back; } @@ -625,15 +610,16 @@ dk3pdf_xobject_new(dk3_pdf_t *pdf) /** Destroy page object, release memory. @param pa Page object to destroy. */ +static void dk3pdf_page_delete(dk3_pdf_page_t *pa) { -#line 950 "dk3pdf.ctr" +#line 958 "dk3pdf.ctr" if(pa) { -#line 951 "dk3pdf.ctr" +#line 959 "dk3pdf.ctr" if(pa->tempof) { dk3of_close(pa->tempof); } @@ -668,7 +654,7 @@ dk3pdf_page_delete(dk3_pdf_page_t *pa) dk3_delete(pa); } -#line 984 "dk3pdf.ctr" +#line 992 "dk3pdf.ctr" } @@ -686,7 +672,7 @@ dk3pdf_page_new(dk3_pdf_t *pdf) int ok = 0; /* Flag: OK so far. */ -#line 1000 "dk3pdf.ctr" +#line 1008 "dk3pdf.ctr" if(dk3app_get_temp_file_name(pdf->app, fnb, DK3_SIZEOF(fnb,dkChar))) { back = dk3_new_app(dk3_pdf_page_t,1,pdf->app); if(back) { @@ -739,7 +725,7 @@ dk3pdf_page_new(dk3_pdf_t *pdf) } } -#line 1051 "dk3pdf.ctr" +#line 1059 "dk3pdf.ctr" return back; } @@ -753,7 +739,7 @@ dk3pdf_open_app(dk3_app_t *app) int ok = 0; /* Flag: Success. */ -#line 1063 "dk3pdf.ctr" +#line 1071 "dk3pdf.ctr" if(app) { back = dk3_new_app(dk3_pdf_t,1,app); if(back) { @@ -796,7 +782,7 @@ dk3pdf_open_app(dk3_app_t *app) } } -#line 1104 "dk3pdf.ctr" +#line 1112 "dk3pdf.ctr" return back; } @@ -809,7 +795,7 @@ dk3pdf_close(dk3_pdf_t *pdf) dk3_pdf_page_t *pa; /* Traverse page collection to clean up. */ -#line 1115 "dk3pdf.ctr" +#line 1123 "dk3pdf.ctr" if(pdf) { if(pdf->s_xobjects) { if(pdf->i_xobjects) { @@ -842,7 +828,7 @@ dk3pdf_close(dk3_pdf_t *pdf) dk3_delete(pdf); } -#line 1146 "dk3pdf.ctr" +#line 1154 "dk3pdf.ctr" } @@ -864,7 +850,7 @@ dk3pdf_set_next_mediabox( pdf->mby1 = y1; } -#line 1166 "dk3pdf.ctr" +#line 1174 "dk3pdf.ctr" } @@ -881,7 +867,7 @@ dk3pdf_write_long(dk3_of_t *of, long x) sprintf(buf, dk3pdf_c8_kw[95], x); dk3of_write_c8_string(of, buf); -#line 1181 "dk3pdf.ctr" +#line 1189 "dk3pdf.ctr" } @@ -899,7 +885,7 @@ dk3pdf_open_page_with_clip(dk3_pdf_t *pdf, int wc) #endif -#line 1197 "dk3pdf.ctr" +#line 1205 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { dk3pdf_close_page(pdf); @@ -941,7 +927,7 @@ dk3pdf_open_page_with_clip(dk3_pdf_t *pdf, int wc) } } -#line 1237 "dk3pdf.ctr" +#line 1245 "dk3pdf.ctr" return back; } @@ -964,7 +950,7 @@ dk3pdf_close_page(dk3_pdf_t *pdf) int back = 0; -#line 1258 "dk3pdf.ctr" +#line 1266 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -999,7 +985,7 @@ dk3pdf_close_page(dk3_pdf_t *pdf) pdf->cp = NULL; } -#line 1291 "dk3pdf.ctr" +#line 1299 "dk3pdf.ctr" return back; } @@ -1011,7 +997,7 @@ dk3pdf_gsave(dk3_pdf_t *pdf) int back = 0; -#line 1301 "dk3pdf.ctr" +#line 1309 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -1021,7 +1007,7 @@ dk3pdf_gsave(dk3_pdf_t *pdf) } } -#line 1309 "dk3pdf.ctr" +#line 1317 "dk3pdf.ctr" return back; } @@ -1033,7 +1019,7 @@ dk3pdf_grestore(dk3_pdf_t *pdf) int back = 0; -#line 1319 "dk3pdf.ctr" +#line 1327 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -1043,7 +1029,7 @@ dk3pdf_grestore(dk3_pdf_t *pdf) } } -#line 1327 "dk3pdf.ctr" +#line 1335 "dk3pdf.ctr" return back; } @@ -1060,7 +1046,7 @@ dk3pdf_cm_long(dk3_of_t *of, long *cmv) char buf[64]; /* Conversion buffer. */ -#line 1342 "dk3pdf.ctr" +#line 1350 "dk3pdf.ctr" sprintf(buf, "%ld", cmv[0]); dk3of_write_c8_string(of, buf); dk3of_write_c8_string(of, dk3pdf_c8_kw[1]); @@ -1082,7 +1068,7 @@ dk3pdf_cm_long(dk3_of_t *of, long *cmv) dk3of_write_c8_string(of, dk3pdf_c8_kw[4]); dk3of_write_c8_string(of, dk3pdf_c8_kw[0]); -#line 1362 "dk3pdf.ctr" +#line 1370 "dk3pdf.ctr" } @@ -1103,7 +1089,7 @@ dk3pdf_write_double(dk3_of_t *of, double x) while(*ptr) { if(*ptr == ',') { *ptr = '.'; } ptr++; } dk3of_write_c8_string(of, buf); -#line 1381 "dk3pdf.ctr" +#line 1389 "dk3pdf.ctr" #else if (1.0e-8 <= fabs(x)) { (void)dk3of_double_to_c8_no_sci(of, x); @@ -1125,7 +1111,7 @@ dk3pdf_cm_double(dk3_of_t *of, double *cmv) { -#line 1401 "dk3pdf.ctr" +#line 1409 "dk3pdf.ctr" dk3pdf_write_double(of, cmv[0]); dk3of_write_c8_string(of, dk3pdf_c8_kw[1]); dk3pdf_write_double(of, cmv[1]); @@ -1140,7 +1126,7 @@ dk3pdf_cm_double(dk3_of_t *of, double *cmv) dk3of_write_c8_string(of, dk3pdf_c8_kw[1]); dk3of_write_c8_string(of, dk3pdf_c8_kw[4]); -#line 1414 "dk3pdf.ctr" +#line 1422 "dk3pdf.ctr" } @@ -1152,7 +1138,7 @@ dk3pdf_translate_long(dk3_pdf_t *pdf, long x, long y) int back = 0; -#line 1424 "dk3pdf.ctr" +#line 1432 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -1166,7 +1152,7 @@ dk3pdf_translate_long(dk3_pdf_t *pdf, long x, long y) } } -#line 1436 "dk3pdf.ctr" +#line 1444 "dk3pdf.ctr" return back; } @@ -1179,7 +1165,7 @@ dk3pdf_translate_double(dk3_pdf_t *pdf, double x, double y) int back = 0; -#line 1447 "dk3pdf.ctr" +#line 1455 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -1193,7 +1179,7 @@ dk3pdf_translate_double(dk3_pdf_t *pdf, double x, double y) } } -#line 1459 "dk3pdf.ctr" +#line 1467 "dk3pdf.ctr" return back; } @@ -1217,7 +1203,7 @@ dk3pdf_rotate_int(dk3_pdf_t *pdf, int angle) int back = 0; -#line 1481 "dk3pdf.ctr" +#line 1489 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -1247,7 +1233,7 @@ dk3pdf_rotate_int(dk3_pdf_t *pdf, int angle) } } -#line 1509 "dk3pdf.ctr" +#line 1517 "dk3pdf.ctr" return back; } @@ -1260,7 +1246,7 @@ dk3pdf_rotate_double(dk3_pdf_t *pdf, double angle) int back = 0; -#line 1520 "dk3pdf.ctr" +#line 1528 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -1274,7 +1260,7 @@ dk3pdf_rotate_double(dk3_pdf_t *pdf, double angle) } } -#line 1532 "dk3pdf.ctr" +#line 1540 "dk3pdf.ctr" return back; } @@ -1287,7 +1273,7 @@ dk3pdf_scale_long(dk3_pdf_t *pdf, long x, long y) int back = 0; -#line 1543 "dk3pdf.ctr" +#line 1551 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -1299,7 +1285,7 @@ dk3pdf_scale_long(dk3_pdf_t *pdf, long x, long y) } } -#line 1553 "dk3pdf.ctr" +#line 1561 "dk3pdf.ctr" return back; } @@ -1312,7 +1298,7 @@ dk3pdf_scale_double(dk3_pdf_t *pdf, double x, double y) int back = 0; -#line 1564 "dk3pdf.ctr" +#line 1572 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -1324,7 +1310,7 @@ dk3pdf_scale_double(dk3_pdf_t *pdf, double x, double y) } } -#line 1574 "dk3pdf.ctr" +#line 1582 "dk3pdf.ctr" return back; } @@ -1337,16 +1323,16 @@ dk3pdf_add_xobject_to_page(dk3_pdf_t *pdf, dk3_pdf_xobject_t *xo) int back = 0; -#line 1585 "dk3pdf.ctr" +#line 1593 "dk3pdf.ctr" if((pdf) && (xo)) { -#line 1586 "dk3pdf.ctr" +#line 1594 "dk3pdf.ctr" if(pdf->cp) { -#line 1587 "dk3pdf.ctr" +#line 1595 "dk3pdf.ctr" if((pdf->cp)->tempof) { -#line 1588 "dk3pdf.ctr" +#line 1596 "dk3pdf.ctr" sprintf(buf, "%lu", xo->objno); dk3of_write_c8_string((pdf->cp)->tempof, dk3pdf_c8_kw[5]); dk3of_write_c8_string((pdf->cp)->tempof, buf); @@ -1361,27 +1347,27 @@ dk3pdf_add_xobject_to_page(dk3_pdf_t *pdf, dk3_pdf_xobject_t *xo) } if(((pdf->cp)->s_xobjects) && ((pdf->cp)->i_xobjects)) { -#line 1601 "dk3pdf.ctr" +#line 1609 "dk3pdf.ctr" if(dk3sto_add((pdf->cp)->s_xobjects, (void *)xo)) { -#line 1602 "dk3pdf.ctr" +#line 1610 "dk3pdf.ctr" back = 1; } } } else { -#line 1606 "dk3pdf.ctr" +#line 1614 "dk3pdf.ctr" } } else { -#line 1608 "dk3pdf.ctr" +#line 1616 "dk3pdf.ctr" } } else { -#line 1610 "dk3pdf.ctr" +#line 1618 "dk3pdf.ctr" } -#line 1611 "dk3pdf.ctr" +#line 1619 "dk3pdf.ctr" return back; } @@ -1404,7 +1390,7 @@ dk3pdf_image_job_init( { -#line 1632 "dk3pdf.ctr" +#line 1640 "dk3pdf.ctr" job->pdf = pdf; job->bif = bif; job->of = NULL; @@ -1416,7 +1402,7 @@ dk3pdf_image_job_init( job->use_dct = 0; job->xo = NULL; -#line 1642 "dk3pdf.ctr" +#line 1650 "dk3pdf.ctr" } @@ -1437,7 +1423,7 @@ dk3pdf_transfer_dct_data(FILE *ofile, dk3_bif_t *bif, dk3_app_t *app) int cc; /* Flag: Can continue. */ -#line 1661 "dk3pdf.ctr" +#line 1669 "dk3pdf.ctr" ifile = dk3bif_get_file(bif); if(ifile) { rewind(ifile); @@ -1451,7 +1437,7 @@ dk3pdf_transfer_dct_data(FILE *ofile, dk3_bif_t *bif, dk3_app_t *app) } while(cc); } -#line 1673 "dk3pdf.ctr" +#line 1681 "dk3pdf.ctr" } @@ -1466,10 +1452,17 @@ dk3pdf_transfer_dct_data(FILE *ofile, dk3_bif_t *bif, dk3_app_t *app) static void dk3pdf_out_col_8_mixed( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_image_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { dk3_bif_coord_t y; /* Current line. */ @@ -1481,7 +1474,12 @@ dk3pdf_out_col_8_mixed( unsigned char r, g, b; /* RGB values. */ -#line 1701 "dk3pdf.ctr" +#line 1716 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif w = dk3bif_get_width(job->bif); h = dk3bif_get_height(job->bif); switch((job->opt)->pred) { @@ -1619,7 +1617,7 @@ dk3pdf_out_col_8_mixed( } break; } -#line 1837 "dk3pdf.ctr" +#line 1857 "dk3pdf.ctr" } @@ -1633,10 +1631,17 @@ dk3pdf_out_col_8_mixed( static void dk3pdf_out_col_8_not_mixed( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_image_job_t *job, + void *DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { dk3_bif_coord_t y; /* Current line. */ @@ -1648,7 +1653,12 @@ dk3pdf_out_col_8_not_mixed( unsigned char r, g, b; /* RGB values. */ -#line 1864 "dk3pdf.ctr" +#line 1891 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif w = dk3bif_get_width(job->bif); h = dk3bif_get_height(job->bif); switch((job->opt)->pred) { @@ -1786,7 +1796,7 @@ dk3pdf_out_col_8_not_mixed( } break; } -#line 2000 "dk3pdf.ctr" +#line 2032 "dk3pdf.ctr" } @@ -1800,10 +1810,17 @@ dk3pdf_out_col_8_not_mixed( static void dk3pdf_out_gray_8_mixed( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_image_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { dk3_bif_coord_t y; /* Current line. */ @@ -1813,7 +1830,12 @@ dk3pdf_out_gray_8_mixed( unsigned char v, p, q; /* Value and predictor(s). */ -#line 2025 "dk3pdf.ctr" +#line 2064 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif w = dk3bif_get_width(job->bif); h = dk3bif_get_height(job->bif); switch((job->opt)->pred) { @@ -1912,7 +1934,7 @@ dk3pdf_out_gray_8_mixed( } break; } -#line 2122 "dk3pdf.ctr" +#line 2166 "dk3pdf.ctr" } @@ -1926,10 +1948,17 @@ dk3pdf_out_gray_8_mixed( static void dk3pdf_out_gray_8_not_mixed( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_image_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { dk3_bif_coord_t y; /* Current line. */ @@ -1939,20 +1968,25 @@ dk3pdf_out_gray_8_not_mixed( unsigned char v, p, q; /* Value and predictors. */ -#line 2147 "dk3pdf.ctr" +#line 2198 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif w = dk3bif_get_width(job->bif); h = dk3bif_get_height(job->bif); switch((job->opt)->pred) { case DK3_COMPRESSION_PREDICTOR_TIFF: { -#line 2151 "dk3pdf.ctr" +#line 2207 "dk3pdf.ctr" for(y = 0L; y < h; y++) { p = 0x00; for(x = 0L; x < w; x++) { v = (unsigned char)dk3bif_get_gray(job->bif, x, y); q = v - p; -#line 2156 "dk3pdf.ctr" +#line 2212 "dk3pdf.ctr" dk3of_write_bytes(job->of, &q, 1); p = v; } @@ -2033,7 +2067,7 @@ dk3pdf_out_gray_8_not_mixed( } break; default: { -#line 2235 "dk3pdf.ctr" +#line 2291 "dk3pdf.ctr" for(y = 0L; y < h; y++) { for(x = 0L; x < w; x++) { v = (unsigned char)dk3bif_get_gray(job->bif, x, y); @@ -2046,7 +2080,7 @@ dk3pdf_out_gray_8_not_mixed( } break; } -#line 2246 "dk3pdf.ctr" +#line 2302 "dk3pdf.ctr" } @@ -2060,10 +2094,17 @@ dk3pdf_out_gray_8_not_mixed( static void dk3pdf_out_col_not8_mixed( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_image_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { dk3_bif_coord_t y; /* Current line. */ @@ -2078,7 +2119,12 @@ dk3pdf_out_col_not8_mixed( dk3_bif_pixel_t ob; /* Previous blue. */ -#line 2276 "dk3pdf.ctr" +#line 2339 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif w = dk3bif_get_width(job->bif); h = dk3bif_get_height(job->bif); switch((job->opt)->pred) { @@ -2120,7 +2166,7 @@ dk3pdf_out_col_not8_mixed( } break; } -#line 2316 "dk3pdf.ctr" +#line 2384 "dk3pdf.ctr" } @@ -2134,10 +2180,17 @@ dk3pdf_out_col_not8_mixed( static void dk3pdf_out_col_not8_not_mixed( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_image_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { dk3_bif_coord_t y; /* Current line. */ @@ -2152,7 +2205,12 @@ dk3pdf_out_col_not8_not_mixed( dk3_bif_pixel_t ob; /* Previous blue. */ -#line 2346 "dk3pdf.ctr" +#line 2421 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif w = dk3bif_get_width(job->bif); h = dk3bif_get_height(job->bif); switch((job->opt)->pred) { @@ -2194,7 +2252,7 @@ dk3pdf_out_col_not8_not_mixed( } break; } -#line 2386 "dk3pdf.ctr" +#line 2466 "dk3pdf.ctr" } @@ -2208,10 +2266,17 @@ dk3pdf_out_col_not8_not_mixed( static void dk3pdf_out_gray_not8_mixed( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_image_job_t *job, + void *DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { dk3_bif_coord_t y; /* Current line. */ @@ -2222,7 +2287,12 @@ dk3pdf_out_gray_not8_mixed( dk3_bif_pixel_t og; /* Previous gray. */ -#line 2412 "dk3pdf.ctr" +#line 2499 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif w = dk3bif_get_width(job->bif); h = dk3bif_get_height(job->bif); switch((job->opt)->pred) { @@ -2254,7 +2324,7 @@ dk3pdf_out_gray_not8_mixed( } break; } -#line 2442 "dk3pdf.ctr" +#line 2534 "dk3pdf.ctr" } @@ -2268,10 +2338,17 @@ dk3pdf_out_gray_not8_mixed( static void dk3pdf_out_gray_not8_not_mixed( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_image_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { dk3_bif_coord_t y; /* Current line. */ @@ -2282,7 +2359,12 @@ dk3pdf_out_gray_not8_not_mixed( dk3_bif_pixel_t og; /* Previous gray. */ -#line 2468 "dk3pdf.ctr" +#line 2567 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif w = dk3bif_get_width(job->bif); h = dk3bif_get_height(job->bif); switch((job->opt)->pred) { @@ -2314,7 +2396,7 @@ dk3pdf_out_gray_not8_not_mixed( } break; } -#line 2498 "dk3pdf.ctr" +#line 2602 "dk3pdf.ctr" } @@ -2330,10 +2412,17 @@ dk3pdf_out_gray_not8_not_mixed( static int dk3pdf_add_alpha_xobject( +#if DK3_USE_WX dk3_pdf_image_job_t *job, void *pcomm, int min, int max +#else + dk3_pdf_image_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(min), + int DK3_ARG_UNUSED(max) +#endif ) { dk3_stat_t stb; /* Stat buffer. */ @@ -2353,7 +2442,12 @@ dk3pdf_add_alpha_xobject( unsigned char wc; /* Predictor as byte. */ -#line 2535 "dk3pdf.ctr" +#line 2646 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(min) + DK3_UNUSED_ARG(max) +#endif mo = dk3pdf_xobject_new(job->pdf); if(mo) { mo->objno = (job->pdf)->nextobject; @@ -2550,7 +2644,7 @@ dk3pdf_add_alpha_xobject( } } -#line 2730 "dk3pdf.ctr" +#line 2846 "dk3pdf.ctr" return back; } @@ -2579,7 +2673,7 @@ dk3pdf_xobject_data( int xmax; /* Centered progress bar value. */ -#line 2757 "dk3pdf.ctr" +#line 2873 "dk3pdf.ctr" xmax = max; if(!(job->use_dct)) { switch(job->procedure) { @@ -2589,7 +2683,7 @@ dk3pdf_xobject_data( } } -#line 2765 "dk3pdf.ctr" +#line 2881 "dk3pdf.ctr" (job->xo)->width = dk3bif_get_width(job->bif); (job->xo)->height = dk3bif_get_height(job->bif); (job->xo)->xot = DK3_PDF_XO_TYPE_IMAGE; @@ -2604,10 +2698,10 @@ dk3pdf_xobject_data( ); if(fipo) { -#line 2778 "dk3pdf.ctr" +#line 2894 "dk3pdf.ctr" if(job->use_dct) { -#line 2779 "dk3pdf.ctr" +#line 2895 "dk3pdf.ctr" back = 1; dk3pdf_transfer_dct_data(fipo, job->bif, (job->pdf)->app); } else { @@ -2709,10 +2803,10 @@ dk3pdf_xobject_data( } } else { -#line 2879 "dk3pdf.ctr" +#line 2995 "dk3pdf.ctr" } -#line 2880 "dk3pdf.ctr" +#line 2996 "dk3pdf.ctr" return back; } @@ -2734,7 +2828,7 @@ dk3pdf_create_ixobject_progress( size_t nbits; /* Bits per component. */ -#line 2900 "dk3pdf.ctr" +#line 3016 "dk3pdf.ctr" nbits = dk3bif_get_bits_per_pixel(bif); dk3pdf_image_job_init(&job, opt, pdf, bif); switch(dk3bif_get_color_space(bif)) { @@ -2750,18 +2844,18 @@ dk3pdf_create_ixobject_progress( } break; } -#line 2914 "dk3pdf.ctr" +#line 3030 "dk3pdf.ctr" switch(dk3bif_get_type(bif)) { case DK3_BIF_IMAGE_TYPE_JPEG: { -#line 2916 "dk3pdf.ctr" +#line 3032 "dk3pdf.ctr" if(opt->dct) { -#line 2917 "dk3pdf.ctr" +#line 3033 "dk3pdf.ctr" switch(dk3bif_get_bits_per_pixel(bif)) { case 1: case 2: case 4: case 8: { -#line 2919 "dk3pdf.ctr" +#line 3035 "dk3pdf.ctr" switch(dk3bif_jpeg_get_num_components(bif)) { case 1: { job.procedure = DK3_BMEPS_GRAY_DCT; @@ -2780,13 +2874,13 @@ dk3pdf_create_ixobject_progress( } break; default: { -#line 2936 "dk3pdf.ctr" +#line 3052 "dk3pdf.ctr" } break; } } break; default: { -#line 2940 "dk3pdf.ctr" +#line 3056 "dk3pdf.ctr" } break; } } @@ -2860,7 +2954,7 @@ dk3pdf_create_ixobject_progress( #if DK3_USE_WX -#line 3012 "dk3pdf.ctr" +#line 3128 "dk3pdf.ctr" dk3bmj_progress(pc, (min + max)/2); #endif back = dk3pdf_xobject_new(pdf); @@ -2897,12 +2991,12 @@ dk3pdf_create_ixobject_progress( #if DK3_USE_WX -#line 3047 "dk3pdf.ctr" +#line 3163 "dk3pdf.ctr" dk3bmj_progress(pc, max); #endif -#line 3050 "dk3pdf.ctr" +#line 3166 "dk3pdf.ctr" return back; } @@ -2927,11 +3021,11 @@ dk3pdf_create_ixobject( dk3_pdf_xobject_t *back; -#line 3073 "dk3pdf.ctr" +#line 3189 "dk3pdf.ctr" back = dk3pdf_create_ixobject_progress(pdf, bif, opt, NULL, 0, 1000); -#line 3075 "dk3pdf.ctr" +#line 3191 "dk3pdf.ctr" return back; } #endif @@ -2951,20 +3045,20 @@ dk3pdf_add_image_progress( dk3_pdf_xobject_t *back = NULL; -#line 3093 "dk3pdf.ctr" +#line 3209 "dk3pdf.ctr" if((pdf) && (bif)) { -#line 3094 "dk3pdf.ctr" +#line 3210 "dk3pdf.ctr" if(pdf->cp) { -#line 3095 "dk3pdf.ctr" +#line 3211 "dk3pdf.ctr" if((pdf->cp)->tempof) { -#line 3096 "dk3pdf.ctr" +#line 3212 "dk3pdf.ctr" back = dk3pdf_create_ixobject_progress(pdf, bif, opt, pc, min, max); if(back) { -#line 3098 "dk3pdf.ctr" +#line 3214 "dk3pdf.ctr" if(!dk3pdf_add_xobject_to_page(pdf, back)) { back = NULL; } @@ -2973,7 +3067,7 @@ dk3pdf_add_image_progress( } } -#line 3105 "dk3pdf.ctr" +#line 3221 "dk3pdf.ctr" return back; } @@ -2989,11 +3083,11 @@ dk3pdf_add_image( dk3_pdf_xobject_t *back = NULL; -#line 3119 "dk3pdf.ctr" +#line 3235 "dk3pdf.ctr" back = dk3pdf_add_image_progress(pdf, bif, opt, NULL, 0, 1000); -#line 3121 "dk3pdf.ctr" +#line 3237 "dk3pdf.ctr" return back; } @@ -3014,41 +3108,41 @@ dk3pdf_begin_object(dk3_pdf_writer_job_t *job, unsigned long on) int back = 0; -#line 3140 "dk3pdf.ctr" +#line 3256 "dk3pdf.ctr" pos = dk3stream_bytes_written(job->os); -#line 3141 "dk3pdf.ctr" +#line 3257 "dk3pdf.ctr" if(on > job->largestObjectNumber) { job->largestObjectNumber = on; } start = dk3_new_app(dk3_pdf_object_start_t,1,(job->pdf)->app); if(start) { -#line 3144 "dk3pdf.ctr" +#line 3260 "dk3pdf.ctr" start->objno = on; start->startpos = pos; if(dk3sto_add(job->s_objstart, (void *)start)) { -#line 3147 "dk3pdf.ctr" +#line 3263 "dk3pdf.ctr" back = 1; sprintf(buf, "%lu", on); -#line 3149 "dk3pdf.ctr" +#line 3265 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, buf); -#line 3150 "dk3pdf.ctr" +#line 3266 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[8]); -#line 3151 "dk3pdf.ctr" +#line 3267 "dk3pdf.ctr" } else { -#line 3152 "dk3pdf.ctr" +#line 3268 "dk3pdf.ctr" dk3_delete(start); } } else { -#line 3155 "dk3pdf.ctr" +#line 3271 "dk3pdf.ctr" } -#line 3156 "dk3pdf.ctr" +#line 3272 "dk3pdf.ctr" return back; } @@ -3064,7 +3158,7 @@ dk3pdf_end_object(dk3_pdf_writer_job_t *job) { dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[9]); -#line 3170 "dk3pdf.ctr" +#line 3286 "dk3pdf.ctr" } @@ -3086,7 +3180,7 @@ dk3pdf_write_file_start(dk3_pdf_writer_job_t *job) int back = 1; -#line 3190 "dk3pdf.ctr" +#line 3306 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[7]); if(dk3pdf_begin_object(job, 1UL)) { dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[10]); @@ -3150,21 +3244,21 @@ dk3pdf_write_file_start(dk3_pdf_writer_job_t *job) dk3pdf_end_object(job); } else { -#line 3252 "dk3pdf.ctr" +#line 3368 "dk3pdf.ctr" back = 0; } } else { -#line 3255 "dk3pdf.ctr" +#line 3371 "dk3pdf.ctr" back = 0; } } else { -#line 3258 "dk3pdf.ctr" +#line 3374 "dk3pdf.ctr" back = 0; } -#line 3260 "dk3pdf.ctr" +#line 3376 "dk3pdf.ctr" return back; } @@ -3191,7 +3285,7 @@ dk3pdf_decode_parms( char buf[256]; /* Conversion buffer. */ -#line 3285 "dk3pdf.ctr" +#line 3401 "dk3pdf.ctr" dk3stream_c8_fputs(os, dk3pdf_c8_kw[64]); dk3stream_c8_fputs(os, dk3pdf_c8_kw[predictorline]); sprintf(buf, "%d", bpc); @@ -3221,7 +3315,7 @@ dk3pdf_decode_parms( dk3stream_c8_fputs(os, dk3pdf_c8_kw[0]); dk3stream_c8_fputs(os, dk3pdf_c8_kw[12]); -#line 3313 "dk3pdf.ctr" +#line 3429 "dk3pdf.ctr" } @@ -3236,10 +3330,17 @@ dk3pdf_decode_parms( static int dk3pdf_write_file_xobjects( +#if DK3_USE_WX dk3_pdf_writer_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_writer_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { char buf[64]; /* Conversion buffer. */ @@ -3252,7 +3353,12 @@ dk3pdf_write_file_xobjects( int cc; /* Flag: Can continue transfer. */ -#line 3342 "dk3pdf.ctr" +#line 3465 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif dk3sto_it_reset((job->pdf)->i_xobjects); while((xo = (dk3_pdf_xobject_t *)dk3sto_it_next((job->pdf)->i_xobjects)) != NULL @@ -3385,7 +3491,7 @@ dk3pdf_write_file_xobjects( #endif } -#line 3473 "dk3pdf.ctr" +#line 3601 "dk3pdf.ctr" return back; } @@ -3401,10 +3507,17 @@ dk3pdf_write_file_xobjects( static int dk3pdf_write_file_pages( +#if DK3_USE_WX dk3_pdf_writer_job_t *job, void *pcomm, int minpb, int maxpb +#else + dk3_pdf_writer_job_t *job, + void * DK3_ARG_UNUSED(pcomm), + int DK3_ARG_UNUSED(minpb), + int DK3_ARG_UNUSED(maxpb) +#endif ) { char buf[4096]; /* Data transfer buffer. */ @@ -3417,12 +3530,17 @@ dk3pdf_write_file_pages( int cc; /* Flag: Can continue transfer. */ -#line 3503 "dk3pdf.ctr" +#line 3638 "dk3pdf.ctr" +#if !DK3_USE_WX + DK3_UNUSED_ARG(pcomm) + DK3_UNUSED_ARG(minpb) + DK3_UNUSED_ARG(maxpb) +#endif dk3sto_it_reset((job->pdf)->i_pages); while((cp = (dk3_pdf_page_t *)dk3sto_it_next((job->pdf)->i_pages)) != NULL) { -#line 3506 "dk3pdf.ctr" +#line 3646 "dk3pdf.ctr" /* Mark all Xobjects as unused. */ @@ -3434,7 +3552,7 @@ dk3pdf_write_file_pages( xo->used = 0; } -#line 3516 "dk3pdf.ctr" +#line 3656 "dk3pdf.ctr" /* Mark Xobjects used by this page. */ @@ -3445,74 +3563,74 @@ dk3pdf_write_file_pages( { xo->used = 1; -#line 3525 "dk3pdf.ctr" +#line 3665 "dk3pdf.ctr" if(xo->mask) { -#line 3526 "dk3pdf.ctr" +#line 3666 "dk3pdf.ctr" have_mask = 1; } } } -#line 3530 "dk3pdf.ctr" +#line 3670 "dk3pdf.ctr" /* Write page object. */ -#line 3534 "dk3pdf.ctr" +#line 3674 "dk3pdf.ctr" if(dk3pdf_begin_object(job, cp->objno)) { -#line 3535 "dk3pdf.ctr" +#line 3675 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[11]); /* << */ dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[48]); -#line 3537 "dk3pdf.ctr" +#line 3677 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[49]); -#line 3538 "dk3pdf.ctr" +#line 3678 "dk3pdf.ctr" sprintf(buf, dk3pdf_c8_kw[50], cp->mbx0, cp->mby0, cp->mbx1, cp->mby1); dk3stream_c8_fputs(job->os, buf); -#line 3540 "dk3pdf.ctr" +#line 3680 "dk3pdf.ctr" sprintf(buf, dk3pdf_c8_kw[100], cp->mbx0, cp->mby0, cp->mbx1, cp->mby1); dk3stream_c8_fputs(job->os, buf); dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[51]); /* /Resources << */ dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[11]); -#line 3544 "dk3pdf.ctr" +#line 3684 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[52]); -#line 3545 "dk3pdf.ctr" +#line 3685 "dk3pdf.ctr" if((cp->s_xobjects) && (cp->i_xobjects)) { -#line 3546 "dk3pdf.ctr" +#line 3686 "dk3pdf.ctr" sprintf(buf, dk3pdf_c8_kw[53], (cp->objno + 2UL)); -#line 3547 "dk3pdf.ctr" +#line 3687 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, buf); -#line 3548 "dk3pdf.ctr" +#line 3688 "dk3pdf.ctr" } dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[12]); /* >> */ sprintf(buf, dk3pdf_c8_kw[54], (cp->objno + 1UL)); -#line 3551 "dk3pdf.ctr" +#line 3691 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, buf); -#line 3552 "dk3pdf.ctr" +#line 3692 "dk3pdf.ctr" /* Group (for alpha) */ if(have_mask) { -#line 3554 "dk3pdf.ctr" +#line 3694 "dk3pdf.ctr" dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[55]); -#line 3555 "dk3pdf.ctr" +#line 3695 "dk3pdf.ctr" } dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[12]); /* >> */ dk3pdf_end_object(job); -#line 3558 "dk3pdf.ctr" +#line 3698 "dk3pdf.ctr" /* Write content stream object. */ @@ -3557,7 +3675,7 @@ dk3pdf_write_file_pages( dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[26]); dk3pdf_end_object(job); -#line 3601 "dk3pdf.ctr" +#line 3741 "dk3pdf.ctr" /* Write XObjects dictionary. */ @@ -3577,7 +3695,7 @@ dk3pdf_write_file_pages( dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[12]); dk3pdf_end_object(job); -#line 3619 "dk3pdf.ctr" +#line 3759 "dk3pdf.ctr" } else { back = 0; /* ERROR: Memory */ @@ -3589,7 +3707,7 @@ dk3pdf_write_file_pages( } } else { -#line 3629 "dk3pdf.ctr" +#line 3769 "dk3pdf.ctr" back = 0; /* ERROR: Memory */ } @@ -3598,7 +3716,7 @@ dk3pdf_write_file_pages( #endif } -#line 3636 "dk3pdf.ctr" +#line 3776 "dk3pdf.ctr" return back; } @@ -3620,7 +3738,7 @@ dk3pdf_write_file_end(dk3_pdf_writer_job_t *job) int back = 1; -#line 3656 "dk3pdf.ctr" +#line 3796 "dk3pdf.ctr" startxref = dk3stream_bytes_written(job->os); sprintf(buf, "%lu", (job->largestObjectNumber + 1UL)); dk3stream_c8_fputs(job->os, dk3pdf_c8_kw[18]); @@ -3657,7 +3775,7 @@ dk3pdf_write_file_end(dk3_pdf_writer_job_t *job) /* ERROR: Failed to convert number! */ } -#line 3691 "dk3pdf.ctr" +#line 3831 "dk3pdf.ctr" return back; } @@ -3673,7 +3791,7 @@ dk3pdf_enumerate_pages(dk3_pdf_writer_job_t *job) unsigned long on; /* Next object number. */ -#line 3705 "dk3pdf.ctr" +#line 3845 "dk3pdf.ctr" on = (job->pdf)->nextobject; dk3sto_it_reset((job->pdf)->i_pages); while((pa = (dk3_pdf_page_t *)dk3sto_it_next((job->pdf)->i_pages)) != NULL) @@ -3697,7 +3815,7 @@ dk3pdf_enumerate_pages(dk3_pdf_writer_job_t *job) (job->pdf)->nextobject = on; -#line 3727 "dk3pdf.ctr" +#line 3867 "dk3pdf.ctr" } @@ -3715,10 +3833,10 @@ dk3pdf_write_file_progress( int back = 0; -#line 3743 "dk3pdf.ctr" +#line 3883 "dk3pdf.ctr" if((pdf) && (ofile)) { -#line 3744 "dk3pdf.ctr" +#line 3884 "dk3pdf.ctr" if(pdf->cp) { dk3pdf_close_page(pdf); } if(dk3pdf_job_init(&job, pdf, ofile)) { back = 1; @@ -3732,15 +3850,15 @@ dk3pdf_write_file_progress( } else { if(!(pdf)) { -#line 3756 "dk3pdf.ctr" +#line 3896 "dk3pdf.ctr" } if(!(ofile)) { -#line 3758 "dk3pdf.ctr" +#line 3898 "dk3pdf.ctr" } } -#line 3760 "dk3pdf.ctr" +#line 3900 "dk3pdf.ctr" return back; } @@ -3752,11 +3870,11 @@ dk3pdf_write_file(dk3_pdf_t *pdf, FILE *ofile) int back; -#line 3770 "dk3pdf.ctr" +#line 3910 "dk3pdf.ctr" back = dk3pdf_write_file_progress(pdf, ofile, NULL, 0, 1000); -#line 3772 "dk3pdf.ctr" +#line 3912 "dk3pdf.ctr" return back; } @@ -3777,7 +3895,7 @@ dk3pdf_write_point(dk3_of_t *of, double x, double y) dk3of_write_c8_string(of, dk3pdf_c8_kw[1]); -#line 3791 "dk3pdf.ctr" +#line 3931 "dk3pdf.ctr" } @@ -3788,7 +3906,7 @@ dk3pdf_newpath_moveto(dk3_pdf_t *pdf, double x, double y) int back = 0; -#line 3800 "dk3pdf.ctr" +#line 3940 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -3799,7 +3917,7 @@ dk3pdf_newpath_moveto(dk3_pdf_t *pdf, double x, double y) } } -#line 3809 "dk3pdf.ctr" +#line 3949 "dk3pdf.ctr" return back; } @@ -3811,7 +3929,7 @@ dk3pdf_lineto(dk3_pdf_t *pdf, double x, double y) int back = 0; -#line 3819 "dk3pdf.ctr" +#line 3959 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -3822,7 +3940,7 @@ dk3pdf_lineto(dk3_pdf_t *pdf, double x, double y) } } -#line 3828 "dk3pdf.ctr" +#line 3968 "dk3pdf.ctr" return back; } @@ -3839,7 +3957,7 @@ dk3pdf_curveto( int back = 0; -#line 3843 "dk3pdf.ctr" +#line 3983 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -3854,7 +3972,7 @@ dk3pdf_curveto( } } -#line 3856 "dk3pdf.ctr" +#line 3996 "dk3pdf.ctr" return back; } @@ -3866,7 +3984,7 @@ dk3pdf_set_nonstroking_gray(dk3_pdf_t *pdf, double g) double ng; /* Corrected gray value. */ -#line 3866 "dk3pdf.ctr" +#line 4006 "dk3pdf.ctr" ng = dk3pdf_to_range(0.0, 1.0, g); if(pdf) { if(pdf->cp) { @@ -3879,7 +3997,7 @@ dk3pdf_set_nonstroking_gray(dk3_pdf_t *pdf, double g) } } -#line 3877 "dk3pdf.ctr" +#line 4017 "dk3pdf.ctr" return back; } @@ -3892,7 +4010,7 @@ dk3pdf_set_stroking_gray(dk3_pdf_t *pdf, double g) double ng; /* Corrected gray value. */ -#line 3888 "dk3pdf.ctr" +#line 4028 "dk3pdf.ctr" ng = dk3pdf_to_range(0.0, 1.0, g); if(pdf) { if(pdf->cp) { @@ -3905,7 +4023,7 @@ dk3pdf_set_stroking_gray(dk3_pdf_t *pdf, double g) } } -#line 3899 "dk3pdf.ctr" +#line 4039 "dk3pdf.ctr" return back; } @@ -3917,7 +4035,7 @@ dk3pdf_closepath_fill_stroke_nz(dk3_pdf_t *pdf) int back = 0; -#line 3909 "dk3pdf.ctr" +#line 4049 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -3927,7 +4045,7 @@ dk3pdf_closepath_fill_stroke_nz(dk3_pdf_t *pdf) } } -#line 3917 "dk3pdf.ctr" +#line 4057 "dk3pdf.ctr" return back; } @@ -3940,7 +4058,7 @@ dk3pdf_closepath_fill_stroke_eo(dk3_pdf_t *pdf) int back = 0; -#line 3928 "dk3pdf.ctr" +#line 4068 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -3950,7 +4068,7 @@ dk3pdf_closepath_fill_stroke_eo(dk3_pdf_t *pdf) } } -#line 3936 "dk3pdf.ctr" +#line 4076 "dk3pdf.ctr" return back; } @@ -3962,7 +4080,7 @@ dk3pdf_closepath(dk3_pdf_t *pdf) int back = 0; -#line 3946 "dk3pdf.ctr" +#line 4086 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -3972,7 +4090,7 @@ dk3pdf_closepath(dk3_pdf_t *pdf) } } -#line 3954 "dk3pdf.ctr" +#line 4094 "dk3pdf.ctr" return back; } @@ -3984,7 +4102,7 @@ dk3pdf_fill_nz(dk3_pdf_t *pdf) int back = 0; -#line 3964 "dk3pdf.ctr" +#line 4104 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -3994,7 +4112,7 @@ dk3pdf_fill_nz(dk3_pdf_t *pdf) } } -#line 3972 "dk3pdf.ctr" +#line 4112 "dk3pdf.ctr" return back; } @@ -4006,7 +4124,7 @@ dk3pdf_fill_eo(dk3_pdf_t *pdf) int back = 0; -#line 3982 "dk3pdf.ctr" +#line 4122 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -4016,7 +4134,7 @@ dk3pdf_fill_eo(dk3_pdf_t *pdf) } } -#line 3990 "dk3pdf.ctr" +#line 4130 "dk3pdf.ctr" return back; } @@ -4028,7 +4146,7 @@ dk3pdf_clip_eo(dk3_pdf_t *pdf) int back = 0; -#line 4000 "dk3pdf.ctr" +#line 4140 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -4038,7 +4156,7 @@ dk3pdf_clip_eo(dk3_pdf_t *pdf) } } -#line 4008 "dk3pdf.ctr" +#line 4148 "dk3pdf.ctr" return back; } @@ -4050,7 +4168,7 @@ dk3pdf_clip_nz(dk3_pdf_t *pdf) int back = 0; -#line 4018 "dk3pdf.ctr" +#line 4158 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -4060,7 +4178,7 @@ dk3pdf_clip_nz(dk3_pdf_t *pdf) } } -#line 4026 "dk3pdf.ctr" +#line 4166 "dk3pdf.ctr" return back; } @@ -4074,7 +4192,7 @@ dk3pdf_nonstroking_rgb(dk3_pdf_t *pdf, double r, double g, double b) double nb; /* Corrected blue. */ -#line 4038 "dk3pdf.ctr" +#line 4178 "dk3pdf.ctr" nr = dk3pdf_to_range(0.0, 1.0, r); ng = dk3pdf_to_range(0.0, 1.0, g); nb = dk3pdf_to_range(0.0, 1.0, b); @@ -4093,7 +4211,7 @@ dk3pdf_nonstroking_rgb(dk3_pdf_t *pdf, double r, double g, double b) } } -#line 4055 "dk3pdf.ctr" +#line 4195 "dk3pdf.ctr" return back; } @@ -4108,7 +4226,7 @@ dk3pdf_stroking_rgb(dk3_pdf_t *pdf, double r, double g, double b) double nb; /* Corrected blue. */ -#line 4068 "dk3pdf.ctr" +#line 4208 "dk3pdf.ctr" nr = dk3pdf_to_range(0.0, 1.0, r); ng = dk3pdf_to_range(0.0, 1.0, g); nb = dk3pdf_to_range(0.0, 1.0, b); @@ -4127,7 +4245,7 @@ dk3pdf_stroking_rgb(dk3_pdf_t *pdf, double r, double g, double b) } } -#line 4085 "dk3pdf.ctr" +#line 4225 "dk3pdf.ctr" return back; } @@ -4139,7 +4257,7 @@ dk3pdf_set_linecap(dk3_pdf_t *pdf, int lc) int back = 0; -#line 4095 "dk3pdf.ctr" +#line 4235 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -4160,7 +4278,7 @@ dk3pdf_set_linecap(dk3_pdf_t *pdf, int lc) } } -#line 4114 "dk3pdf.ctr" +#line 4254 "dk3pdf.ctr" return back; } @@ -4172,7 +4290,7 @@ dk3pdf_set_linejoin(dk3_pdf_t *pdf, int lj) int back = 0; -#line 4124 "dk3pdf.ctr" +#line 4264 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -4193,7 +4311,7 @@ dk3pdf_set_linejoin(dk3_pdf_t *pdf, int lj) } } -#line 4143 "dk3pdf.ctr" +#line 4283 "dk3pdf.ctr" return back; } @@ -4204,7 +4322,7 @@ dk3pdf_stroke(dk3_pdf_t *pdf) int back = 0; -#line 4152 "dk3pdf.ctr" +#line 4292 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -4214,7 +4332,7 @@ dk3pdf_stroke(dk3_pdf_t *pdf) } } -#line 4160 "dk3pdf.ctr" +#line 4300 "dk3pdf.ctr" return back; } @@ -4227,7 +4345,7 @@ dk3pdf_set_linewidth(dk3_pdf_t *pdf, double lw) int back = 0; -#line 4171 "dk3pdf.ctr" +#line 4311 "dk3pdf.ctr" if(pdf) { if(pdf->cp) { if((pdf->cp)->tempof) { @@ -4238,7 +4356,7 @@ dk3pdf_set_linewidth(dk3_pdf_t *pdf, double lw) } } -#line 4180 "dk3pdf.ctr" +#line 4320 "dk3pdf.ctr" return back; } -- cgit v1.2.3