Bug 691622 - ps2pdf fails with an option and a single argument
Summary: ps2pdf fails with an option and a single argument
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: master
Hardware: PC Windows NT
: P4 normal
Assignee: Alex Cherepanov
URL:
Keywords:
: 689682 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-09-17 04:14 UTC by Alex Cherepanov
Modified: 2010-12-13 03:40 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Cherepanov 2010-09-17 04:14:52 UTC
For long time our BAT files couldn't identify options reliably.
With introduction of some BAT language extensions one can check for
the leading '-' as following:

--- gs/lib/ps2pdf.bat   (revision 11725)
+++ gs/lib/ps2pdf.bat   (working copy)
@@ -16,5 +16,9 @@
 echo %1 >> "%TEMP%\_.at"
 shift
 :bot
-if not %3/==/ goto top
+rem Search for leading '-'
+echo %1 | findstr /b /C:- >nul 2>&1
+if ERRORLEVEL 1 goto proc
+goto top
+:proc
 call "%LIBDIR%ps2pdfxx.bat" %1 %2
Comment 1 Ray Johnston 2010-09-23 16:47:20 UTC
Assigning to Alex -- he seems to have a handle on Windows batch files.
Comment 2 Alex Cherepanov 2010-09-25 02:12:58 UTC
This and similar patches to ps2pdf12.bat, ps2pdf13.bat, ps2pdf14.bat 
have been committed as a rev. 11743.

Other batch files don't have a single-argument form and work just fine
by counting the arguments.
Comment 3 Alex Cherepanov 2010-12-13 03:40:13 UTC
*** Bug 689682 has been marked as a duplicate of this bug. ***