summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-11 10:10:29 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-11 10:10:29 +0000
commit801ee79a85178e4471ab02b6d6d8f1394ee0f565 (patch)
tree786a4e0fcbdf3d0c64eaf7341e0a96a72b38e6a5
parentc504b251d3d50c3e7bcd48d4eabfd18109cad251 (diff)
avoid using program_invocation_name in splitup.c (from Taco)
git-svn-id: svn://tug.org/texlive/trunk@12365 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/web2c/ChangeLog4
-rw-r--r--Build/source/texk/web2c/web2c/splitup.c23
2 files changed, 24 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog
index 74aac9826c1..622f1cb15d2 100644
--- a/Build/source/texk/web2c/web2c/ChangeLog
+++ b/Build/source/texk/web2c/web2c/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * splitup.c: avoid using program_invocation_name (from Taco).
+
2009-02-26 Karl Berry <karl@tug.org>
* texmf.defines (runsystem): new fn.
diff --git a/Build/source/texk/web2c/web2c/splitup.c b/Build/source/texk/web2c/web2c/splitup.c
index f92933c52ba..3d0dbee6929 100644
--- a/Build/source/texk/web2c/web2c/splitup.c
+++ b/Build/source/texk/web2c/web2c/splitup.c
@@ -9,11 +9,30 @@
#include "config.h"
#include <kpathsea/getopt.h>
+#if defined (FATAL)
+#undef FATAL
+#endif
+
+#define FATAL(str) do { \
+ fprintf (stderr, "%s: fatal: ", argv[0]); \
+ fputs (str, stderr); \
+ fputs (".\n", stderr); exit (1); } while (0)
+
+
+#if defined (FATAL1)
+#undef FATAL1
+#endif
+
+#define FATAL1(str, e1) do { \
+ fprintf (stderr, "%s: fatal: ", argv[0]); \
+ fprintf (stderr, str, e1); \
+ fputs (".\n", stderr); exit (1); } while (0)
+
+
#ifdef VMS
#define unlink delete
#endif
-char *program_invocation_name;
int filenumber = 0, ifdef_nesting = 0, lines_in_file = 0;
char *output_name = NULL;
boolean has_ini;
@@ -63,8 +82,6 @@ main P2C(int, argc, string *, argv)
unsigned coerce_len;
int option;
- program_invocation_name = argv[0];
-
while ((option = getopt(argc, argv, "il:")) != -1) {
switch (option) {
case 'i':