[gs-cvs] rev 7544 - in trunk/gs: doc src

ghostgum at ghostscript.com ghostgum at ghostscript.com
Sun Dec 31 19:00:16 PST 2006


Author: ghostgum
Date: 2006-12-31 19:00:15 -0800 (Sun, 31 Dec 2006)
New Revision: 7544

Modified:
   trunk/gs/doc/Install.htm
   trunk/gs/doc/Use.htm
   trunk/gs/src/gp_mswin.c
Log:
Remove documentation about Windows printing to LPT1: because it 
hasn't worked since we ceased to include gs16spl.exe.
Prevent attempts to use -sOutputFile="LPT1:" on Windows because 
it locks up.



Modified: trunk/gs/doc/Install.htm
===================================================================
--- trunk/gs/doc/Install.htm	2006-12-31 22:14:23 UTC (rev 7543)
+++ trunk/gs/doc/Install.htm	2007-01-01 03:00:15 UTC (rev 7544)
@@ -287,9 +287,6 @@
 
 <blockquote>
 <dl>
-<dt><b><tt>-sOutputFile="LPT1:"</tt></b>
-<dd>Output to the named port.
-
 <dt><b><tt>-sOutputFile="%printer%printer name"</tt></b>
 <dd>Output to the named printer.  If your printer is named "HP DeskJet 500"
 then you would use <tt>-sOutputFile="%printer%HP DeskJet 500"</tt>.

Modified: trunk/gs/doc/Use.htm
===================================================================
--- trunk/gs/doc/Use.htm	2006-12-31 22:14:23 UTC (rev 7543)
+++ trunk/gs/doc/Use.htm	2007-01-01 03:00:15 UTC (rev 7544)
@@ -1550,7 +1550,8 @@
 the quickstart examples.
 
 <p>
-You must add <em>gs\</em><tt>bin</tt> and
+To run the batch files in the ghostscript <tt>lib</tt> directory,
+you must add <em>gs\</em><tt>bin</tt> and
 <em>gs\</em><tt>lib</tt> to the <b><tt>PATH</tt></b>, where
 <em>gs</em> is the top-level Ghostscript directory.
 
@@ -1571,6 +1572,19 @@
 The executable <tt>gswin32c</tt> is usually the better option since 
 it uses the native command prompt window.
 
+<p>
+For printer devices, the default output is the default printer.
+This can be modified as follows.
+
+<blockquote>
+<dl>
+<dt><b><tt>-sOutputFile="%printer%printer name"</tt></b>
+<dd>Output to the named printer.  If your printer is named "HP DeskJet 500"
+then you would use <tt>-sOutputFile="%printer%HP DeskJet 500"</tt>.
+
+</dl>
+</blockquote>
+
 <hr>
 
 <h3><a name="MS-DOS"></a>MS-DOS</h3>

Modified: trunk/gs/src/gp_mswin.c
===================================================================
--- trunk/gs/src/gp_mswin.c	2006-12-31 22:14:23 UTC (rev 7543)
+++ trunk/gs/src/gp_mswin.c	2007-01-01 03:00:15 UTC (rev 7544)
@@ -128,6 +128,8 @@
 	return pfile;
     } else if (fname[0] == '|') 	/* pipe */
 	return popen(fname + 1, (binary_mode ? "wb" : "w"));
+    else if (strcmp(fname, "LPT1:") == 0)
+	return NULL;	/* not supported, use %printer%name instead  */
     else
 	return fopen(fname, (binary_mode ? "wb" : "w"));
 }
@@ -207,11 +209,6 @@
     if (strlen(name) == 0)
 	return TRUE;
 
-    /*  is printer if name appears in win.ini [ports] section */
-    GetProfileString("ports", name, "XYZ", buf, sizeof(buf));
-    if (strlen(name) == 0 || strcmp(buf, "XYZ"))
-	return TRUE;
-
     /* is printer if name prefixed by \\spool\ */
     if (is_spool(name))
 	return TRUE;
@@ -232,12 +229,13 @@
 /*
  * Valid values for pmport are:
  *   ""
- *      action: WinNT and Win95 use default queue
+ *      action: Use default queue
  *   "\\spool\printer name"
  *      action: send to printer using WritePrinter.
  *              Using "%printer%printer name" is preferred
  *   "\\spool"
  *      action: prompt for queue name then send to printer using WritePrinter.
+ *              THIS IS CURRENTLY BROKEN
  */
 /* Print File */
 private int
@@ -328,6 +326,7 @@
     if (buffer == NULL)
 	return FALSE;
     if ((queue == (char *)NULL) || (strlen(queue) == 0)) {
+        /* PROMPTING FOR A QUEUE IS CURRENTLY BROKEN */
 	/* select a queue */
 	iport = DialogBoxParam(phInstance, "QueueDlgBox", (HWND) NULL, SpoolDlgProc, (LPARAM) buffer);
 	if (!iport) {



More information about the gs-cvs mailing list