[gs-cvs] rev 8621 - in trunk/gs: src toolbin

ken at ghostscript.com ken at ghostscript.com
Fri Apr 4 01:39:34 PDT 2008


Author: ken
Date: 2008-04-04 01:39:33 -0700 (Fri, 04 Apr 2008)
New Revision: 8621

Modified:
   trunk/gs/src/gdevpdtb.c
   trunk/gs/src/gdevpdtf.h
   trunk/gs/src/gdevpdtv.c
   trunk/gs/src/gdevpdtv.h
   trunk/gs/src/gscedata.c
   trunk/gs/src/gscedata.h
   trunk/gs/toolbin/encs2c.ps
Log:
Fix (pdfwrite): code tidy up.

Details:
Bug #689712 "macro expanded unnecessarily and undocumented .h file".

No functional changes, merely code reordering and tidying up.

(encs2c.ps) Modified to write the current license boilerplate and a
 small additional comment referring developers to this file should they
 wish to modify the generated files. Modify the output to gdevpdtv.c
 to #include gdevpdtv.h.

(gscedata.h)
(gscedata.c)
(gdevpdtv.c)
(gdevpdtv.h) Update with output from modified encs2c.ps

(gdevpdtf.h) Remove the 'gs_private_st_basic..' macro, thus preventing
  its unnecessary expansion and inclusion in several .c files.

(gdevpdtb.c) Move the macro 'gs_private_st_basic(st_pdf_base_font...'
  into this module, where it is actually used.

EXPECTED DIFFERENCES:
None.


Modified: trunk/gs/src/gdevpdtb.c
===================================================================
--- trunk/gs/src/gdevpdtb.c	2008-04-04 01:02:17 UTC (rev 8620)
+++ trunk/gs/src/gdevpdtb.c	2008-04-04 08:39:33 UTC (rev 8621)
@@ -43,6 +43,8 @@
 /* ---------------- Private ---------------- */
 
 private_st_pdf_base_font();
+gs_private_st_basic(st_pdf_base_font, pdf_base_font_t, "pdf_base_font_t",\
+		    pdf_base_font_ptrs, pdf_base_font_data);
 
 #define SUBSET_PREFIX_SIZE 7	/* XXXXXX+ */
 

Modified: trunk/gs/src/gdevpdtf.h
===================================================================
--- trunk/gs/src/gdevpdtf.h	2008-04-04 01:02:17 UTC (rev 8620)
+++ trunk/gs/src/gdevpdtf.h	2008-04-04 08:39:33 UTC (rev 8621)
@@ -185,8 +185,6 @@
     GC_OBJ_ELT(pdf_base_font_t, FontFile),\
     GC_STRING_ELT(pdf_base_font_t, font_name)\
 };\
