From f610841cbabd0345ef181fa79826635104394d3a Mon Sep 17 00:00:00 2001 From: Alex Cherepanov Date: Sat, 25 Sep 2010 02:08:22 +0000 Subject: For long time ps2pdf*.bat files failed when they were used with some options and a single argument. findstr is now used to identify options by the leading '-' and handle this case. Bug 691622. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11743 a1074d23-0009-0410-80fe-cf8c14f379e6 --- gs/lib/ps2pdf.bat | 6 +++++- gs/lib/ps2pdf12.bat | 6 +++++- gs/lib/ps2pdf13.bat | 6 +++++- gs/lib/ps2pdf14.bat | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) (limited to 'gs/lib') diff --git a/gs/lib/ps2pdf.bat b/gs/lib/ps2pdf.bat index 0ef6f41fb..60390c9e0 100755 --- a/gs/lib/ps2pdf.bat +++ b/gs/lib/ps2pdf.bat @@ -16,5 +16,9 @@ rem Pass arguments through a file to avoid overflowing the command line. 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 diff --git a/gs/lib/ps2pdf12.bat b/gs/lib/ps2pdf12.bat index 1ef76cdbf..0b9ea66a2 100755 --- a/gs/lib/ps2pdf12.bat +++ b/gs/lib/ps2pdf12.bat @@ -13,5 +13,9 @@ rem Pass arguments through a file to avoid overflowing the command line. 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 diff --git a/gs/lib/ps2pdf13.bat b/gs/lib/ps2pdf13.bat index 1d7bca3bf..4169a4f94 100755 --- a/gs/lib/ps2pdf13.bat +++ b/gs/lib/ps2pdf13.bat @@ -13,5 +13,9 @@ rem Pass arguments through a file to avoid overflowing the command line. 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 diff --git a/gs/lib/ps2pdf14.bat b/gs/lib/ps2pdf14.bat index 7f4665904..bdd69ad5b 100644 --- a/gs/lib/ps2pdf14.bat +++ b/gs/lib/ps2pdf14.bat @@ -13,5 +13,9 @@ rem Pass arguments through a file to avoid overflowing the command line. 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 -- cgit v1.2.3