[gs-cvs] rev 7604 - in trunk/gs: doc src
ghostgum at ghostscript.com
ghostgum at ghostscript.com
Fri Jan 12 14:15:33 PST 2007
Author: ghostgum
Date: 2007-01-12 14:15:32 -0800 (Fri, 12 Jan 2007)
New Revision: 7604
Removed:
trunk/gs/src/dwmain16.def
trunk/gs/src/gs16spl.c
trunk/gs/src/gs16spl.def
trunk/gs/src/gs16spl.rc
trunk/gs/src/gswin386.rc
Modified:
trunk/gs/doc/Develop.htm
Log:
Remove old 16-bit Windows code.
Modified: trunk/gs/doc/Develop.htm
===================================================================
--- trunk/gs/doc/Develop.htm 2007-01-12 21:08:02 UTC (rev 7603)
+++ trunk/gs/doc/Develop.htm 2007-01-12 22:15:32 UTC (rev 7604)
@@ -3285,14 +3285,11 @@
<a href="../src/cp.cmd">src/cp.cmd</a>,
<a href="../src/dw32c.def">src/dw32c.def</a>,
<a href="../src/dwmain.rc">src/dwmain.rc</a>,
-<a href="../src/dwmain16.def">src/dwmain16.def</a>,
<a href="../src/dwmain32.def">src/dwmain32.def</a>,
<a href="../src/dwsetup.def">src/dwsetup.def</a>,
<a href="../src/dwsetup.rc">src/dwsetup.rc</a>,
<a href="../src/dwuninst.def">src/dwuninst.def</a>,
<a href="../src/dwuninst.rc">src/dwuninst.rc</a>,
-<a href="../src/gs16spl.def">src/gs16spl.def</a>,
-<a href="../src/gs16spl.rc">src/gs16spl.rc</a>,
<a href="../src/gsdll2.def">src/gsdll2.def</a>,
<a href="../src/gsdll2.rc">src/gsdll2.rc</a>,
<a href="../src/gsdll32.def">src/gsdll32.def</a>,
@@ -3306,7 +3303,6 @@
<a href="../src/gspmdrv.rc">src/gspmdrv.rc</a>,
<a href="../src/gswin.rc">src/gswin.rc</a>,
<a href="../src/gswin32.rc">src/gswin32.rc</a>,
-<a href="../src/gswin386.rc">src/gswin386.rc</a>,
<a href="../src/mv.bat">src/mv.bat</a>,
<a href="../src/mv.cmd">src/mv.cmd</a>,
<a href="../src/rm.bat">src/rm.bat</a>,
@@ -4601,7 +4597,6 @@
<a href="../src/gp_msdll.c">src/gp_msdll.c</a>,
<a href="../src/gp_mspol.c">src/gp_mspol.c</a>,
<a href="../src/gp_msprn.c">src/gp_msprn.c</a>,
-<a href="../src/gs16spl.c">src/gs16spl.c</a>,
<a href="../src/gsdllwin.h">src/gsdllwin.h</a>.
<dt>
Deleted: trunk/gs/src/dwmain16.def
===================================================================
--- trunk/gs/src/dwmain16.def 2007-01-12 21:08:02 UTC (rev 7603)
+++ trunk/gs/src/dwmain16.def 2007-01-12 22:15:32 UTC (rev 7604)
@@ -1,7 +0,0 @@
-; 'Ghostscript Interpreter'
-NAME GSWIN16
-EXETYPE WINDOWS
-CODE MOVEABLE DISCARDABLE PRELOAD
-DATA MULTIPLE MOVEABLE PRELOAD
-HEAPSIZE 256
-STACKSIZE 16384
Deleted: trunk/gs/src/gs16spl.c
===================================================================
--- trunk/gs/src/gs16spl.c 2007-01-12 21:08:02 UTC (rev 7603)
+++ trunk/gs/src/gs16spl.c 2007-01-12 22:15:32 UTC (rev 7604)
@@ -1,215 +0,0 @@
-/* Copyright (C) 2001-2006 artofcode LLC.
- All Rights Reserved.
-
- This software is provided AS-IS with no warranty, either express or
- implied.
-
- This software is distributed under license and may not be copied, modified
- or distributed except as expressly authorized under the terms of that
- license. Refer to licensing information at http://www.artifex.com/
- or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
- San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
-*/
-
-/* $Id$ */
-/* 16-bit access to print spooler from Win32s */
-/* by Russell Lang */
-/* 1995-11-23 */
-
-/*
- * Ghostscript produces printer specific output
- * which must be given to the print spooler.
- * Under Win16, the APIs OpenJob, WriteSpool etc. are used
- * Under Win32 and Windows 95/NT, the APIs OpenPrinter, WritePrinter etc.
- * are used.
- * Under Win32s, the 16-bit spooler APIs are not available, and the
- * 32-bit spooler APIs are not implemented.
- * This purpose of this application is to provide a means for the Win32s
- * version of Ghostscript to send output to the 16-bit spooler.
- */
-
-/*
- * Usage: gs16spl port filename
- *
- * filename will be sent to the spooler port.
- */
-
-
-#define STRICT
-#include <windows.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define ID_TEXT 100
-
-/* documented in Device Driver Adaptation Guide */
-/* Prototypes taken from print.h */
-DECLARE_HANDLE(HPJOB);
-
-HPJOB WINAPI OpenJob(LPSTR, LPSTR, HPJOB);
-int WINAPI StartSpoolPage(HPJOB);
-int WINAPI EndSpoolPage(HPJOB);
-int WINAPI WriteSpool(HPJOB, LPSTR, int);
-int WINAPI CloseJob(HPJOB);
-int WINAPI DeleteJob(HPJOB, int);
-int WINAPI WriteDialog(HPJOB, LPSTR, int);
-int WINAPI DeleteSpoolPage(HPJOB);
-
-#define MAXSTR 256
-#define PRINT_BUF_SIZE 16384
-
-HPJOB hJob;
-HWND hwndspl;
-DLGPROC lpfnSpoolProc;
-HINSTANCE phInstance;
-char port[MAXSTR];
-char filename[MAXSTR];
-char error_message[MAXSTR];
-int error;
-
-char szAppName[] = "GS Win32s/Win16 spooler";
-
-/* returns TRUE on success, FALSE on failure */
-int
-spoolfile(char *portname, char *filename)
-{
- FILE *f;
- char *buffer;
- char pcdone[64];
- long ldone;
- long lsize;
- int count;
- MSG msg;
-
- if ((*portname == '\0') || (*filename == '\0')) {
- strcpy(error_message, "Usage: gs16spl port filename");
- return FALSE;
- }
- if ((buffer = malloc(PRINT_BUF_SIZE)) == (char *)NULL)
- return FALSE;
-
- if ((f = fopen(filename, "rb")) == (FILE *) NULL) {
- sprintf(error_message, "Can't open %s", filename);
- free(buffer);
- return FALSE;
- }
- fseek(f, 0L, SEEK_END);
- lsize = ftell(f);
- if (lsize <= 0)
- lsize = 1;
- fseek(f, 0L, SEEK_SET);
- ldone = 0;
-
- hJob = OpenJob(portname, filename, (HDC) NULL);
- switch ((int)hJob) {
- case SP_APPABORT:
- case SP_ERROR:
- case SP_OUTOFDISK:
- case SP_OUTOFMEMORY:
- case SP_USERABORT:
- fclose(f);
- free(buffer);
- return FALSE;
- }
- if (StartSpoolPage(hJob) < 0)
- error = TRUE;
-
- while (!error
- && (count = fread(buffer, 1, PRINT_BUF_SIZE, f)) != 0) {
- if (WriteSpool(hJob, buffer, count) < 0)
- error = TRUE;
- ldone += count;
- sprintf(pcdone, "%d%% written to %s", (int)(ldone * 100 / lsize), portname);
- SetWindowText(GetDlgItem(hwndspl, ID_TEXT), pcdone);
- while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
- free(buffer);
- fclose(f);
-
- EndSpoolPage(hJob);
- if (error)
- DeleteJob(hJob, 0);
- else
- CloseJob(hJob);
- return !error;
-}
-
-
-/* Modeless dialog box - main window */
-BOOL CALLBACK _export
-SpoolDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
- switch (message) {
- case WM_INITDIALOG:
- SetWindowText(hDlg, szAppName);
- return TRUE;
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDCANCEL:
- error = TRUE;
- DestroyWindow(hDlg);
- EndDialog(hDlg, 0);
- PostQuitMessage(0);
- return TRUE;
- }
- }
- return FALSE;
-}
-
-
-void
-init_window(LPSTR cmdline)
-{
- LPSTR s;
- char *d;
-
- s = cmdline;
- /* skip leading spaces */
- while (*s && *s == ' ')
- s++;
- /* copy port name */
- d = port;
- while (*s && *s != ' ')
- *d++ = *s++;
- *d = '\0';
- /* skip spaces */
- while (*s && *s == ' ')
- s++;
- /* copy port name */
- d = filename;
- while (*s && *s != ' ')
- *d++ = *s++;
- *d = '\0';
-
- lpfnSpoolProc = (DLGPROC) MakeProcInstance((FARPROC) SpoolDlgProc, phInstance);
- hwndspl = CreateDialog(phInstance, "SpoolDlgBox", HWND_DESKTOP, lpfnSpoolProc);
-
- return;
-}
-
-int PASCAL
-WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int cmdShow)
-{
- MSG msg;
-
- phInstance = hInstance;
-
- init_window(lpszCmdLine);
- ShowWindow(hwndspl, cmdShow);
-
- if (!spoolfile(port, filename)) {
- /* wait, showing error message */
- SetWindowText(GetDlgItem(hwndspl, ID_TEXT), error_message);
- while (GetMessage(&msg, (HWND) NULL, 0, 0)) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
- DestroyWindow(hwndspl);
- FreeProcInstance((FARPROC) lpfnSpoolProc);
- return 0;
-}
Deleted: trunk/gs/src/gs16spl.def
===================================================================
--- trunk/gs/src/gs16spl.def 2007-01-12 21:08:02 UTC (rev 7603)
+++ trunk/gs/src/gs16spl.def 2007-01-12 22:15:32 UTC (rev 7604)
@@ -1,7 +0,0 @@
-NAME GS16SPL
-DESCRIPTION 'GS Win32s/Win16 spooler interface'
-EXETYPE WINDOWS
-CODE PRELOAD MOVEABLE DISCARDABLE
-DATA PRELOAD MULTIPLE MOVEABLE
-HEAPSIZE 256
-STACKSIZE 16384
Deleted: trunk/gs/src/gs16spl.rc
===================================================================
--- trunk/gs/src/gs16spl.rc 2007-01-12 21:08:02 UTC (rev 7603)
+++ trunk/gs/src/gs16spl.rc 2007-01-12 22:15:32 UTC (rev 7604)
@@ -1,37 +0,0 @@
-/* Copyright (C) 2001-2006 artofcode LLC.
- All Rights Reserved.
-
- This software is provided AS-IS with no warranty, either express or
- implied.
-
- This software is distributed under license and may not be copied, modified
- or distributed except as expressly authorized under the terms of that
- license. Refer to licensing information at http://www.artifex.com/
- or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
- San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
-*/
-
-/* $Id$*/
-/* Resources for GS16SPL.EXE, 16-bit access to print spooler */
-/* 1995-11-10 */
-
-#include <windows.h>
-
-#define ID_TEXT 100
-
-#ifndef gstext_ico
-#define gstext_ico gswin.ico
-#endif
-
-1 ICON gstext_ico
-
-SpoolDlgBox DIALOG 20, 32, 158, 56
-STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "GS Win32s/Win16 spooler"
-FONT 8, "Helv"
-BEGIN
- CONTROL "&Cancel", IDCANCEL, "button", BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP | WS_CHILD, 8, 36, 32, 14
- ICON 1, 1, 8, 8, 16, 16
- LTEXT "", ID_TEXT, 40, 12, 108, 8, WS_CHILD | WS_VISIBLE | WS_GROUP
-END
-
Deleted: trunk/gs/src/gswin386.rc
===================================================================
--- trunk/gs/src/gswin386.rc 2007-01-12 21:08:02 UTC (rev 7603)
+++ trunk/gs/src/gswin386.rc 2007-01-12 22:15:32 UTC (rev 7604)
@@ -1,4 +0,0 @@
-#include "windows.h"
-
-texticon ICON gswin.ico
-grpicon ICON gswin.ico
More information about the gs-cvs
mailing list