/[m4]/m4/src/main.c
ViewVC logotype

Diff of /m4/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45 by gary, Wed Jul 23 11:51:27 2003 UTC revision 1.46 by gary, Wed Jul 23 14:03:16 2003 UTC
# Line 24  Line 24 
24  #include "m4private.h"  #include "m4private.h"
25  #include "error.h"  #include "error.h"
26    
27  void print_program_name (void);  /* The name this program was run with. */
28    #ifdef _LIBC
29      /* In the GNU C library, there is a predefined variable for this.  */
30    #  define program_name program_invocation_name
31    #endif
32    
33    /* This will be provided either by GNU libc, or error.c. */
34    extern const char *program_name;
35    
36    static void print_program_name_CB (void);
37    
38    
39  /* Name of frozen file to digest after initialization.  */  /* Name of frozen file to digest after initialization.  */
# Line 54  typedef struct macro_definition Line 63  typedef struct macro_definition
63    
64  /* Print program name, source file and line reference on standard  /* Print program name, source file and line reference on standard
65     error, as a prefix for error messages.  Flush standard output first.  */     error, as a prefix for error messages.  Flush standard output first.  */
66  void  static void
67  print_program_name (void)  print_program_name_CB (void)
68  {  {
69    fflush (stdout);    fflush (stdout);
70    fprintf (stderr, "%s: ", program_name);    fprintf (stderr, "%s: ", program_name);
# Line 218  main (int argc, char *const *argv, char Line 227  main (int argc, char *const *argv, char
227    int exit_status;    int exit_status;
228    
229    program_name = argv[0];    program_name = argv[0];
230    error_print_progname = print_program_name;    error_print_progname = print_program_name_CB;
231    
232    setlocale (LC_ALL, "");    setlocale (LC_ALL, "");
233  #ifdef ENABLE_NLS  #ifdef ENABLE_NLS

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26