file handle properties: Make encoding member const 20121125030503/pspp
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 25 Nov 2012 10:07:44 +0000 (11:07 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 25 Nov 2012 10:07:44 +0000 (11:07 +0100)
This member is never modified.  So declare it as const.  This way it
can be initialised from a static string.

src/data/file-handle-def.h

index 9a60e7242383beb7c6fff28b3ec4b03dcb25365c..53e1bbfb6d6d6631b8bf0b6664b5f7d6585944ff 100644 (file)
@@ -55,7 +55,7 @@ struct fh_properties
     enum fh_mode mode;          /* File mode. */
     size_t record_width;        /* Length of fixed-format records. */
     size_t tab_width;           /* Tab width, 0=do not expand tabs. */
-    char *encoding;             /* Charset for contents. */
+    const char *encoding;       /* Charset for contents. */
   };
 
 void fh_init (void);