GNU standards require "file name" instead of "filename" in
[pspp-builds.git] / src / message.c
index c48b08e8b133b0acf029833a0522998b5bbdffee..e6a8f76b11f346e96355053d8a0dc6b9bfea8e4d 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <libpspp/alloc.h>
-#include <data/filename.h>
+#include <data/file-name.h>
 #include <language/line-buffer.h>
 #include <language/lexer/lexer.h>
 #include <data/settings.h>
@@ -145,7 +145,7 @@ err_vmsg (const struct error *e, const char *format, va_list args)
   enum
     {
       ERR_IN_PROCEDURE = 01,   /* 1=Display name of current procedure. */
-      ERR_WITH_FILE = 02,      /* 1=Display filename and line number. */
+      ERR_WITH_FILE = 02,      /* 1=Display file name and line number. */
     };
 
   /* Describes one class of error. */
@@ -176,9 +176,9 @@ err_vmsg (const struct error *e, const char *format, va_list args)
   assert (format != NULL);
   
   ds_init (&msg, 64);
-  if (e->where.filename && (error_classes[e->class].flags & ERR_WITH_FILE))
+  if (e->where.file_name && (error_classes[e->class].flags & ERR_WITH_FILE))
     {
-      ds_printf (&msg, "%s:", e->where.filename);
+      ds_printf (&msg, "%s:", e->where.file_name);
       if (e->where.line_number != -1)
        ds_printf (&msg, "%d:", e->where.line_number);
       ds_putc (&msg, ' ');
@@ -243,8 +243,8 @@ compulsory_break(int c)
 static inline int
 char_is_break (int quote, int c)
 {
-  return ((quote && c == DIR_SEPARATOR)
-         || (!quote && (isspace (c) || c == '-' || c == '/'))); 
+  return ((quote && c == '/')
+          || (!quote && (isspace (c) || c == '-' || c == '/'))); 
 }
 
 /* Returns 1 if C is a break character where the break should be made