X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Ffile-name.c;h=184a79aa4f79ae1b7e1c40de95a414e0922655da;hb=b7479c9a558c9d46c5685724b0a67f8ba2e7956c;hp=1c47b4751bd2cff865709fb000e02b20bc47838c;hpb=d6cbbc8d634fa91f050661355139a4e4697e99ab;p=pspp diff --git a/src/data/file-name.c b/src/data/file-name.c index 1c47b4751b..184a79aa4f 100644 --- a/src/data/file-name.c +++ b/src/data/file-name.c @@ -36,7 +36,6 @@ #include "libpspp/version.h" #include "gl/dirname.h" -#include "gl/dosname.h" #include "gl/intprops.h" #include "gl/minmax.h" #include "gl/relocatable.h" @@ -99,9 +98,9 @@ fn_search_path (const char *base_name, char **path) file = xasprintf ("%s/%s", dir, base_name); struct stat temp; - if (( (stat (file, &temp) == 0 ) && ( ! S_ISDIR (temp.st_mode) ))) + if (((stat (file, &temp) == 0) && (! S_ISDIR (temp.st_mode)))) return file; - + free (file); } @@ -116,7 +115,7 @@ fn_exists (const struct file_handle *fh) { const char *name = fh_get_file_name (fh); struct stat temp; - if ( stat (name, &temp) != 0 ) + if (stat (name, &temp) != 0) return false; return ! S_ISDIR (temp.st_mode); @@ -199,9 +198,9 @@ fn_open (const struct file_handle *fh, const char *mode) free (ss); return fp; } -#else +#else return fopen (fn, mode); -#endif +#endif } /* Counterpart to fn_open that closes file F with name FN; returns 0 @@ -236,7 +235,7 @@ default_output_path (void) { static char *path = NULL; - if ( path == NULL) + if (path == NULL) { /* Windows NT defines HOMEDRIVE and HOMEPATH. But give preference to HOME, because the user can change HOME. */