pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src ChangeLog message.c data/casefile.c da...


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src ChangeLog message.c data/casefile.c da...
Date: Tue, 25 Apr 2006 00:41:13 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Branch:         
Changes by:     Ben Pfaff <address@hidden>      06/04/25 00:41:12

Modified files:
        src            : ChangeLog message.c 
        src/data       : casefile.c data-in.c por-file-reader.c 
                         sys-file-reader.c 
        src/language   : command.c line-buffer.c 
        src/language/data-io: data-list.c data-reader.c 
        src/language/expressions: helpers.c 
        src/libpspp    : ChangeLog message.h 
        src/ui/gui     : message-dialog.c 
        src/ui/terminal: main.c 

Log message:
        Continue reforming error message support.  In this phase, rename
        all the message functions and types to start with "msg", except
        for the ones that will be moving to other modules anyway.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/ChangeLog.diff?tr1=1.274&tr2=1.275&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/message.c.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/casefile.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/data-in.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/por-file-reader.c.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/sys-file-reader.c.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/command.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/line-buffer.c.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/data-io/data-list.c.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/data-io/data-reader.c.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/expressions/helpers.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/libpspp/ChangeLog.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/libpspp/message.h.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/ui/gui/message-dialog.c.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/ui/terminal/main.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: pspp/src/ChangeLog
diff -u pspp/src/ChangeLog:1.274 pspp/src/ChangeLog:1.275
--- pspp/src/ChangeLog:1.274    Mon Apr 24 21:13:34 2006
+++ pspp/src/ChangeLog  Tue Apr 25 00:41:12 2006
@@ -1,3 +1,17 @@
+Mon Apr 24 17:40:08 2006  Ben Pfaff  <address@hidden>
+
+       Continue reforming error message support.  In this phase, rename
+       all the message functions and types to start with "msg", except
+       for the ones that will be moving to other modules anyway.
+
+       All references to the identifiers below were updated likewise.
+       
+       * message.c: (err_done) Renamed msg_done().
+       (err_push_file_locator) Renamed msg_push_msg_locator().
+       (err_pop_file_locator) Renamed msg_pop_msg_locator().
+       (err_location) Renamed msg_location().
+       (err_set_command_name) Renamed msg_set_command_name().
+
 Mon Apr 24 14:11:33 2006  Ben Pfaff  <address@hidden>
 
        * message.c: Use exit.h from gnulib instead of checking for and
Index: pspp/src/data/casefile.c
diff -u pspp/src/data/casefile.c:1.6 pspp/src/data/casefile.c:1.7
--- pspp/src/data/casefile.c:1.6        Mon Apr 24 05:10:00 2006
+++ pspp/src/data/casefile.c    Tue Apr 25 00:41:12 2006
@@ -733,18 +733,18 @@
 {
   if (cf->ok) 
     {
-      struct error e;
+      struct msg m;
       va_list args;
 
-      e.category = MSG_GENERAL;
-      e.severity = MSG_ERROR;
-      e.where.file_name = NULL;
-      e.where.line_number = -1;
+      m.category = MSG_GENERAL;
+      m.severity = MSG_ERROR;
+      m.where.file_name = NULL;
+      m.where.line_number = -1;
       va_start (args, format);
-      e.text = xvasprintf (format, args);
+      m.text = xvasprintf (format, args);
       va_end (args);
       
-      err_msg (&e);
+      msg_emit (&m);
     }
   cf->ok = false;
 }
Index: pspp/src/data/data-in.c
diff -u pspp/src/data/data-in.c:1.6 pspp/src/data/data-in.c:1.7
--- pspp/src/data/data-in.c:1.6 Mon Apr 24 05:10:00 2006
+++ pspp/src/data/data-in.c     Tue Apr 25 00:41:12 2006
@@ -48,7 +48,7 @@
 static void
 vdls_error (const struct data_in *i, const char *format, va_list args)
 {
-  struct error e;
+  struct msg m;
   struct string text;
 
   if (i->flags & DI_IGNORE_ERROR)
@@ -62,12 +62,12 @@
   ds_printf (&text, _(", field type %s) "), fmt_to_string (&i->format));
   ds_vprintf (&text, format, args);
 
-  e.category = MSG_DATA;
-  e.severity = MSG_ERROR;
-  err_location (&e.where);
-  e.text = ds_c_str (&text);
+  m.category = MSG_DATA;
+  m.severity = MSG_ERROR;
+  msg_location (&m.where);
+  m.text = ds_c_str (&text);
 
-  err_msg (&e);
+  msg_emit (&m);
 }
 
 static void
