summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gs/doc/Use.htm1
-rw-r--r--gs/psi/imainarg.c12
2 files changed, 12 insertions, 1 deletions
diff --git a/gs/doc/Use.htm b/gs/doc/Use.htm
index 8fce72355..506b6b0d5 100644
--- a/gs/doc/Use.htm
+++ b/gs/doc/Use.htm
@@ -2157,6 +2157,7 @@ named on the command line.
<dl>
<dt><a name="I_switch"></a><code>-I</code><em>directories</em>
+<br><code>-I </code><em>directories</em>
<dd>Adds the designated list of directories at the head of the search path
for library files.
</dl>
diff --git a/gs/psi/imainarg.c b/gs/psi/imainarg.c
index f7827888e..258594bfb 100644
--- a/gs/psi/imainarg.c
+++ b/gs/psi/imainarg.c
@@ -459,7 +459,17 @@ run_stdin:
return e_Info; /* show usage info on exit */
case 'I': /* specify search path */
{
- char *path = arg_copy(arg, minst->heap);
+ const char *path;
+
+ if (arg[0] == 0) {
+ path = arg_next(pal, &code);
+ if (code < 0)
+ return code;
+ } else
+ path = arg;
+ if (path == NULL)
+ return e_Fatal;
+ path = arg_copy(path, minst->heap);
if (path == NULL)
return e_Fatal;
gs_main_add_lib_path(minst, path);