[gs-cvs] rev 7543 - trunk/gs/src
ghostgum at ghostscript.com
ghostgum at ghostscript.com
Sun Dec 31 14:14:24 PST 2006
Author: ghostgum
Date: 2006-12-31 14:14:23 -0800 (Sun, 31 Dec 2006)
New Revision: 7543
Modified:
trunk/gs/src/bcwin32.mak
trunk/gs/src/dwsetup.rc
trunk/gs/src/gp_msprn.c
trunk/gs/src/gp_mswin.c
trunk/gs/src/watcw32.mak
trunk/gs/src/winint.mak
Log:
Remove Windows 16-bit and Win32s printer code.
Update release year in Windows installer to 2007.
Modified: trunk/gs/src/bcwin32.mak
===================================================================
--- trunk/gs/src/bcwin32.mak 2006-12-31 17:50:40 UTC (rev 7542)
+++ trunk/gs/src/bcwin32.mak 2006-12-31 22:14:23 UTC (rev 7543)
@@ -11,7 +11,7 @@
# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
#
# $Id$
-# makefile for (MS-Windows 3.1/Win32s / Windows 95 / Windows NT) +
+# makefile for (Windows 95 / Windows NT) +
# Borland C++ 4.5 platform.
# Borland C++Builder 3 platform (need BC++ 4.5 for 16-bit code)
@@ -390,12 +390,8 @@
# Make sure we get the right default target for make.
-# Rod Webster (rodw)
-# CBuilder 5 does not support 16 bit compilation
-# so add conditional to skip attempts to build 16 bit version
-!if $(BUILDER_VERSION) !=5
-dosdefault: default $(BINDIR)\gs16spl.exe
-!endif
+dosdefault: default
+
# Define the switches for the compilers.
C_=-c
@@ -495,7 +491,7 @@
# so this must precede the !include statements.
# ****** HACK ****** *.tr is still created in the current directory.
-BEGINFILES2=$(BINDIR)\gs16spl.exe *.tr
+BEGINFILES2=*.tr
# Include the generic makefiles.
@@ -631,32 +627,7 @@
$(LINK) /L$(LIBDIR) $(LCT) /Tpe /ap @$(PSGEN)gswin32.tr ,$(GSCONSOLE_XE),$(PSOBJ)$(GSCONSOLE) @$(LIBCTR),$(PSSRCDIR)\dw32c.def,$(GS_OBJ).res
!endif
-# Access to 16 spooler from Win32s
-# Rod Webster (rodw)
-# CBuilder 5 does not support 16 bit compilation
-# so add conditional to skip attempts to build 16 bit version
-!if $(BUILDER_VERSION !=5)
-GSSPL_XE=$(BINDIR)\gs16spl.exe
-
-$(GSSPL_XE): $(GLSRCDIR)\gs16spl.c $(GLSRCDIR)\gs16spl.rc $(GLGENDIR)/gswin.ico
- $(ECHOGS_XE) -w $(GLGEN)_spl.rc -x 23 define -s gstext_ico $(GLGENDIR)/gswin.ico
- $(ECHOGS_XE) -a $(GLGEN)_spl.rc -x 23 define -s gsgraph_ico $(GLGENDIR)/gswin.ico
- $(ECHOGS_XE) -a $(GLGEN)_spl.rc -R $(GLSRC)gs16spl.rc
- $(COMPBASE16)\bin\bcc -W -ms -v -I$(COMPBASE16)\include $(GLO_)gs16spl.obj -c $(GLSRCDIR)\gs16spl.c
- $(COMPBASE16)\bin\brcc -i$(COMPBASE16)\include -r -fo$(GLOBJ)gs16spl.res $(GLGEN)_spl.rc
- $(COMPBASE16)\bin\tlink /Twe /c /m /s /l @&&!
-$(COMPBASE16)\lib\c0ws +
-$(GLOBJ)gs16spl.obj, +
-$(GSSPL_XE),$(GLOBJ)gs16spl, +
-$(COMPBASE16)\lib\import +
-$(COMPBASE16)\lib\mathws +
-$(COMPBASE16)\lib\cws, +
-$(GLSRCDIR)\gs16spl.def
-!
- $(COMPBASE16)\bin\rlink -t $(GLOBJ)gs16spl.res $(GSSPL_XE)
-!endif
-
# ---------------------- Setup and uninstall programs ---------------------- #
!if $(MAKEDLL)
Modified: trunk/gs/src/dwsetup.rc
===================================================================
--- trunk/gs/src/dwsetup.rc 2006-12-31 17:50:40 UTC (rev 7542)
+++ trunk/gs/src/dwsetup.rc 2006-12-31 22:14:23 UTC (rev 7543)
@@ -35,7 +35,7 @@
ICON IDR_MAIN,IDC_STATIC,11,17,20,20
LTEXT "This installs",IDC_STATIC,56,6,232,8
LTEXT "Product Name",IDC_PRODUCT_NAME,72,16,216,8
- LTEXT "Copyright (C) 1994-2006 artofcode LLC, Benicia, California, U.S.A. All rights reserved.\n\nRequires 40 Mbytes disk space.",
+ LTEXT "Copyright (C) 1994-2007 artofcode LLC, Benicia, California, U.S.A. All rights reserved.\n\nRequires 40 Mbytes disk space.",
IDC_COPYRIGHT,56,30,232,40
LTEXT "Install to directory",IDC_STATIC,8,72,56,8
Modified: trunk/gs/src/gp_msprn.c
===================================================================
--- trunk/gs/src/gp_msprn.c 2006-12-31 17:50:40 UTC (rev 7542)
+++ trunk/gs/src/gp_msprn.c 2006-12-31 22:14:23 UTC (rev 7543)
@@ -47,11 +47,10 @@
* This is implemented by returning the file pointer
* for the write end of a pipe, and starting a thread
* which reads the pipe and writes to a Windows printer.
- * This will not work in Win32s.
*
* The old method provided by gp_open_printer()
* -sOutputFile="\\spool\HP DeskJet 500"
- * should not be used except on Win32s.
+ * should not be used.
* The "\\spool\" is not a UNC name and causes confusion.
*/
Modified: trunk/gs/src/gp_mswin.c
===================================================================
--- trunk/gs/src/gp_mswin.c 2006-12-31 17:50:40 UTC (rev 7542)
+++ trunk/gs/src/gp_mswin.c 2006-12-31 22:14:23 UTC (rev 7543)
@@ -224,71 +224,42 @@
/* Print File to port or queue */
/* port==NULL means prompt for port or queue with dialog box */
-/* This is messy because Microsoft changed the spooler interface */
-/* between Windows 3.1 and Windows 95/NT */
-/* and didn't provide the spooler interface in Win32s */
+/* This is messy because of past support for old version of Windows. */
/* Win95, WinNT: Use OpenPrinter, WritePrinter etc. */
private int gp_printfile_win32(const char *filename, char *port);
-/* Win32s: Pass to Win16 spooler via gs16spl.exe */
-private int gp_printfile_gs16spl(const char *filename, const char *port);
-
/*
* Valid values for pmport are:
* ""
- * action: WinNT and Win95 use default queue, Win32s prompts for port
- * "LPT1:" (or other port that appears in win.ini [ports]
- * action: start gs16spl.exe to print to the port
+ * action: WinNT and Win95 use default queue
* "\\spool\printer name"
- * action: send to printer using WritePrinter (WinNT and Win95).
- * action: translate to port name using win.ini [Devices]
- * then use gs16spl.exe (Win32s).
+ * action: send to printer using WritePrinter.
+ * Using "%printer%printer name" is preferred
* "\\spool"
- * action: prompt for queue name then send to printer using
- * WritePrinter (WinNT and Win95).
- * action: prompt for port then use gs16spl.exe (Win32s).
+ * action: prompt for queue name then send to printer using WritePrinter.
*/
/* Print File */
private int
gp_printfile(const char *filename, const char *pmport)
{
- /* treat WinNT and Win95 differently to Win32s */
- if (!is_win32s) {
- if (strlen(pmport) == 0) { /* get default printer */
- char buf[256];
- char *p;
+ if (strlen(pmport) == 0) { /* get default printer */
+ char buf[256];
+ char *p;
- /* WinNT stores default printer in registry and win.ini */
- /* Win95 stores default printer in win.ini */
- GetProfileString("windows", "device", "", buf, sizeof(buf));
- if ((p = strchr(buf, ',')) != NULL)
- *p = '\0';
- return gp_printfile_win32(filename, buf);
- } else if (is_spool(pmport)) {
- if (strlen(pmport) >= 8)
- return gp_printfile_win32(filename, (char *)pmport + 8);
- else
- return gp_printfile_win32(filename, (char *)NULL);
- } else
- return gp_printfile_gs16spl(filename, pmport);
- } else {
- /* Win32s */
- if (is_spool(pmport)) {
- if (strlen(pmport) >= 8) {
- /* extract port name from win.ini */
- char driverbuf[256];
- char *output;
-
- GetProfileString("Devices", pmport + 8, "", driverbuf, sizeof(driverbuf));
- strtok(driverbuf, ",");
- output = strtok(NULL, ",");
- return gp_printfile_gs16spl(filename, output);
- } else
- return gp_printfile_gs16spl(filename, (char *)NULL);
- } else
- return gp_printfile_gs16spl(filename, pmport);
- }
+ /* WinNT stores default printer in registry and win.ini */
+ /* Win95 stores default printer in win.ini */
+ GetProfileString("windows", "device", "", buf, sizeof(buf));
+ if ((p = strchr(buf, ',')) != NULL)
+ *p = '\0';
+ return gp_printfile_win32(filename, buf);
+ } else if (is_spool(pmport)) {
+ if (strlen(pmport) >= 8)
+ return gp_printfile_win32(filename, (char *)pmport + 8);
+ else
+ return gp_printfile_win32(filename, (char *)NULL);
+ } else
+ return gs_error_undefinedfilename;
}
#define PRINT_BUF_SIZE 16384u
@@ -343,21 +314,6 @@
return buffer;
}
-
-char *
-get_ports(void)
-{
- char *buffer;
-
- if (!is_win32s)
- return get_queues();
-
- if ((buffer = malloc(PORT_BUF_SIZE)) == (char *)NULL)
- return NULL;
- GetProfileString("ports", NULL, "", buffer, PORT_BUF_SIZE);
- return buffer;
-}
-
/* return TRUE if queuename available */
/* return FALSE if cancelled or error */
/* if queue non-NULL, use as suggested queue */
@@ -394,59 +350,6 @@
return TRUE;
}
-/* return TRUE if portname available */
-/* return FALSE if cancelled or error */
-/* if port non-NULL, use as suggested port */
-BOOL
-get_portname(char *portname, const char *port)
-{
- char *buffer;
- char *p;
- int i, iport;
- char filename[MAXSTR];
-
- buffer = get_ports();
- if (buffer == NULL)
- return FALSE;
- if ((port == (char *)NULL) || (strlen(port) == 0)) {
- if (buffer == (char *)NULL)
- return FALSE;
- /* select a port */
- iport = DialogBoxParam(phInstance, "SpoolDlgBox", (HWND) NULL, SpoolDlgProc, (LPARAM) buffer);
- if (!iport) {
- free(buffer);
- return FALSE;
- }
- p = buffer;
- for (i = 1; i < iport && strlen(p) != 0; i++)
- p += lstrlen(p) + 1;
- strcpy(portname, p);
- } else
- strcpy(portname, port);
-
- if (strlen(portname) == 0)
- return FALSE;
- if (strcmp(portname, "FILE:") == 0) {
- OPENFILENAME ofn;
-
- filename[0] = '\0';
- memset(&ofn, 0, sizeof(OPENFILENAME));
- ofn.lStructSize = sizeof(OPENFILENAME);
- ofn.hwndOwner = (HWND) NULL;
- ofn.lpstrFile = filename;
- ofn.nMaxFile = sizeof(filename);
- ofn.Flags = OFN_PATHMUSTEXIST;
- if (!GetSaveFileName(&ofn)) {
- free(buffer);
- return FALSE;
- }
- strcpy(portname, filename);
- }
- free(buffer);
- return TRUE;
-}
-
-
/* True Win32 method, using OpenPrinter, WritePrinter etc. */
private int
gp_printfile_win32(const char *filename, char *port)
@@ -524,50 +427,8 @@
}
-/* Start a 16-bit application gs16spl.exe to print a file */
-/* Intended for Win32s where 16-bit spooler functions are not available */
-/* and Win32 spooler functions are not implemented. */
-int
-gp_printfile_gs16spl(const char *filename, const char *port)
-{
-/* Get printer port list from win.ini */
- char portname[MAXSTR];
- HINSTANCE hinst;
- char command[MAXSTR];
- char *p;
- HWND hwndspl;
- if (!get_portname(portname, port))
- return FALSE;
- /* get path to EXE - same as DLL */
- GetModuleFileName(phInstance, command, sizeof(command));
- if ((p = strrchr(command, '\\')) != (char *)NULL)
- p++;
- else
- p = command;
- *p = '\0';
- sprintf(command + strlen(command), "gs16spl.exe %s %s",
- portname, filename);
-
- hinst = (HINSTANCE) WinExec(command, SW_SHOWNORMAL);
- if (hinst < (HINSTANCE) HINSTANCE_ERROR) {
- char buf[MAXSTR];
-
- sprintf(buf, "Can't run: %s", command);
- MessageBox((HWND) NULL, buf, szAppName, MB_OK | MB_ICONSTOP);
- return FALSE;
- }
- hwndspl = FindWindow(NULL, "GS Win32s/Win16 spooler");
-
- while (IsWindow(hwndspl)) {
- gp_check_interrupts(NULL);
- }
-
- return 0;
-}
-
-
/******************************************************************/
/* MS Windows has popen and pclose in stdio.h, but under different names.
* Unfortunately MSVC5 and 6 have a broken implementation of _popen,
Modified: trunk/gs/src/watcw32.mak
===================================================================
--- trunk/gs/src/watcw32.mak 2006-12-31 17:50:40 UTC (rev 7542)
+++ trunk/gs/src/watcw32.mak 2006-12-31 22:14:23 UTC (rev 7543)
@@ -13,9 +13,6 @@
# $Id$
# watcw32.mak
# makefile for Watcom C++ v??, Windows NT or Windows 95 platform.
-# Does NOT build gs16spl.exe, which is 16-bit and is used under Win32s.
-# Someone with access to the Watcom 16-bit documentation will need to
-# do this.
# Created 1997-02-23 by Russell Lang from MSVC++ 4.0 makefile.
# Major revisions 1999-07-26 by Ray Johnston.
Modified: trunk/gs/src/winint.mak
===================================================================
--- trunk/gs/src/winint.mak 2006-12-31 17:50:40 UTC (rev 7542)
+++ trunk/gs/src/winint.mak 2006-12-31 22:14:23 UTC (rev 7543)
@@ -224,11 +224,10 @@
ZIPPROGFILE2=gs$(GS_DOT_VERSION)\bin\gsdll32.lib
ZIPPROGFILE3=gs$(GS_DOT_VERSION)\bin\gswin32.exe
ZIPPROGFILE4=gs$(GS_DOT_VERSION)\bin\gswin32c.exe
-ZIPPROGFILE5=gs$(GS_DOT_VERSION)\bin\gs16spl.exe
-ZIPPROGFILE6=gs$(GS_DOT_VERSION)\doc
-ZIPPROGFILE7=gs$(GS_DOT_VERSION)\examples
-ZIPPROGFILE8=gs$(GS_DOT_VERSION)\lib
-ZIPPROGFILE9=gs$(GS_DOT_VERSION)\Resource
+ZIPPROGFILE5=gs$(GS_DOT_VERSION)\doc
+ZIPPROGFILE6=gs$(GS_DOT_VERSION)\examples
+ZIPPROGFILE7=gs$(GS_DOT_VERSION)\lib
+ZIPPROGFILE8=gs$(GS_DOT_VERSION)\Resource
ZIPFONTDIR=fonts
ZIPFONTFILES=$(ZIPFONTDIR)\*.*
@@ -252,7 +251,6 @@
echo $(ZIPPROGFILE6) >> $(ZIPTEMPFILE)
echo $(ZIPPROGFILE7) >> $(ZIPTEMPFILE)
echo $(ZIPPROGFILE8) >> $(ZIPTEMPFILE)
- echo $(ZIPPROGFILE9) >> $(ZIPTEMPFILE)
$(SETUP_XE_NAME) -title "GPL Ghostscript $(GS_DOT_VERSION)" -dir "gs$(GS_DOT_VERSION)" -list "$(FILELIST_TXT)" @$(ZIPTEMPFILE)
$(SETUP_XE_NAME) -title "GPL Ghostscript Fonts" -dir "fonts" -list "$(FONTLIST_TXT)" $(ZIPFONTFILES)
-del $(ZIPTARGET).zip
@@ -262,15 +260,10 @@
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE2)
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE3)
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE4)
- rem
- rem Don't flag error if Win32s spooler file is missing.
- rem This occurs when using MSVC++.
- rem
- -$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE5)
+ $(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE5)
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE6)
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE7)
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE8)
- $(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE9)
-del $(ZIPTEMPFILE)
-del $(SETUP_XE_NAME)
-del $(UNINSTALL_XE_NAME)
@@ -292,7 +285,7 @@
$(ECHOGS_XE) -a $(ZIP_RSP) -q -a -s $(PSOBJ)about.txt
$(ECHOGS_XE) -a $(ZIP_RSP) -q -t -s $(PSOBJ)dialog.txt
$(ECHOGS_XE) -a $(ZIP_RSP) -q -c -s $(SETUP_XE_NAME)
- $(ECHOGS_XE) -w $(PSOBJ)about.txt "GPL Ghostscript is Copyright " -x A9 " 2006 artofcode LLC."
+ $(ECHOGS_XE) -w $(PSOBJ)about.txt "GPL Ghostscript is Copyright " -x A9 " 2007 artofcode LLC."
$(ECHOGS_XE) -a $(PSOBJ)about.txt See license in gs$(GS_DOT_VERSION)\doc\Public.htm.
$(ECHOGS_XE) -a $(PSOBJ)about.txt See gs$(GS_DOT_VERSION)\doc\Commprod.htm regarding commercial distribution.
$(ECHOGS_XE) -w $(PSOBJ)dialog.txt This installs GPL Ghostscript $(GS_DOT_VERSION).
More information about the gs-cvs
mailing list