1.1 diff -r 129e16d9b5f4 -r c22e1c0a64fd pdf_prim.h 1.2 --- a/pdf_prim.h Thu Mar 13 03:39:38 2003 +0000 1.3 +++ b/pdf_prim.h Thu Mar 13 06:56:57 2003 +0000 1.4 @@ -4,7 +4,7 @@ 1.5 * will be compressed using ITU-T T.6 (G4) fax encoding. 1.6 * 1.7 * PDF routines 1.8 - * $Id: pdf_prim.h,v 1.8 2003/03/11 23:43:56 eric Exp $ 1.9 + * $Id: pdf_prim.h,v 1.9 2003/03/12 22:56:57 eric Exp $ 1.10 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 1.11 * 1.12 * This program is free software; you can redistribute it and/or modify 1.13 @@ -52,6 +52,11 @@ 1.14 void *app_data); 1.15 1.16 1.17 +/* returns -1 if o1 < 02, 0 if o1 == o2, 1 if o1 > o2 */ 1.18 +/* only works for integer, real, string, and name objects */ 1.19 +int pdf_compare_obj (struct pdf_obj *o1, struct pdf_obj *o2); 1.20 + 1.21 + 1.22 void pdf_set_dict_entry (struct pdf_obj *dict_obj, char *key, struct pdf_obj *val); 1.23 struct pdf_obj *pdf_get_dict_entry (struct pdf_obj *dict_obj, char *key); 1.24 1.25 @@ -59,6 +64,14 @@ 1.26 void pdf_add_array_elem (struct pdf_obj *array_obj, struct pdf_obj *val); 1.27 1.28 1.29 +/* Following is intended for things like ProcSet in which an array object 1.30 + is used to represent a set. Only works if all objects in array, and 1.31 + the element to be added are of scalar types (types that are supported 1.32 + by pdf_compare_obj. Not efficient for large arrays as it does a 1.33 + comaprison to every element. */ 1.34 +void pdf_add_array_elem_unique (struct pdf_obj *array_obj, struct pdf_obj *val); 1.35 + 1.36 + 1.37 /* Create a new object that will NOT be used indirectly */ 1.38 struct pdf_obj *pdf_new_obj (pdf_obj_type type); 1.39 1.40 @@ -88,10 +101,6 @@ 1.41 void pdf_set_real (struct pdf_obj *obj, double val); 1.42 1.43 1.44 -/* returns -1 if o1 < 02, 0 if o1 == o2, 1 if o1 > o2 */ 1.45 -int pdf_compare_obj (struct pdf_obj *o1, struct pdf_obj *o2); 1.46 - 1.47 - 1.48 /* The callback will be called when the stream data is to be written to the 1.49 file. app_data will be passed as an argument to the callback. */ 1.50 struct pdf_obj *pdf_new_stream (pdf_file_handle pdf_file,