moved pdf_new_XObject() from pdf_g4.c to pdf_prim.c.

Wed, 12 Mar 2003 07:43:56 +0000

author
eric
date
Wed, 12 Mar 2003 07:43:56 +0000
changeset 101
385a2f77a5d8
parent 100
5916a95e2b92
child 102
f6c042f4dadb

moved pdf_new_XObject() from pdf_g4.c to pdf_prim.c.

pdf_g4.c file | annotate | diff | revisions
pdf_prim.c file | annotate | diff | revisions
pdf_prim.h file | annotate | diff | revisions
     1.1 --- a/pdf_g4.c	Wed Mar 12 07:38:57 2003 +0000
     1.2 +++ b/pdf_g4.c	Wed Mar 12 07:43:56 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_g4.c,v 1.10 2003/03/11 23:38:57 eric Exp $
     1.8 + * $Id: pdf_g4.c,v 1.11 2003/03/11 23:43:56 eric Exp $
     1.9   * Copyright 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,24 +52,6 @@
    1.13  };
    1.14  
    1.15  
    1.16 -char pdf_new_XObject (pdf_page_handle pdf_page, struct pdf_obj *ind_ref)
    1.17 -{
    1.18 -  char XObject_name [4] = "Im ";
    1.19 -
    1.20 -  XObject_name [2] = ++pdf_page->last_XObject_name;
    1.21 -  
    1.22 -  if (! pdf_page->XObject_dict)
    1.23 -    {
    1.24 -      pdf_page->XObject_dict = pdf_new_obj (PT_DICTIONARY);
    1.25 -      pdf_set_dict_entry (pdf_page->resources, "XObject", pdf_page->XObject_dict);
    1.26 -    }
    1.27 -
    1.28 -  pdf_set_dict_entry (pdf_page->XObject_dict, & XObject_name [0], ind_ref);
    1.29 -
    1.30 -  return (pdf_page->last_XObject_name);
    1.31 -}
    1.32 -
    1.33 -
    1.34  void pdf_write_g4_content_callback (pdf_file_handle pdf_file,
    1.35  				    struct pdf_obj *stream,
    1.36  				    void *app_data)
     2.1 --- a/pdf_prim.c	Wed Mar 12 07:38:57 2003 +0000
     2.2 +++ b/pdf_prim.c	Wed Mar 12 07:43:56 2003 +0000
     2.3 @@ -4,7 +4,7 @@
     2.4   *      will be compressed using ITU-T T.6 (G4) fax encoding.
     2.5   *
     2.6   * PDF routines
     2.7 - * $Id: pdf_prim.c,v 1.8 2003/03/10 01:49:50 eric Exp $
     2.8 + * $Id: pdf_prim.c,v 1.9 2003/03/11 23:43:56 eric Exp $
     2.9   * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com>
    2.10   *
    2.11   * This program is free software; you can redistribute it and/or modify
    2.12 @@ -597,3 +597,22 @@
    2.13  }
    2.14  
    2.15  
    2.16 +/* this isn't really a PDF primitive data type */
    2.17 +char pdf_new_XObject (pdf_page_handle pdf_page, struct pdf_obj *ind_ref)
    2.18 +{
    2.19 +  char XObject_name [4] = "Im ";
    2.20 +
    2.21 +  XObject_name [2] = ++pdf_page->last_XObject_name;
    2.22 +  
    2.23 +  if (! pdf_page->XObject_dict)
    2.24 +    {
    2.25 +      pdf_page->XObject_dict = pdf_new_obj (PT_DICTIONARY);
    2.26 +      pdf_set_dict_entry (pdf_page->resources, "XObject", pdf_page->XObject_dict);
    2.27 +    }
    2.28 +
    2.29 +  pdf_set_dict_entry (pdf_page->XObject_dict, & XObject_name [0], ind_ref);
    2.30 +
    2.31 +  return (pdf_page->last_XObject_name);
    2.32 +}
    2.33 +
    2.34 +
     3.1 --- a/pdf_prim.h	Wed Mar 12 07:38:57 2003 +0000
     3.2 +++ b/pdf_prim.h	Wed Mar 12 07:43:56 2003 +0000
     3.3 @@ -4,7 +4,7 @@
     3.4   *      will be compressed using ITU-T T.6 (G4) fax encoding.
     3.5   *
     3.6   * PDF routines
     3.7 - * $Id: pdf_prim.h,v 1.7 2003/03/10 01:49:50 eric Exp $
     3.8 + * $Id: pdf_prim.h,v 1.8 2003/03/11 23:43:56 eric Exp $
     3.9   * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com>
    3.10   *
    3.11   * This program is free software; you can redistribute it and/or modify
    3.12 @@ -137,3 +137,7 @@
    3.13  
    3.14  /* Write the cross reference table, and return the maximum object number */
    3.15  unsigned long pdf_write_xref (pdf_file_handle pdf_file);
    3.16 +
    3.17 +
    3.18 +/* this isn't really a PDF primitive data type */
    3.19 +char pdf_new_XObject (pdf_page_handle pdf_page, struct pdf_obj *ind_ref);