Index: pspp/src/data/por-file-reader.c
diff -u pspp/src/data/por-file-reader.c:1.8 pspp/src/data/por-file-reader.c:1.9
--- pspp/src/data/por-file-reader.c:1.8 Mon Apr 24 05:10:00 2006
+++ pspp/src/data/por-file-reader.c     Tue Apr 25 00:41:12 2006
@@ -85,7 +85,7 @@
 static void
 error (struct pfm_reader *r, const char *msg, ...)
 {
-  struct error e;
+  struct msg m;
   struct string text;
   va_list args;
 
@@ -96,13 +96,13 @@
   ds_vprintf (&text, msg, args);
   va_end (args);
 
-  e.category = MSG_GENERAL;
-  e.severity = MSG_ERROR;
-  e.where.file_name = NULL;
-  e.where.line_number = 0;
-  e.text = ds_c_str (&text);
+  m.category = MSG_GENERAL;
+  m.severity = MSG_ERROR;
+  m.where.file_name = NULL;
+  m.where.line_number = 0;
+  m.text = ds_c_str (&text);
   
-  err_msg (&e);
+  msg_emit (&m);
 
   r->ok = false;
 
Index: pspp/src/data/sys-file-reader.c
diff -u pspp/src/data/sys-file-reader.c:1.11 
pspp/src/data/sys-file-reader.c:1.12
--- pspp/src/data/sys-file-reader.c:1.11        Mon Apr 24 05:10:00 2006
+++ pspp/src/data/sys-file-reader.c     Tue Apr 25 00:41:12 2006
@@ -123,7 +123,7 @@
 static void
 corrupt_msg (int class, const char *format,...)
 {
-  struct error e;
+  struct msg m;
   va_list args;
   struct string text;
 
@@ -132,13 +132,13 @@
   ds_vprintf (&text, format, args);
   va_end (args);
 
-  e.category = msg_class_to_category (class);
-  e.severity = msg_class_to_severity (class);
-  e.where.file_name = NULL;
-  e.where.line_number = 0;
-  e.text = ds_c_str (&text);
+  m.category = msg_class_to_category (class);
+  m.severity = msg_class_to_severity (class);
+  m.where.file_name = NULL;
+  m.where.line_number = 0;
+  m.text = ds_c_str (&text);
 
-  err_msg (&e);
+  msg_emit (&m);
 }
 
 /* Closes a system file after we're done with it. */
Index: pspp/src/language/command.c
diff -u pspp/src/language/command.c:1.4 pspp/src/language/command.c:1.5
--- pspp/src/language/command.c:1.4     Tue Mar 21 00:33:05 2006
+++ pspp/src/language/command.c Tue Apr 25 00:41:12 2006
@@ -241,10 +241,10 @@
     int result;
     
     /* Call the command dispatcher. */
-    err_set_command_name (cp->name);
+    msg_set_command_name (cp->name);
     tab_set_command_name (cp->name);
     result = cp->func ();
-    err_set_command_name (NULL);
+    msg_set_command_name (NULL);
     tab_set_command_name (NULL);
     
     /* Perform the state transition if the command completed
Index: pspp/src/language/data-io/data-list.c
diff -u pspp/src/language/data-io/data-list.c:1.8 
pspp/src/language/data-io/data-list.c:1.9
--- pspp/src/language/data-io/data-list.c:1.8   Mon Apr 24 05:10:00 2006
+++ pspp/src/language/data-io/data-list.c       Tue Apr 25 00:41:12 2006
@@ -2065,7 +2065,7 @@
 static void
 rpd_msg (enum msg_class class, const char *format, ...)
 {
-  struct error e;
+  struct msg m;
   va_list args;
   struct string text;
 
@@ -2074,11 +2074,11 @@
   ds_vprintf (&text, format, args);
   va_end (args);
 
-  e.category = msg_class_to_category (class);
-  e.severity = msg_class_to_severity (class);
-  e.where.file_name = NULL;
-  e.where.line_number = 0;
-  e.text = ds_c_str (&text);
+  m.category = msg_class_to_category (class);
+  m.severity = msg_class_to_severity (class);
+  m.where.file_name = NULL;
+  m.where.line_number = 0;
+  m.text = ds_c_str (&text);
 
-  err_msg (&e);
+  msg_emit (&m);
 }
Index: pspp/src/language/data-io/data-reader.c
diff -u pspp/src/language/data-io/data-reader.c:1.7 
pspp/src/language/data-io/data-reader.c:1.8
--- pspp/src/language/data-io/data-reader.c:1.7 Mon Apr 17 01:54:15 2006
+++ pspp/src/language/data-io/data-reader.c     Tue Apr 25 00:41:12 2006
@@ -50,7 +50,7 @@
 struct dfm_reader
   {
     struct file_handle *fh;     /* File handle. */
-    struct file_locator where;  /* Current location in data file. */
+    struct msg_locator where;   /* Current location in data file. */
     struct string line;         /* Current line. */
     struct string scratch;      /* Extra line buffer. */
     enum dfm_reader_flags flags; /* Zero or more of DFM_*. */
@@ -392,7 +392,7 @@
 dfm_push (struct dfm_reader *r)
 {
   if (r->fh != fh_inline_file ())
-    err_push_file_locator (&r->where);
+    msg_push_msg_locator (&r->where);
 }
 
 /* Pops the file name and line number from the fn/ln stack. */
@@ -400,7 +400,7 @@
 dfm_pop (struct dfm_reader *r)
 {
   if (r->fh != fh_inline_file ())
-    err_pop_file_locator (&r->where);
+    msg_pop_msg_locator (&r->where);
 }
 
 /* BEGIN DATA...END DATA procedure. */
Index: pspp/src/language/expressions/helpers.c
diff -u pspp/src/language/expressions/helpers.c:1.4 
pspp/src/language/expressions/helpers.c:1.5
--- pspp/src/language/expressions/helpers.c:1.4 Mon Apr 24 05:10:00 2006
+++ pspp/src/language/expressions/helpers.c     Tue Apr 25 00:41:12 2006
@@ -10,19 +10,19 @@
 static void
 expr_error (void *aux UNUSED, const char *format, ...) 
 {
-  struct error e;
+  struct msg m;
   va_list args;
 
   /* FIXME: we can do better about saying where the error
      occurred. */
-  e.category = MSG_SYNTAX;
-  e.severity = MSG_ERROR;
-  err_location (&e.where);
+  m.category = MSG_SYNTAX;
+  m.severity = MSG_ERROR;
+  msg_location (&m.where);
   va_start (args, format);
-  e.text = xvasprintf (format, args);
+  m.text = xvasprintf (format, args);
   va_end (args);
 
-  err_msg (&e);
+  msg_emit (&m);
 }
 
 double
Index: pspp/src/language/line-buffer.c
diff -u pspp/src/language/line-buffer.c:1.8 pspp/src/language/line-buffer.c:1.9
--- pspp/src/language/line-buffer.c:1.8 Mon Apr 17 01:54:15 2006
+++ pspp/src/language/line-buffer.c     Tue Apr 25 00:41:12 2006
@@ -372,7 +372,7 @@
 }
 
 /* File locator stack. */
