[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: 29-gary-program-name-decls.patch
From: |
Gary V. Vaughan |
Subject: |
FYI: 29-gary-program-name-decls.patch |
Date: |
Wed, 23 Jul 2003 17:22:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030718 |
Applied to HEAD.
--
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
Index: ChangeLog
from Gary V. Vaughan <address@hidden>
* m4/m4module.h (program_name): Not used by modules at all, so
moved...
* src/main.c (program_name): ...to here.
(print_program_name): Renamed...
(print_program_name_CB): ...to conform to the STYLE guide.
2003-07-23 Gary V. Vaughan <address@hidden>
Index: m4/m4module.h
===================================================================
RCS file: /cvsroot/m4/m4/m4/m4module.h,v
retrieving revision 1.56
diff -u -p -u -r1.56 m4module.h
--- m4/m4module.h 23 Jul 2003 11:51:26 -0000 1.56
+++ m4/m4module.h 23 Jul 2003 14:02:50 -0000
@@ -196,13 +196,6 @@ extern const m4_builtin *m4_builtin_find
extern const m4_builtin *m4_builtin_find_by_func (
const m4_builtin *, m4_builtin_func *);
-/* The name this program was run with. */
-#ifdef _LIBC
-/* In the GNU C library, there is a predefined variable for this. */
-# define program_name program_invocation_name
-#endif
-extern const char *program_name;
-
/* left and right quote, begin and end comment */
typedef struct {
unsigned char *string; /* characters of the string */
Index: src/main.c
===================================================================
RCS file: /cvsroot/m4/m4/src/main.c,v
retrieving revision 1.45
diff -u -p -u -r1.45 main.c
--- src/main.c 23 Jul 2003 11:51:27 -0000 1.45
+++ src/main.c 23 Jul 2003 14:02:50 -0000
@@ -24,7 +24,16 @@
#include "m4private.h"
#include "error.h"
-void print_program_name (void);
+/* The name this program was run with. */
+#ifdef _LIBC
+ /* In the GNU C library, there is a predefined variable for this. */
+# define program_name program_invocation_name
+#endif
+
+/* This will be provided either by GNU libc, or error.c. */
+extern const char *program_name;
+
+static void print_program_name_CB (void);
/* Name of frozen file to digest after initialization. */
@@ -54,8 +63,8 @@ typedef struct macro_definition
/* Print program name, source file and line reference on standard
error, as a prefix for error messages. Flush standard output first. */
-void
-print_program_name (void)
+static void
+print_program_name_CB (void)
{
fflush (stdout);
fprintf (stderr, "%s: ", program_name);
@@ -218,7 +227,7 @@ main (int argc, char *const *argv, char
int exit_status;
program_name = argv[0];
- error_print_progname = print_program_name;
+ error_print_progname = print_program_name_CB;
setlocale (LC_ALL, "");
#ifdef ENABLE_NLS
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: 29-gary-program-name-decls.patch,
Gary V. Vaughan <=