1 | /**************************************************************************
|
---|
2 | *
|
---|
3 | * SOURCE FILE NAME = PDFWRITE.H
|
---|
4 | *
|
---|
5 | * DESCRIPTIVE NAME = Portdriver to redirect PS stream to GhostScript header file
|
---|
6 | *
|
---|
7 | * Copyright : COPYRIGHT IBM CORPORATION, 1991, 1992
|
---|
8 | * LICENSED MATERIAL - PROGRAM PROPERTY OF IBM
|
---|
9 | * REFER TO COPYRIGHT INSTRUCTION FORM#G120-2083
|
---|
10 | * RESTRICTED MATERIALS OF IBM
|
---|
11 | * IBM CONFIDENTIAL
|
---|
12 | *
|
---|
13 | * VERSION = V2.0
|
---|
14 | *
|
---|
15 | * DATE
|
---|
16 | *
|
---|
17 | * DESCRIPTION
|
---|
18 | *
|
---|
19 | *
|
---|
20 | * FUNCTIONS
|
---|
21 | *
|
---|
22 | * ENTRY POINTS:
|
---|
23 | *
|
---|
24 | * DEPENDENCIES:
|
---|
25 | *
|
---|
26 | * NOTES
|
---|
27 | *
|
---|
28 | *
|
---|
29 | * STRUCTURES
|
---|
30 | *
|
---|
31 | * EXTERNAL REFERENCES
|
---|
32 | *
|
---|
33 | * EXTERNAL FUNCTIONS
|
---|
34 | *
|
---|
35 | * CHANGE ACTIVITY =
|
---|
36 | * DATE FLAG APAR CHANGE DESCRIPTION
|
---|
37 | * -------- ---------- ----- --------------------------------------
|
---|
38 | * mm/dd/yy @Vr.mpppxx xxxxx xxxxxxx
|
---|
39 | *
|
---|
40 | ****************************************************************************/
|
---|
41 |
|
---|
42 | #define LINT_ARGS /* argument checking enabled */
|
---|
43 |
|
---|
44 | #define INCL_DOS
|
---|
45 | #define INCL_GPI
|
---|
46 | #undef INCL_GPI
|
---|
47 | #define INCL_DEV
|
---|
48 | #define INCL_DOSMEMMGR /* Include standard OS/2 support */
|
---|
49 | #define INCL_DOSMODULEMGR /* For DosLoadModule */
|
---|
50 | #define INCL_DOSPROCESS
|
---|
51 | #define INCL_GPILCIDS
|
---|
52 | #define INCL_WINCOMMON /* Include Window Management support */
|
---|
53 | #define INCL_WINDOWMGR
|
---|
54 | #define INCL_WINSWITCHLIST
|
---|
55 | #define INCL_WINPROGRAMLIST
|
---|
56 | #define INCL_WINMENUS
|
---|
57 | #define INCL_WINWINDOWMGR
|
---|
58 | #define INCL_WINMESSAGEMGR
|
---|
59 | #define INCL_WINDIALOGS
|
---|
60 | #define INCL_WINMLE
|
---|
61 | #define INCL_WINSTATICS
|
---|
62 | #define INCL_WINLISTBOXES
|
---|
63 | #define INCL_WINMENUS
|
---|
64 | #define INCL_WINSYS
|
---|
65 | #define INCL_WINFRAMEMGR
|
---|
66 | #define INCL_WINSTDBOOK
|
---|
67 | #define INCL_INCLWINACCELERATORS
|
---|
68 | #define INCL_WINPOINTERS
|
---|
69 | #define INCL_WINERRORS
|
---|
70 | #define INCL_WINSHELLDATA
|
---|
71 |
|
---|
72 | #define INCL_WINTYPES
|
---|
73 | #define INCL_WINACCELERATORS
|
---|
74 | #define INCL_WINBUTTONS
|
---|
75 | #define INCL_WINENTRYFIELDS
|
---|
76 | #define INCL_WINRECTANGLES
|
---|
77 | #define INCL_WINTIMER
|
---|
78 | #define INCL_WINSCROLLBARS
|
---|
79 | #define INCL_WINHEAP
|
---|
80 | #define INCL_SHLERRORS
|
---|
81 | #define INCL_WININPUT
|
---|
82 | #define INCL_WINHELP
|
---|
83 | #define INCL_WINSTDSPIN
|
---|
84 | #define INCL_WINSTDFILE
|
---|
85 | //#define USE_OS2_TOOLKIT_HEADERS
|
---|
86 |
|
---|
87 |
|
---|
88 | #define INCL_SPL
|
---|
89 | #define INCL_SPLP
|
---|
90 | #define INCL_SPLERRORS
|
---|
91 | #define INCL_SHLERRORS
|
---|
92 | #define INCL_DOSERRORS
|
---|
93 | #define INCL_WINHOOKS
|
---|
94 | #define INCL_SPLDOSPRINT
|
---|
95 |
|
---|
96 | #include <os2.h>
|
---|
97 | #include <stdlib.h>
|
---|
98 | #include <stdio.h>
|
---|
99 | #ifndef RC_INVOKED
|
---|
100 | #include <string.h>
|
---|
101 | #include <setjmp.h>
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | //
|
---|
105 | // Include this private version of the public header pmsplb.h
|
---|
106 | // only if pmsplb.h is not in the current headers
|
---|
107 | //
|
---|
108 | #ifndef PMSPLB_INCLUDED
|
---|
109 | #include "pmsplnew.h"
|
---|
110 | #endif
|
---|
111 |
|
---|
112 | #define XWPENTRY _Optlink
|
---|
113 |
|
---|
114 | #include "ecui.h"
|
---|
115 | #include "ecdata.h"
|
---|
116 | #include "ecuidata.h"
|
---|
117 | #include "helpers\except.h"
|
---|
118 |
|
---|
119 |
|
---|
120 |
|
---|
121 |
|
---|
122 | #define NO_ERROR 0
|
---|
123 | #define ERROR_MORE_DATA 234
|
---|
124 | #define ERROR_INSUFFICIENT_BUFFER 122
|
---|
125 |
|
---|
126 |
|
---|
127 | #define STR_LEN_PORTNAME 64
|
---|
128 | #define STR_LEN_PORTDESC 256
|
---|
129 | #define STR_LEN_DESC 81
|
---|
130 | #define PORT_ENTRY_LEN 256
|
---|
131 | #define STR_LEN_TITLE 256
|
---|
132 |
|
---|
133 | #define INI_TYPE_ULONG 1
|
---|
134 | #define INI_TYPE_STRING 2
|
---|
135 |
|
---|
136 | #define NumPorts() (((PORT_ID_LAST - PORT_ID_FIRST) >> 1) + 1)
|
---|
137 |
|
---|
138 |
|
---|
139 | ULONG OpenSerPortDlg (HAB, HMODULE, PSZ, PSZ);
|
---|
140 | MRESULT EXPENTRY CommDlg ( HWND, USHORT, MPARAM, MPARAM );
|
---|
141 | VOID DE (PSZ);
|
---|
142 | VOID DisplayMsg (PSZ);
|
---|
143 | USHORT DisplayError (HWND, HMODULE, USHORT, USHORT);
|
---|
144 | ULONG CalcBufLength (HAB, HMODULE);
|
---|
145 | ULONG CalcStructLength (HAB, HMODULE, USHORT);
|
---|
146 | ULONG NumPortsCanFit (HAB, HMODULE, ULONG);
|
---|
147 | VOID CopyNPorts (HAB, HMODULE, PCH, ULONG);
|
---|
148 | VOID CopyStruct (HAB, HMODULE, USHORT, PCH, PULONG, PULONG);
|
---|
149 | BOOL GetPortDescription (HAB, HMODULE, PSZ, PSZ);
|
---|
150 | HWND CreateHelpInstance(HWND);
|
---|
151 |
|
---|
152 |
|
---|
153 |
|
---|
154 | #define PATH_ECUPS_PDR "?:\\OS2\\DLL\\ECUPS.PDR"
|
---|
155 | #define PROC_WIN32ASSOCIATEHELPINSTANCE (PSZ)"WIN32ASSOCIATEHELPINSTANCE"
|
---|
156 | #define PROC_WIN32CREATEHELPINSTANCE (PSZ)"WIN32CREATEHELPINSTANCE"
|
---|
157 | #define PROC_WIN32DESTROYHELPINSTANCE (PSZ)"WIN32DESTROYHELPINSTANCE"
|
---|
158 | #define PROC_WIN32QUERYHELPINSTANCE (PSZ)"WIN32QUERYHELPINSTANCE"
|
---|
159 |
|
---|
160 |
|
---|
161 | /*
|
---|
162 | ** Local Functions
|
---|
163 | */
|
---|
164 |
|
---|
165 | ULONG CalcBufLength ( HAB hab, HMODULE hModule );
|
---|
166 | ULONG CalcStructLength ( HAB hab, HMODULE hModule, USHORT usID );
|
---|
167 | ULONG NumPortsCanFit ( HAB hab, HMODULE hModule, ULONG cbBuf );
|
---|
168 | VOID CopyNPorts ( HAB hab, HMODULE hModule, PCH pBuf, ULONG ulReturned );
|
---|
169 | VOID CopyStruct ( HAB hab, HMODULE hModule, USHORT usID, PCH pBuf,
|
---|
170 | PULONG pulBeginStruct, PULONG pulBeginText );
|
---|
171 | BOOL GetPortDescription ( HAB hab, HMODULE hModule, PSZ pszPortName,
|
---|
172 | PSZ pszPortDesc );
|
---|
173 |
|
---|
174 |
|
---|
175 | BOOL SavePortSettings();
|
---|
176 | BOOL GetPortSettings();
|
---|
177 | VOID GetPortDefaultSettings(PSZ pszSaveCommSetting);
|
---|
178 | VOID RemoveLeadTrailBlanks (PCH pTarget, PCH pSource);
|
---|
179 |
|
---|
180 |
|
---|
181 | //BOOL RunGhostScript(char *command,char *parameters[],int numparms);
|
---|
182 | BOOL RunGhostScript(char *command,char *parameters,int numparms);
|
---|
183 |
|
---|
184 | VOID DE (PCH str);
|
---|
185 | USHORT DisplayError (HWND hwndOwner, HMODULE hModule,
|
---|
186 | USHORT usStringID, USHORT usWinStyle );
|
---|
187 | HWND APIENTRY NewWinFileDlg(HWND hwndOwner, PFILEDLG pfd);
|
---|
188 | FILE *openTrapFile();
|
---|
189 | FILE *failTrapFile();
|
---|