diff options
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfobj.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfobj.c | 220 |
1 files changed, 112 insertions, 108 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c index 3e1982b21ed..493e4c6528e 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.c +++ b/Build/source/texk/dvipdfm-x/pdfobj.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -90,8 +90,8 @@ struct pdf_name struct pdf_array { - unsigned long max; - unsigned long size; + unsigned int max; + unsigned int size; struct pdf_obj **values; }; @@ -106,9 +106,9 @@ struct pdf_stream { struct pdf_obj *dict; unsigned char *stream; - long *objstm_data; /* used for object streams */ - unsigned long stream_length; - unsigned long max_length; + int *objstm_data; /* used for object streams */ + unsigned int stream_length; + unsigned int max_length; unsigned char _flags; }; @@ -116,7 +116,7 @@ struct pdf_indirect { pdf_file *pf; pdf_obj *obj; /* used when PF == NULL */ - unsigned long label; + unsigned label; unsigned short generation; }; @@ -132,9 +132,9 @@ typedef struct pdf_indirect pdf_indirect; static FILE *pdf_output_file = NULL; -static long pdf_output_file_position = 0; -static long pdf_output_line_position = 0; -static long compression_saved = 0; +static int pdf_output_file_position = 0; +static int pdf_output_line_position = 0; +static int compression_saved = 0; #define FORMAT_BUF_SIZE 4096 static char format_buffer[FORMAT_BUF_SIZE]; @@ -142,7 +142,7 @@ static char format_buffer[FORMAT_BUF_SIZE]; typedef struct xref_entry { unsigned char type; /* object storage type */ - unsigned long field2; /* offset in file or object stream */ + unsigned int field2; /* offset in file or object stream */ unsigned short field3; /* generation or index */ pdf_obj *direct; /* used for imported objects */ pdf_obj *indirect; /* used for imported objects */ @@ -150,10 +150,10 @@ typedef struct xref_entry static xref_entry *output_xref; -static unsigned long pdf_max_ind_objects; -static unsigned long next_label; +static unsigned int pdf_max_ind_objects; +static unsigned int next_label; -static unsigned long startxref; +static unsigned int startxref; struct pdf_file { @@ -161,8 +161,8 @@ struct pdf_file pdf_obj *trailer; xref_entry *xref_table; pdf_obj *catalog; - long num_obj; - long file_size; + int num_obj; + int file_size; int version; }; @@ -185,12 +185,12 @@ static void pdf_flush_obj (pdf_obj *object, FILE *file); static void pdf_label_obj (pdf_obj *object); static void pdf_write_obj (pdf_obj *object, FILE *file); -static void set_objstm_data (pdf_obj *objstm, long *data); -static long *get_objstm_data (pdf_obj *objstm); +static void set_objstm_data (pdf_obj *objstm, int *data); +static int *get_objstm_data (pdf_obj *objstm); static void release_objstm (pdf_obj *objstm); static void pdf_out_char (FILE *file, char c); -static void pdf_out (FILE *file, const void *buffer, long length); +static void pdf_out (FILE *file, const void *buffer, int length); static pdf_obj *pdf_new_ref (pdf_obj *object); static void release_indirect (pdf_indirect *data); @@ -275,7 +275,7 @@ static pdf_obj *current_objstm = NULL; static int do_objstm; static void -add_xref_entry (unsigned long label, unsigned char type, unsigned long field2, unsigned short field3) +add_xref_entry (unsigned label, unsigned char type, unsigned int field2, unsigned short field3) { if (label >= pdf_max_ind_objects) { pdf_max_ind_objects = (label/IND_OBJECTS_ALLOC_SIZE+1)*IND_OBJECTS_ALLOC_SIZE; @@ -341,12 +341,12 @@ pdf_out_init (const char *filename, int do_encryption) static void dump_xref_table (void) { - long length; - unsigned long i; + int length; + unsigned int i; pdf_out(pdf_output_file, "xref\n", 5); - length = sprintf(format_buffer, "%d %lu\n", 0, next_label); + length = sprintf(format_buffer, "%d %u\n", 0, next_label); pdf_out(pdf_output_file, format_buffer, length); /* @@ -358,7 +358,7 @@ dump_xref_table (void) unsigned char type = output_xref[i].type; if (type > 1) ERROR("object type %hu not allowed in xref table", type); - length = sprintf(format_buffer, "%010lu %05hu %c \n", + length = sprintf(format_buffer, "%010u %05hu %c \n", output_xref[i].field2, output_xref[i].field3, type ? 'n' : 'f'); pdf_out(pdf_output_file, format_buffer, length); @@ -382,7 +382,7 @@ dump_trailer_dict (void) static void dump_xref_stream (void) { - unsigned long pos, i; + unsigned int pos, i; unsigned poslen; unsigned char buf[7] = {0, 0, 0, 0, 0}; @@ -425,7 +425,7 @@ void pdf_out_flush (void) { if (pdf_output_file) { - long length; + int length; /* Flush current object stream */ if (current_objstm) { @@ -458,7 +458,7 @@ pdf_out_flush (void) RELEASE(output_xref); pdf_out(pdf_output_file, "startxref\n", 10); - length = sprintf(format_buffer, "%lu\n", startxref); + length = sprintf(format_buffer, "%u\n", startxref); pdf_out(pdf_output_file, format_buffer, length); pdf_out(pdf_output_file, "%%EOF\n", 6); @@ -553,7 +553,7 @@ static char xchar[] = "0123456789abcdef"; } while (0) static -void pdf_out (FILE *file, const void *buffer, long length) +void pdf_out (FILE *file, const void *buffer, int length) { if (output_stream && file == pdf_output_file) pdf_add_stream(output_stream, buffer, length); @@ -699,11 +699,11 @@ release_indirect (pdf_indirect *data) static void write_indirect (pdf_indirect *indirect, FILE *file) { - long length; + int length; ASSERT(!indirect->pf); - length = sprintf(format_buffer, "%lu %hu R", indirect->label, indirect->generation); + length = sprintf(format_buffer, "%u %hu R", indirect->label, indirect->generation); pdf_out(file, format_buffer, length); } @@ -1131,7 +1131,7 @@ write_array (pdf_array *array, FILE *file) { pdf_out_char(file, '['); if (array->size > 0) { - unsigned long i; + unsigned int i; int type1 = PDF_UNDEFINED, type2; for (i = 0; i < array->size; i++) { @@ -1149,7 +1149,7 @@ write_array (pdf_array *array, FILE *file) } pdf_obj * -pdf_get_array (pdf_obj *array, long idx) +pdf_get_array (pdf_obj *array, int idx) { pdf_obj *result = NULL; pdf_array *data; @@ -1181,7 +1181,7 @@ pdf_array_length (pdf_obj *array) static void release_array (pdf_array *data) { - unsigned long i; + unsigned int i; if (data->values) { for (i = 0; i < data->size; i++) { @@ -1221,7 +1221,7 @@ void pdf_put_array (pdf_obj *array, unsigned idx, pdf_obj *object) { pdf_array *data; - long i; + int i; TYPECHECK(array, PDF_ARRAY); @@ -1580,8 +1580,12 @@ static void write_stream (pdf_stream *stream, FILE *file) { unsigned char *filtered; - unsigned long filtered_length; - unsigned long buffer_length; + unsigned int filtered_length; +#ifdef HAVE_ZLIB + uLong buffer_length; +#else + unsigned int buffer_length; +#endif unsigned char *buffer; /* @@ -1747,13 +1751,13 @@ pdf_stream_length (pdf_obj *stream) } static void -set_objstm_data (pdf_obj *objstm, long *data) { +set_objstm_data (pdf_obj *objstm, int *data) { TYPECHECK(objstm, PDF_STREAM); ((pdf_stream *) objstm->data)->objstm_data = data; } -static long * +static int * get_objstm_data (pdf_obj *objstm) { TYPECHECK(objstm, PDF_STREAM); @@ -1761,7 +1765,7 @@ get_objstm_data (pdf_obj *objstm) { } void -pdf_add_stream (pdf_obj *stream, const void *stream_data, long length) +pdf_add_stream (pdf_obj *stream, const void *stream_data, int length) { pdf_stream *data; @@ -1781,7 +1785,7 @@ pdf_add_stream (pdf_obj *stream, const void *stream_data, long length) #if HAVE_ZLIB #define WBUF_SIZE 4096 int -pdf_add_stream_flate (pdf_obj *dst, const void *data, long len) +pdf_add_stream_flate (pdf_obj *dst, const void *data, int len) { z_stream z; Bytef wbuf[WBUF_SIZE]; @@ -1883,8 +1887,8 @@ filter_row_TIFF2 (unsigned char *dst, const unsigned char *src, const unsigned char *p = src; unsigned char col[PREDICTOR_TIFF2_MAX_COLORS]; /* bits_per_component < 8 here */ - long mask = (1 << parms->bits_per_component) - 1; - long inbuf, outbuf; /* 2 bytes buffer */ + int mask = (1 << parms->bits_per_component) - 1; + int inbuf, outbuf; /* 2 bytes buffer */ int i, ci, j, k, inbits, outbits; if (parms->colors > PREDICTOR_TIFF2_MAX_COLORS) { @@ -1929,7 +1933,7 @@ filter_row_TIFF2 (unsigned char *dst, const unsigned char *src, * inefficient. */ static int -filter_decoded (pdf_obj *dst, const void *src, long srclen, +filter_decoded (pdf_obj *dst, const void *src, int srclen, struct decode_parms *parms) { const unsigned char *p = (const unsigned char *) src; @@ -1966,9 +1970,9 @@ filter_decoded (pdf_obj *dst, const void *src, long srclen, int b = i - bytes_per_pixel; char hi = b >= 0 ? buf[b] : 0; char lo = b >= 0 ? buf[b + 1] : 0; - long pv = (hi << 8) | lo; - long cv = (p[i] << 8) | p[i + 1]; - long c = pv + cv; + int pv = (hi << 8) | lo; + int cv = (p[i] << 8) | p[i + 1]; + int c = pv + cv; buf[i] = (unsigned char) (c >> 8); buf[i + 1] = (unsigned char) (c & 0xff); } @@ -2069,7 +2073,7 @@ filter_decoded (pdf_obj *dst, const void *src, long srclen, } static int -pdf_add_stream_flate_filtered (pdf_obj *dst, const void *data, long len, struct decode_parms *parms) +pdf_add_stream_flate_filtered (pdf_obj *dst, const void *data, int len, struct decode_parms *parms) { pdf_obj *tmp; z_stream z; @@ -2119,7 +2123,7 @@ int pdf_concat_stream (pdf_obj *dst, pdf_obj *src) { const char *stream_data; - long stream_length; + int stream_length; pdf_obj *stream_dict; pdf_obj *filter; int error = 0; @@ -2273,7 +2277,7 @@ pdf_write_obj (pdf_obj *object, FILE *file) static void pdf_flush_obj (pdf_obj *object, FILE *file) { - long length; + int length; /* * Record file position @@ -2289,10 +2293,10 @@ pdf_flush_obj (pdf_obj *object, FILE *file) pdf_out(file, "\nendobj\n", 8); } -static long +static int pdf_add_objstm (pdf_obj *objstm, pdf_obj *object) { - long *data, pos; + int *data, pos; TYPECHECK(objstm, PDF_STREAM); @@ -2317,12 +2321,12 @@ pdf_add_objstm (pdf_obj *objstm, pdf_obj *object) static void release_objstm (pdf_obj *objstm) { - long *data = get_objstm_data(objstm); - long pos = data[0]; + int *data = get_objstm_data(objstm); + int pos = data[0]; pdf_obj *dict; pdf_stream *stream; unsigned char *old_buf; - unsigned long old_length; + unsigned int old_length; stream = (pdf_stream *) objstm->data; /* Precede stream data by offset table */ @@ -2333,9 +2337,9 @@ release_objstm (pdf_obj *objstm) stream->stream_length = 0; { - long i = 2*pos, *val = data+2; + int i = 2*pos, *val = data+2; while (i--) { - long length = sprintf(format_buffer, "%ld ", *(val++)); + int length = sprintf(format_buffer, "%d ", *(val++)); pdf_add_stream(objstm, format_buffer, length); } } @@ -2374,7 +2378,7 @@ pdf_release_obj (pdf_obj *object) pdf_flush_obj(object, pdf_output_file); else { if (!current_objstm) { - long *data = NEW(2*OBJSTM_MAX_OBJS+2, long); + int *data = NEW(2*OBJSTM_MAX_OBJS+2, int); data[0] = data[1] = 0; current_objstm = pdf_new_stream(STREAM_COMPRESS); set_objstm_data(current_objstm, data); @@ -2444,14 +2448,14 @@ backup_line (FILE *pdf_input_file) return 1; } -static long +static int find_xref (FILE *pdf_input_file) { - long xref_pos; + int xref_pos; int tries = 10; do { - long currentpos; + int currentpos; if (!backup_line(pdf_input_file)) { tries = 0; @@ -2479,7 +2483,7 @@ find_xref (FILE *pdf_input_file) end = start + strlen(work_buffer); skip_white(&start, end); number = parse_number(&start, end); - xref_pos = (long) atof(number); + xref_pos = (int) atof(number); RELEASE(number); } @@ -2521,11 +2525,11 @@ parse_trailer (pdf_file *pf) * is that an object before an xref table will grab the whole table * :-( */ -static long -next_object_offset (pdf_file *pf, unsigned long obj_num) +static int +next_object_offset (pdf_file *pf, unsigned int obj_num) { - long next = pf->file_size; /* Worst case */ - long i, curr; + int next = pf->file_size; /* Worst case */ + int i, curr; curr = pf->xref_table[obj_num].field2; /* Check all other type 1 objects to find next one */ @@ -2544,7 +2548,7 @@ next_object_offset (pdf_file *pf, unsigned long obj_num) ((pf)->xref_table[(n)].type == 2 && !(g)))) pdf_obj * -pdf_new_indirect (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen) +pdf_new_indirect (pdf_file *pf, unsigned obj_num, unsigned short obj_gen) { pdf_obj *result; pdf_indirect *indirect; @@ -2562,10 +2566,10 @@ pdf_new_indirect (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen) } static pdf_obj * -pdf_read_object (unsigned long obj_num, unsigned short obj_gen, - pdf_file *pf, long offset, long limit) +pdf_read_object (unsigned int obj_num, unsigned short obj_gen, + pdf_file *pf, int offset, int limit) { - long length; + int length; char *buffer; const char *p, *endptr; pdf_obj *result; @@ -2587,7 +2591,7 @@ pdf_read_object (unsigned long obj_num, unsigned short obj_gen, { const char *q = p; /* <== p */ char *sp; - unsigned long n, g; + unsigned int n, g; skip_white(&q, endptr); sp = parse_unsigned(&q, endptr); @@ -2639,11 +2643,11 @@ pdf_read_object (unsigned long obj_num, unsigned short obj_gen, } static pdf_obj * -read_objstm (pdf_file *pf, unsigned long num) +read_objstm (pdf_file *pf, unsigned int num) { - unsigned long offset = pf->xref_table[num].field2; + unsigned int offset = pf->xref_table[num].field2; unsigned short gen = pf->xref_table[num].field3; - long limit = next_object_offset(pf, num), n, first, *header = NULL; + int limit = next_object_offset(pf, num), n, first, *header = NULL; char *data = NULL, *q; const char *p, *endptr; int i; @@ -2673,17 +2677,17 @@ read_objstm (pdf_file *pf, unsigned long num) n_obj = pdf_lookup_dict(dict, "N"); if (!PDF_OBJ_NUMBERTYPE(n_obj)) goto error; - n = (long) pdf_number_value(n_obj); + n = (int) pdf_number_value(n_obj); first_obj = pdf_lookup_dict(dict, "First"); if (!PDF_OBJ_NUMBERTYPE(first_obj)) goto error; - first = (long) pdf_number_value(first_obj); + first = (int) pdf_number_value(first_obj); /* reject object streams without object data */ if (first >= pdf_stream_length(objstm)) goto error; - header = NEW(2*(n+1), long); + header = NEW(2*(n+1), int); set_objstm_data(objstm, header); *(header++) = n; *(header++) = first; @@ -2725,7 +2729,7 @@ read_objstm (pdf_file *pf, unsigned long num) * several cross-reference sections. */ static pdf_obj * -pdf_get_object (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen) +pdf_get_object (pdf_file *pf, unsigned int obj_num, unsigned short obj_gen) { pdf_obj *result; @@ -2741,17 +2745,17 @@ pdf_get_object (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen) if (pf->xref_table[obj_num].type == 1) { /* type == 1 */ - unsigned long offset; - long limit; + unsigned int offset; + int limit; offset = pf->xref_table[obj_num].field2; limit = next_object_offset(pf, obj_num); result = pdf_read_object(obj_num, obj_gen, pf, offset, limit); } else { /* type == 2 */ - unsigned long objstm_num = pf->xref_table[obj_num].field2; + unsigned int objstm_num = pf->xref_table[obj_num].field2; unsigned short index = pf->xref_table[obj_num].field3; pdf_obj *objstm; - long *data, n, first, length; + int *data, n, first, length; const char *p, *q; if (objstm_num >= pf->num_obj || @@ -2816,7 +2820,7 @@ pdf_deref_obj (pdf_obj *obj) while (PDF_OBJ_INDIRECTTYPE(obj) && --count) { pdf_file *pf = OBJ_FILE(obj); if (pf) { - unsigned long obj_num = OBJ_NUM(obj); + unsigned int obj_num = OBJ_NUM(obj); unsigned short obj_gen = OBJ_GEN(obj); pdf_release_obj(obj); obj = pdf_get_object(pf, obj_num, obj_gen); @@ -2841,9 +2845,9 @@ pdf_deref_obj (pdf_obj *obj) } static void -extend_xref (pdf_file *pf, long new_size) +extend_xref (pdf_file *pf, int new_size) { - unsigned long i; + unsigned int i; pf->xref_table = RENEW(pf->xref_table, new_size, xref_entry); for (i = pf->num_obj; i < new_size; i++) { @@ -2857,11 +2861,11 @@ extend_xref (pdf_file *pf, long new_size) } static int -parse_xref_table (pdf_file *pf, long xref_pos) +parse_xref_table (pdf_file *pf, int xref_pos) { FILE *pdf_input_file = pf->file; - unsigned long first, size; - unsigned long i, offset; + unsigned int first, size; + unsigned int i, offset; unsigned int obj_gen; char flag; int r; @@ -2880,7 +2884,7 @@ parse_xref_table (pdf_file *pf, long xref_pos) } /* Next line in file has first item and size of table */ for (;;) { - unsigned long current_pos; + unsigned int current_pos; current_pos = tell_position(pdf_input_file); if (mfgets(work_buffer, WORK_BUFFER_SIZE, pdf_input_file) == NULL) { @@ -2898,7 +2902,7 @@ parse_xref_table (pdf_file *pf, long xref_pos) seek_absolute(pdf_input_file, current_pos); break; } - sscanf(work_buffer, "%lu %lu", &first, &size); + sscanf(work_buffer, "%u %u", &first, &size); if (pf->num_obj < first + size) { extend_xref(pf, first + size); } @@ -2913,7 +2917,7 @@ parse_xref_table (pdf_file *pf, long xref_pos) */ work_buffer[19] = 0; offset = 0UL; obj_gen = 0; flag = 0; - r = sscanf(work_buffer, "%010lu %05u %c", &offset, &obj_gen, &flag); + r = sscanf(work_buffer, "%010u %05u %c", &offset, &obj_gen, &flag); if ( r != 3 || ((flag != 'n' && flag != 'f') || (flag == 'n' && @@ -2932,10 +2936,10 @@ parse_xref_table (pdf_file *pf, long xref_pos) return 1; } -static unsigned long -parse_xrefstm_field (const char **p, int length, unsigned long def) +static unsigned int +parse_xrefstm_field (const char **p, int length, unsigned int def) { - unsigned long val = 0; + unsigned int val = 0; if (!length) return def; @@ -2950,9 +2954,9 @@ parse_xrefstm_field (const char **p, int length, unsigned long def) static int parse_xrefstm_subsec (pdf_file *pf, - const char **p, long *length, + const char **p, int *length, int *W, int wsum, - long first, long size) { + int first, int size) { xref_entry *e; if ((*length -= wsum*size) < 0) @@ -2964,7 +2968,7 @@ parse_xrefstm_subsec (pdf_file *pf, e = pf->xref_table + first; while (size--) { unsigned char type; - unsigned long field2; + unsigned int field2; unsigned short field3; type = (unsigned char) parse_xrefstm_field(p, W[0], 1); @@ -2976,7 +2980,7 @@ parse_xrefstm_subsec (pdf_file *pf, return -1; #endif - field2 = (unsigned long) parse_xrefstm_field(p, W[1], 0); + field2 = (unsigned int) parse_xrefstm_field(p, W[1], 0); field3 = (unsigned short) parse_xrefstm_field(p, W[2], 0); if (!e->field2) { @@ -2991,11 +2995,11 @@ parse_xrefstm_subsec (pdf_file *pf, } static int -parse_xref_stream (pdf_file *pf, long xref_pos, pdf_obj **trailer) +parse_xref_stream (pdf_file *pf, int xref_pos, pdf_obj **trailer) { pdf_obj *xrefstm, *size_obj, *W_obj, *index_obj; - unsigned long size; - long length; + unsigned int size; + int length; int W[3], i, wsum = 0; const char *p; @@ -3016,7 +3020,7 @@ parse_xref_stream (pdf_file *pf, long xref_pos, pdf_obj **trailer) size_obj = pdf_lookup_dict(*trailer, "Size"); if (!PDF_OBJ_NUMBERTYPE(size_obj)) goto error; - size = (unsigned long) pdf_number_value(size_obj); + size = (unsigned int) pdf_number_value(size_obj); length = pdf_stream_length(xrefstm); @@ -3047,8 +3051,8 @@ parse_xref_stream (pdf_file *pf, long xref_pos, pdf_obj **trailer) if (!PDF_OBJ_NUMBERTYPE(first) || !PDF_OBJ_NUMBERTYPE(size_obj) || parse_xrefstm_subsec(pf, &p, &length, W, wsum, - (long) pdf_number_value(first), - (long) pdf_number_value(size_obj))) + (int) pdf_number_value(first), + (int) pdf_number_value(size_obj))) goto error; } } else if (parse_xrefstm_subsec(pf, &p, &length, W, wsum, 0, size)) @@ -3077,7 +3081,7 @@ static pdf_obj * read_xref (pdf_file *pf) { pdf_obj *trailer = NULL, *main_trailer = NULL; - long xref_pos; + int xref_pos; if (!(xref_pos = find_xref(pf->file))) goto error; @@ -3099,7 +3103,7 @@ read_xref (pdf_file *pf) if ((xrefstm = pdf_lookup_dict(trailer, "XRefStm"))) { pdf_obj *new_trailer = NULL; if (PDF_OBJ_NUMBERTYPE(xrefstm) && - parse_xref_stream(pf, (long) pdf_number_value(xrefstm), + parse_xref_stream(pf, (int) pdf_number_value(xrefstm), &new_trailer)) pdf_release_obj(new_trailer); else @@ -3119,7 +3123,7 @@ read_xref (pdf_file *pf) if ((prev = pdf_lookup_dict(trailer, "Prev"))) { if (PDF_OBJ_NUMBERTYPE(prev)) - xref_pos = (long) pdf_number_value(prev); + xref_pos = (int) pdf_number_value(prev); else goto error; } else @@ -3170,7 +3174,7 @@ pdf_file_new (FILE *file) static void pdf_file_free (pdf_file *pf) { - unsigned long i; + unsigned int i; if (!pf) { return; @@ -3355,7 +3359,7 @@ static pdf_obj * pdf_import_indirect (pdf_obj *object) { pdf_file *pf = OBJ_FILE(object); - unsigned long obj_num = OBJ_NUM(object); + unsigned int obj_num = OBJ_NUM(object); unsigned short obj_gen = OBJ_GEN(object); pdf_obj *ref; |