-gs_private_st_basic(st_pdf_base_font, pdf_base_font_t, "pdf_base_font_t",\
-		    pdf_base_font_ptrs, pdf_base_font_data);
 
 
 typedef struct {

Modified: trunk/gs/src/gdevpdtv.c
===================================================================
--- trunk/gs/src/gdevpdtv.c	2008-04-04 01:02:17 UTC (rev 8620)
+++ trunk/gs/src/gdevpdtv.c	2008-04-04 08:39:33 UTC (rev 8621)
@@ -10,9 +10,21 @@
    or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
    San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
 */
-
+/*
+ * This file contains substantial parts of toolbin/encs2c.ps,
+ * which generated the remainder of the file mechanically from
+ *   gs_std_e.ps  gs_il1_e.ps  gs_sym_e.ps  gs_dbt_e.ps
+ *   gs_wan_e.ps  gs_mro_e.ps  gs_mex_e.ps  gs_mgl_e.ps
+ *   gs_lgo_e.ps  gs_lgx_e.ps  gs_css_e.ps
+ *
+ * This source file is maintained manually under source code control,
+ * however its content should be regenerated by using encs2c.ps
+ * if changes are required.
+ */
 /* $Id$ */
 
+#include "gdevpdtv.h"
+
 /*
  * Glyph attributes for every glyph <= GS_C_PDF_MAX_GOOD_GLYPH
  * packed 4 per byte least significant bits first.

Modified: trunk/gs/src/gdevpdtv.h
===================================================================
--- trunk/gs/src/gdevpdtv.h	2008-04-04 01:02:17 UTC (rev 8620)
+++ trunk/gs/src/gdevpdtv.h	2008-04-04 08:39:33 UTC (rev 8621)
@@ -10,7 +10,17 @@
    or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
    San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
 */
-
+/*
+ * This file contains substantial parts of toolbin/encs2c.ps,
+ * which generated the remainder of the file mechanically from
+ *   gs_std_e.ps  gs_il1_e.ps  gs_sym_e.ps  gs_dbt_e.ps
+ *   gs_wan_e.ps  gs_mro_e.ps  gs_mex_e.ps  gs_mgl_e.ps
+ *   gs_lgo_e.ps  gs_lgx_e.ps  gs_css_e.ps
+ *
+ * This source file is maintained manually under source code control,
+ * however its content should be regenerated by using encs2c.ps
+ * if changes are required.
+ */
 /* $Id$ */
 
 #ifndef gdevpdtv_INCLUDED

Modified: trunk/gs/src/gscedata.c
===================================================================
--- trunk/gs/src/gscedata.c	2008-04-04 01:02:17 UTC (rev 8620)
+++ trunk/gs/src/gscedata.c	2008-04-04 08:39:33 UTC (rev 8621)
@@ -10,7 +10,17 @@
    or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
    San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
 */
-
+/*
+ * This file contains substantial parts of toolbin/encs2c.ps,
+ * which generated the remainder of the file mechanically from
+ *   gs_std_e.ps  gs_il1_e.ps  gs_sym_e.ps  gs_dbt_e.ps
+ *   gs_wan_e.ps  gs_mro_e.ps  gs_mex_e.ps  gs_mgl_e.ps
+ *   gs_lgo_e.ps  gs_lgx_e.ps  gs_css_e.ps
+ *
+ * This source file is maintained manually under source code control,
+ * however its content should be regenerated by using encs2c.ps
+ * if changes are required.
+ */
 /* $Id$ */
 
 #include "stdpre.h"

Modified: trunk/gs/src/gscedata.h
===================================================================
--- trunk/gs/src/gscedata.h	2008-04-04 01:02:17 UTC (rev 8620)
+++ trunk/gs/src/gscedata.h	2008-04-04 08:39:33 UTC (rev 8621)
@@ -10,7 +10,17 @@
    or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
    San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
 */
-
+/*
+ * This file contains substantial parts of toolbin/encs2c.ps,
+ * which generated the remainder of the file mechanically from
+ *   gs_std_e.ps  gs_il1_e.ps  gs_sym_e.ps  gs_dbt_e.ps
+ *   gs_wan_e.ps  gs_mro_e.ps  gs_mex_e.ps  gs_mgl_e.ps
+ *   gs_lgo_e.ps  gs_lgx_e.ps  gs_css_e.ps
+ *
+ * This source file is maintained manually under source code control,
+ * however its content should be regenerated by using encs2c.ps
+ * if changes are required.
+ */
 /* $Id$ */
 
 #ifndef gscedata_INCLUDED

Modified: trunk/gs/toolbin/encs2c.ps
===================================================================
--- trunk/gs/toolbin/encs2c.ps	2008-04-04 01:02:17 UTC (rev 8620)
+++ trunk/gs/toolbin/encs2c.ps	2008-04-04 08:39:33 UTC (rev 8621)
@@ -219,6 +219,7 @@
 } bind def
 
 /write_glyph_table {
+  (#include "gdevpdtv.h") = () =
   calc_glyph_table
   (/*) =
   ( * Glyph attributes for every glyph <= GS_C_PDF_MAX_GOOD_GLYPH) =
@@ -315,20 +316,31 @@
 } loop pop def
 
 % Write the initial boilerplate.
+(/* Copyright (C) 2001-2006 Artifex Software, Inc.) =
+(   All Rights Reserved.) =
+(  ) =
+(   This software is provided AS-IS with no warranty, either express or) =
+(   implied.) =
+() =
+(   This software is distributed under license and may not be copied, modified) =
+(   or distributed except as expressly authorized under the terms of that) =
+(   license.  Refer to licensing information at http://www.artifex.com/) =
+(   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,) =
+(   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.) =
+(*/) =
+
 (/*) =
-( * Copyright (C) 2002 Artifex Software, Inc.  All rights reserved.) =
-( * See toolbin/encs2c.ps for the complete license notice.) =
-( *) =
-
-% Break up the next line to prevent RCS from substituting in it.
-( * $) print (Id: ) print O print ( $) =
-( *) =
 ( * This file contains substantial parts of toolbin/encs2c.ps,) =
 ( * which generated the remainder of the file mechanically from) =
 encfiles {
   ( * ) print { (  ) print print } forall () =
 } forall
+( *) =
+( * This source file is maintained manually under source code control,) =
+( * however its content should be regenerated by using encs2c.ps) =
+( * if changes are required.) =
 ( */) =
+(/* $) print (Id: ) print O print ( $) print ( */) =
 () =
 
 <<



More information about the gs-cvs mailing list