X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Ffile-handle-def.c;h=2d69e2586d256a320ac1f47a1fb230669d45281b;hb=bc19562deb692e6db3271eb0402e9f9c99e4cbcb;hp=beba83d4fba60602d270a0c91bb7ff3c226acf5c;hpb=58d0bff829516ccbc159857674e61e813962b1d8;p=pspp-builds.git diff --git a/src/data/file-handle-def.c b/src/data/file-handle-def.c index beba83d4..2d69e258 100644 --- a/src/data/file-handle-def.c +++ b/src/data/file-handle-def.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -233,7 +234,7 @@ fh_create_file (const char *id, const char *file_name, char *handle_name; struct file_handle *handle; - handle_name = id != NULL ? xstrdup (id) : xasprintf ("\"%s\"", file_name); + handle_name = id != NULL ? xstrdup (id) : xasprintf ("`%s'", file_name); handle = create_handle (id, handle_name, FH_REF_FILE); handle->file_name = xstrdup (file_name); handle->mode = properties->mode; @@ -260,7 +261,7 @@ const struct fh_properties * fh_default_properties (void) { static const struct fh_properties default_properties - = {FH_MODE_TEXT, 1024, 4, LEGACY_NATIVE}; + = {FH_MODE_TEXT, 1024, 4, C_ENCODING}; return &default_properties; } @@ -333,7 +334,7 @@ const char * fh_get_legacy_encoding (const struct file_handle *handle) { assert (handle->referent & (FH_REF_FILE | FH_REF_INLINE)); - return (handle->referent == FH_REF_FILE ? handle->encoding : LEGACY_NATIVE); + return (handle->referent == FH_REF_FILE ? handle->encoding : C_ENCODING); } /* Returns the scratch file handle associated with HANDLE.