wineps: more const strings

Huw D M Davies h.davies1 at physics.ox.ac.uk
Mon Nov 10 12:20:43 CST 2003


        Dmitry Timoshkov <dmitry at codeweavers.com>
        Constify strings.
-- 
Huw Davies
huw at codeweavers.com
Index: dlls/wineps/ppd.c
===================================================================
RCS file: /home/wine/wine/dlls/wineps/ppd.c,v
retrieving revision 1.15
diff -u -r1.15 ppd.c
--- dlls/wineps/ppd.c	5 Nov 2003 00:37:48 -0000	1.15
+++ dlls/wineps/ppd.c	10 Nov 2003 18:19:13 -0000
@@ -42,8 +42,8 @@
 
 /* map of page names in ppd file to Windows paper constants */
 
-static struct {
-  char *PSName;
+static const struct {
+  const char *PSName;
   WORD WinPage;
 } PageTrans[] = {
   {"10x11",                   DMPAPER_10X11},
Index: dlls/wineps/type42.c
===================================================================
RCS file: /home/wine/wine/dlls/wineps/type42.c,v
retrieving revision 1.5
diff -u -r1.5 type42.c
--- dlls/wineps/type42.c	5 Sep 2003 23:08:28 -0000	1.5
+++ dlls/wineps/type42.c	10 Nov 2003 18:19:13 -0000
@@ -140,7 +140,7 @@
     WORD num_of_tables = sizeof(tables_templ) / sizeof(tables_templ[0]) - 1;
     char *buf;
     TYPE42 *t42;
-    char start[] = /* name, fontbbox */
+    const char start[] = /* name, fontbbox */
             "25 dict begin\n"
 	    " /FontName /%s def\n"
 	    " /Encoding 256 array 0 1 255{1 index exch /.notdef put} for\n"
@@ -153,10 +153,10 @@
 	    "  /.notdef 0 def\n"
             " currentdict end def\n"
 	    " /sfnts [\n";
-    char TT_offset_table[] = "<00010000%04x%04x%04x%04x\n";
-    char TT_table_dir_entry[] = "%08lx%08lx%08lx%08lx\n";
-    char storage[] ="]\nhavetype42gdir{pop}{{string} forall}ifelse\n";
-    char end[] = "] def\n"
+    const char TT_offset_table[] = "<00010000%04x%04x%04x%04x\n";
+    const char TT_table_dir_entry[] = "%08lx%08lx%08lx%08lx\n";
+    const char storage[] ="]\nhavetype42gdir{pop}{{string} forall}ifelse\n";
+    const char end[] = "] def\n"
       "havetype42gdir{/GlyphDirectory 256 dict def\n"
       " sfnts 0 get dup %d (x) putinterval %d (x) putinterval}if\n"
       "currentdict end dup /FontName get exch definefont pop\n";
@@ -284,7 +284,7 @@
     WORD awidth;
     short lsb;
 
-    char glyph_def[] = 
+    const char glyph_def[] = 
       "/%s findfont exch 1 index\n"
       "havetype42gdir\n"
       "{/GlyphDirectory get begin %d exch def end}\n"



More information about the wine-patches mailing list