diff options
Diffstat (limited to 'Build/source/texk/dtl/dv2dt.c')
-rw-r--r-- | Build/source/texk/dtl/dv2dt.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Build/source/texk/dtl/dv2dt.c b/Build/source/texk/dtl/dv2dt.c index 5a4b803f6b1..6c86cdc2e1a 100644 --- a/Build/source/texk/dtl/dv2dt.c +++ b/Build/source/texk/dtl/dv2dt.c @@ -30,6 +30,7 @@ #ifdef KPATHSEA #include <kpathsea/c-fopen.h> +#include <kpathsea/progname.h> #endif #include "dtl.h" @@ -147,7 +148,7 @@ COUNT postamble ARGS((FILE * dvi, FILE * dtl)); COUNT postpost ARGS((FILE * dvi, FILE * dtl)); -String program; /* name of dv2dt program */ +const char * program; /* name of dv2dt program */ int main @@ -162,8 +163,12 @@ main FILE * dvi = stdin; FILE * dtl = stdout; - /* Watch out: C's standard library's string functions are dicey */ - strncpy (program, argv[0], MAXSTRLEN); +#ifdef KPATHSEA + kpse_set_program_name(argv[0], "dv2dt"); + program = kpse_program_name; +#else + program = argv[0]; +#endif if (argc > 1) open_dvi (argv[1], &dvi); |