-static const struct file_locator **file_loc;
+static const struct msg_locator **file_loc;
 static int nfile_loc, mfile_loc;
 
 /* Close getl. */
@@ -394,7 +394,7 @@
 
 /* Pushes F onto the stack of file locations. */
 void
-err_push_file_locator (const struct file_locator *f)
+msg_push_msg_locator (const struct msg_locator *loc)
 {
   if (nfile_loc >= mfile_loc)
     {
@@ -406,28 +406,28 @@
       file_loc = xnrealloc (file_loc, mfile_loc, sizeof *file_loc);
     }
 
-  file_loc[nfile_loc++] = f;
+  file_loc[nfile_loc++] = loc;
 }
 
 /* Pops F off the stack of file locations.
    Argument F is only used for verification that that is actually the
    item on top of the stack. */
 void
-err_pop_file_locator (const struct file_locator *f)
+msg_pop_msg_locator (const struct msg_locator *loc)
 {
-  assert (nfile_loc >= 0 && file_loc[nfile_loc - 1] == f);
+  assert (nfile_loc >= 0 && file_loc[nfile_loc - 1] == loc);
   nfile_loc--;
 }
 
 /* Puts the current file and line number in F, or NULL and -1 if
    none. */
 void
-err_location (struct file_locator *f)
+msg_location (struct msg_locator *loc)
 {
   if (nfile_loc)
-    *f = *file_loc[nfile_loc - 1];
+    *loc = *file_loc[nfile_loc - 1];
   else
-    getl_location (&f->file_name, &f->line_number);
+    getl_location (&loc->file_name, &loc->line_number);
 }
 
 /* Reads a line from syntax file source S into LINE.
Index: pspp/src/libpspp/ChangeLog
diff -u pspp/src/libpspp/ChangeLog:1.13 pspp/src/libpspp/ChangeLog:1.14
--- pspp/src/libpspp/ChangeLog:1.13     Mon Apr 24 05:10:00 2006
+++ pspp/src/libpspp/ChangeLog  Tue Apr 25 00:41:12 2006
@@ -1,3 +1,15 @@
+Mon Apr 24 17:26:47 2006  Ben Pfaff  <address@hidden>
+
+       Continue reforming error message support.  In this phase, rename
+       all the message functions and types to start with "msg", except
+       for the ones that will be moving to other modules anyway.
+
+       All references to the identifiers below were updated likewise.
+       
+       * message.h: (enum file_locator) Renamed `enum msg_locator'.
+       (struct error) Renamed `struct msg'.
+       (err_assert_fail) Renamed msg_assert_fail().
+
 Sun Apr 23 22:07:06 2006  Ben Pfaff  <address@hidden>
 
        Continue reforming error message support.  In this phase, get rid
Index: pspp/src/libpspp/message.h
diff -u pspp/src/libpspp/message.h:1.7 pspp/src/libpspp/message.h:1.8
--- pspp/src/libpspp/message.h:1.7      Mon Apr 24 05:10:00 2006
+++ pspp/src/libpspp/message.h  Tue Apr 25 00:41:12 2006
@@ -1,5 +1,5 @@
 /* PSPP - computes sample statistics.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
    Written by Ben Pfaff <address@hidden>.
 
    This program is free software; you can redistribute it and/or
@@ -17,21 +17,12 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA. */
 
