blob: 9a3f12c26565be8e20dbd9905ae7f45d5c27a0ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$NetBSD: patch-an,v 1.2 2014/04/26 13:51:40 wiz Exp $
Do some initialization of global stuff earlier, in particular before
"@file" args get processed, fixes PR pkg/42984 from T. M. Pederson.
I'm not 100% sure that this has no side effects (the initialization
order in gs is messy and undocumented) but I haven't found any within
some weeks of testing.
--- psi/imainarg.c.orig 2011-01-13 23:37:33.000000000 +0900
+++ psi/imainarg.c 2011-03-30 16:22:08.000000000 +0900
@@ -194,6 +194,11 @@
return e_Fatal;
}
}
+
+ code = gs_main_init1(minst);
+ if (code < 0)
+ return code;
+
while ((arg = arg_next(&args, &code)) != 0) {
switch (*arg) {
case '-':
|