pdf_prim.h

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