-#if !error_h
-#define error_h 1
+#ifndef MESSAGE_H
+#define MESSAGE_H 1
 
 #include <stdarg.h>
 #include <stdbool.h>
-#include "compiler.h"
-
-/* Message classes. */
-enum msg_class
-  {
-    ME, MW, MN,                        /* General error/warning/note. */
-    SE, SW, SN,                        /* Script error/warning/note. */
-    DE, DW, DN,                        /* Data-file error/note. */
-    MSG_CLASS_CNT,
-  };
+#include <libpspp/compiler.h>
 
 /* What kind of message is this? */
 enum msg_category 
@@ -49,6 +40,16 @@
     MSG_NOTE
   };
 
+/* Combination of a category and a severity for convenience. */
+enum msg_class
+  {
+    ME, MW, MN,                        /* General error/warning/note. */
+    SE, SW, SN,                        /* Script error/warning/note. */
+    DE, DW, DN,                        /* Data-file error/note. */
+    MSG_CLASS_CNT,
+  };
+
+
 static inline enum msg_category
 msg_class_to_category (enum msg_class class) 
 {
@@ -69,18 +70,18 @@
 }
 
 /* A file location.  */
-struct file_locator
+struct msg_locator
   {
     const char *file_name;             /* File name. */
     int line_number;                   /* Line number. */
   };
 
