m4-commit
[Top][All Lists]
Advanced

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

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


From: Gary V . Vaughan
Subject: Changes to m4/src/m4.c [branch-1_4]
Date: Tue, 18 Oct 2005 07:51:24 -0400

Index: m4/src/m4.c
diff -u m4/src/m4.c:1.1.1.1.2.6 m4/src/m4.c:1.1.1.1.2.7
--- m4/src/m4.c:1.1.1.1.2.6     Sun May  1 11:54:12 2005
+++ m4/src/m4.c Tue Oct 18 11:51:21 2005
@@ -1,6 +1,6 @@
 /* GNU m4 -- A simple macro processor
 
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2004 Free
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2004, 2005 Free
    Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -260,6 +260,7 @@
 int
 main (int argc, char *const *argv, char *const *envp)
 {
+  int retcode = EXIT_SUCCESS;
   macro_definition *head;      /* head of deferred argument list */
   macro_definition *tail;
   macro_definition *new;
@@ -485,6 +486,9 @@
            if (fp == NULL)
              {
                error (0, errno, "%s", argv[optind]);
+               /* Set the status to EXIT_FAILURE, even though we
+                  continue to process files after a missing file.  */
+               retcode = EXIT_FAILURE;
                continue;
              }
            else
@@ -507,5 +511,5 @@
       undivert_all ();
     }
 
-  exit (EXIT_SUCCESS);
+  exit (retcode);
 }




reply via email to

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