summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipng/dvipng-1.14/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipng/dvipng-1.14/misc.c')
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/misc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Build/source/texk/dvipng/dvipng-1.14/misc.c b/Build/source/texk/dvipng/dvipng-1.14/misc.c
index aaf5f20f823..42528767070 100644
--- a/Build/source/texk/dvipng/dvipng-1.14/misc.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/misc.c
@@ -34,7 +34,7 @@
#endif
#include <sys/stat.h>
-static char *programname;
+static const char *programname = PACKAGE_NAME; /* just in case */
/*-->DecodeArgs*/
/*********************************************************************/
@@ -50,17 +50,17 @@ bool DecodeArgs(int argc, char ** argv)
if (argv[0]) {
#ifdef HAVE_GDIMAGEGIF
- programname=strrchr(argv[0],'/');
- if (programname!=NULL)
- programname++;
- else
- programname=argv[0];
+ programname=basename(argv[0]);
+# if defined(HAVE_STRCASECMP) || defined(HAVE_LIBKPATHSEA)
+ if (!strcmp(programname,"dvigif") || !strcasecmp(programname,"dvigif.exe"))
+# else
if (strncmp(programname,"dvigif",6)==0)
+# endif
option_flags |= GIF_OUTPUT;
#endif
programname=argv[0];
Message(BE_NONQUIET,"This is %s",programname);
- if (strcmp(basename(programname),PACKAGE_NAME)!=0)
+ if (strcmp(basename(argv[0]),PACKAGE_NAME)!=0)
Message(BE_NONQUIET," (%s)", PACKAGE_NAME);
Message(BE_NONQUIET," %s Copyright 2002-2010 Jan-Ake Larsson\n",
PACKAGE_VERSION);