-/* An error message. */
-struct error
+/* A message. */
+struct msg
   {
     enum msg_category category; /* Message category. */
     enum msg_severity severity; /* Message severity. */
-    struct file_locator where; /* File location, or (NULL, -1). */
+    struct msg_locator where;  /* File location, or (NULL, -1). */
     char *text;                 /* Error text. */
   };
 
@@ -96,37 +97,34 @@
 /* Nonnegative verbosity level.  Higher value == more verbose. */
 extern int err_verbosity;
 
+/* Initialization. */
+void msg_done (void);
+
 /* Emitting messages. */
 void msg (enum msg_class, const char *format, ...)
      PRINTF_FORMAT (2, 3);
-void err_msg (const struct error *);
+void msg_emit (const struct msg *);
 
 void verbose_msg (int level, const char *format, ...)
      PRINTF_FORMAT (2, 3);
 
-/* File-locator stack. */
-void err_push_file_locator (const struct file_locator *);
-void err_pop_file_locator (const struct file_locator *);
-void err_location (struct file_locator *);
-
-/* Obscure functions. */
-void err_set_command_name (const char *);
-void err_done (void);
+/* Error context. */
+void msg_set_command_name (const char *);
+void msg_push_msg_locator (const struct msg_locator *);
+void msg_pop_msg_locator (const struct msg_locator *);
+void msg_location (struct msg_locator *);
 void err_check_count (void);
 
-/* Used in panic situations only */
-void request_bug_report_and_abort(const char *msg );
+/* Used in panic situations only. */
+void request_bug_report_and_abort (const char *msg);
 
-void err_assert_fail(const char *expr, const char *file, int line);
+void msg_assert_fail (const char *expr, const char *file, int line);
 
 #undef __STRING
 #define __STRING(x) #x
 #undef assert
-
                               
 #define assert(expr) ( (void) ( expr ? (void) 0 : \
-              err_assert_fail(__STRING(expr), __FILE__, __LINE__)) )
-
-
+              msg_assert_fail(__STRING(expr), __FILE__, __LINE__)) )
 
-#endif /* error.h */
+#endif /* message.h */
Index: pspp/src/message.c
diff -u pspp/src/message.c:1.11 pspp/src/message.c:1.12
--- pspp/src/message.c:1.11     Mon Apr 24 21:13:34 2006
+++ pspp/src/message.c  Tue Apr 25 00:41:12 2006
@@ -54,17 +54,17 @@
 void
 msg (enum msg_class class, const char *format, ...)
 {
-  struct error e;
+  struct msg m;
   va_list args;
 
-  e.category = msg_class_to_category (class);
-  e.severity = msg_class_to_severity (class);
-  err_location (&e.where);
+  m.category = msg_class_to_category (class);
+  m.severity = msg_class_to_severity (class);
+  msg_location (&m.where);
   va_start (args, format);
-  e.text = xvasprintf (format, args);
+  m.text = xvasprintf (format, args);
   va_end (args);
 
-  err_msg (&e);
+  msg_emit (&m);
 }
 
 /* Writes MESSAGE formatted with printf, to stderr, if the
@@ -110,7 +110,7 @@
                           unsigned width, unsigned indent);
 
 void
-err_done (void) 
+msg_done (void) 
 {
   lex_done();
   getl_uninitialize ();
@@ -120,7 +120,7 @@
 /* Emits E as an error message.
    Frees `text' member in E. */
 void
