summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipsk
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2022-09-02 13:19:45 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2022-09-02 13:19:45 +0000
commit24e37b600d50cb0be4df91fc4d4ab627f9e5fe8e (patch)
tree3e7aa8ecaaac27077ebdb6151eb3d8007c78cc0b /Build/source/texk/dvipsk
parent2befdb3c25bef530676c3d7a93c59b1e5c5e34f7 (diff)
dvips: check options --help & --version before looking up texmf.cnf
git-svn-id: svn://tug.org/texlive/trunk@64266 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk')
-rw-r--r--Build/source/texk/dvipsk/ChangeLog6
-rw-r--r--Build/source/texk/dvipsk/dvips.c38
2 files changed, 23 insertions, 21 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index 7143b28d643..fd8a0d3bd4a 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,9 @@
+2022-09-02 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * dvips.c:
+ Check options --help and --version before getdefaults(CONFIGFILE).
+ This change prevents unwanted looking for texmf.cnf.
+
2022-04-06 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* tfmload.c:
diff --git a/Build/source/texk/dvipsk/dvips.c b/Build/source/texk/dvipsk/dvips.c
index 329bb3d7601..1251c9cd11c 100644
--- a/Build/source/texk/dvipsk/dvips.c
+++ b/Build/source/texk/dvipsk/dvips.c
@@ -693,6 +693,23 @@ main(int argc, char **argv)
printf("%s %s\n", banner, banner2);
exit(0);
}
+ /* print information and exit if dvips finds options --help or --version */
+ if (strlen(argv[1]) == 6 && strcmp(argv[1], "--help") == 0) {
+ help (0);
+ exit (0);
+ }
+ if (strlen (argv[1]) == 9 && strcmp(argv[1], "--version") == 0) {
+ puts (BANNER);
+ puts (kpathsea_version_string);
+ puts ("Copyright 2022 Radical Eye Software.\n\
+There is NO warranty. You may redistribute this software\n\
+under the terms of the GNU General Public License\n\
+and the Dvips copyright.\n\
+For more information about these matters, see the files\n\
+named COPYING and dvips.h.\n\
+Primary author of Dvips: T. Rokicki.");
+ exit (0);
+ }
}
#endif /* KPATHSEA */
#endif /* VMS */
@@ -730,27 +747,6 @@ main(int argc, char **argv)
if (*argv[i]=='-') {
char *p=argv[i]+2;
char c=argv[i][1];
-#ifdef KPATHSEA
- /* print information and exit if dvips finds options
- --help or --version */
- if (strlen (argv[i] + 1) == 5 && strcmp (argv[i] + 1, "-help") == 0) {
- help (0);
- exit (0);
- }
- if (strlen (argv[i] + 1) == 8 &&
- strcmp (argv[i] + 1, "-version") == 0) {
- puts (BANNER);
- puts (kpathsea_version_string);
- puts ("Copyright 2022 Radical Eye Software.\n\
-There is NO warranty. You may redistribute this software\n\
-under the terms of the GNU General Public License\n\
-and the Dvips copyright.\n\
-For more information about these matters, see the files\n\
-named COPYING and dvips.h.\n\
-Primary author of Dvips: T. Rokicki.");
- exit (0);
- }
-#endif /* KPATHSEA */
switch (c) {
case '-':
queryoptions = 1;