m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/src/Attic/m4.c,v [branch-1_4]


From: Eric Blake
Subject: Changes to m4/src/Attic/m4.c,v [branch-1_4]
Date: Tue, 08 Aug 2006 16:23:59 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      06/08/08 16:23:58

Index: src/m4.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/m4.c,v
retrieving revision 1.1.1.1.2.25
retrieving revision 1.1.1.1.2.26
diff -u -b -r1.1.1.1.2.25 -r1.1.1.1.2.26
--- src/m4.c    4 Aug 2006 13:19:41 -0000       1.1.1.1.2.25
+++ src/m4.c    8 Aug 2006 16:23:58 -0000       1.1.1.1.2.26
@@ -86,27 +86,16 @@
 
 /* Error handling functions.  */
 
-/* TRUE if error_at_line was called.  Too bad the error module doesn't
-   let us pass a parameter to the callback, or take a va_list
-   argument.  */
-boolean suppress_line;
-
-/*---------------------------------------------------------------.
-| Callback used by error to print program name, source, and line |
-| reference.                                                    |
-`---------------------------------------------------------------*/
+/*-----------------------.
+| Wrapper around error.  |
+`-----------------------*/
 
 void
-reference_error (void)
+m4_error (int status, int errnum, const char *format, ...)
 {
-  /* error already flushed stdout before calling us.  */
-  if (suppress_line)
-    {
-      fprintf (stderr, "%s:", program_name);
-      suppress_line = FALSE;
-    }
-  else
-    fprintf (stderr, "%s:%s:%d: ", program_name, current_file, current_line);
+  va_list args;
+  va_start (args, format);
+  verror_at_line (status, errnum, current_file, current_line, format, args);
 }
 
 #ifdef USE_STACKOVF
@@ -278,7 +267,6 @@
   FILE *fp;
 
   program_name = argv[0];
-  error_print_progname = reference_error;
   retcode = EXIT_SUCCESS;
 
   include_init ();




reply via email to

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