-err_msg (const struct error *e)
+msg_emit (const struct msg *m)
 {
   struct category 
     {
@@ -148,35 +148,35 @@
       {NULL, NULL},                             /* MSG_NOTE. */
     };
 
-  const struct category *category = &categories[e->category];
-  const struct severity *severity = &severities[e->severity];
-  struct string msg = DS_INITIALIZER;
+  const struct category *category = &categories[m->category];
+  const struct severity *severity = &severities[m->severity];
+  struct string string = DS_INITIALIZER;
 
-  if (category->show_file_location && e->where.file_name)
+  if (category->show_file_location && m->where.file_name)
     {
-      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, ' ');
+      ds_printf (&string, "%s:", m->where.file_name);
+      if (m->where.line_number != -1)
+       ds_printf (&string, "%d:", m->where.line_number);
+      ds_putc (&string, ' ');
     }
 
   if (severity->name != NULL)
-    ds_printf (&msg, "%s: ", gettext (severity->name));
+    ds_printf (&string, "%s: ", gettext (severity->name));
   
   if (severity->count != NULL)
     ++*severity->count;
   
   if (category->show_command_name && command_name != NULL)
-    ds_printf (&msg, "%s: ", command_name);
+    ds_printf (&string, "%s: ", command_name);
 
-  ds_puts (&msg, e->text);
+  ds_puts (&string, m->text);
 
   /* FIXME: Check set_messages and set_errors to determine where to
      send errors and messages. */
-  dump_message (ds_c_str (&msg), puts_stdout, get_viewwidth (), 8);
+  dump_message (ds_c_str (&string), puts_stdout, get_viewwidth (), 8);
 
-  ds_destroy (&msg);
-  free (e->text);
+  ds_destroy (&string);
+  free (m->text);
 }
 
 /* Private functions. */
@@ -261,7 +261,7 @@
 /* Sets COMMAND_NAME as the command name included in some kinds
    of error messages. */
 void
-err_set_command_name (const char *command_name_) 
+msg_set_command_name (const char *command_name_) 
 {
   free (command_name);
   command_name = command_name_ ? xstrdup (command_name_) : NULL;
@@ -318,7 +318,7 @@
 }
 
 void 
-err_assert_fail(const char *expr, const char *file, int line)
+msg_assert_fail(const char *expr, const char *file, int line)
 {
   char msg[256];
   snprintf(msg,256,"Assertion failed: %s:%d; (%s)",file,line,expr);
Index: pspp/src/ui/gui/message-dialog.c
diff -u pspp/src/ui/gui/message-dialog.c:1.8 
pspp/src/ui/gui/message-dialog.c:1.9
--- pspp/src/ui/gui/message-dialog.c:1.8        Mon Apr 24 05:10:00 2006
+++ pspp/src/ui/gui/message-dialog.c    Tue Apr 25 00:41:12 2006
@@ -113,15 +113,15 @@
 
 
 void
-err_msg (const struct error *e)
+msg_emit (const struct msg *m)
 {
-  vmsg(msg_class_from_category_and_severity (e->category, e->severity),
-       "%s", e->text);
+  vmsg (msg_class_from_category_and_severity (m->category, m->severity),
+        "%s", m->text);
 }
 
 
 void 
-err_assert_fail(const char *expr, const char *file, int line)
+msg_assert_fail(const char *expr, const char *file, int line)
 {
   msg(ME, "Assertion failed: %s:%d; (%s)\n",file,line,expr);
 }
@@ -138,9 +138,9 @@
  * A temporary workaround until getl.c is rearranged
  */
 void
-err_location (struct file_locator *f)
+msg_location (struct msg_locator *loc)
 {
-       f->file_name = 0;
-       f->line_number = -1;
+       loc->file_name = 0;
+       loc->line_number = -1;
 }
 
Index: pspp/src/ui/terminal/main.c
diff -u pspp/src/ui/terminal/main.c:1.5 pspp/src/ui/terminal/main.c:1.6
--- pspp/src/ui/terminal/main.c:1.5     Mon Apr 17 01:30:22 2006
+++ pspp/src/ui/terminal/main.c Tue Apr 25 00:41:12 2006
@@ -253,7 +253,7 @@
     return;
   terminating = true;
 
-  err_done ();
+  msg_done ();
   outp_done ();
 
   cancel_transformations ();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]