Debian Codegraph @

biosig4c++/igor/patchIgorXOPs.diff

raw
1 diff -rc IgorXOPs5.bak/XOP1/XOP1.c IgorXOPs5/XOP1/XOP1.c
2 *** IgorXOPs5.bak/XOP1/XOP1.c Mon Mar 22 14:26:10 2004
3 --- IgorXOPs5/XOP1/XOP1.c Mon Oct 18 14:02:39 2010
4 ***************
5 *** 128,134 ****
6 cmdTemplate = "XOP1 wave";
7 runtimeNumVarList = "";
8 runtimeStrVarList = "";
9 ! return RegisterOperation(cmdTemplate, runtimeNumVarList, runtimeStrVarList, sizeof(XOP1RuntimeParams), ExecuteXOP1, 0);
10 }
11
12 static int
13 --- 128,134 ----
14 cmdTemplate = "XOP1 wave";
15 runtimeNumVarList = "";
16 runtimeStrVarList = "";
17 ! return RegisterOperation(cmdTemplate, runtimeNumVarList, runtimeStrVarList, sizeof(XOP1RuntimeParams), (void*)(ExecuteXOP1), 0);
18 }
19
20 static int
21 ***************
22 *** 169,176 ****
23 main does any necessary initialization and then sets the XOPEntry field of the
24 ioRecHandle to the address to be called for future messages.
25 */
26 ! HOST_IMPORT void
27 ! main(IORecHandle ioRecHandle)
28 {
29 int result;
30
31 --- 169,175 ----
32 main does any necessary initialization and then sets the XOPEntry field of the
33 ioRecHandle to the address to be called for future messages.
34 */
35 ! HOST_IMPORT int main(IORecHandle ioRecHandle)
36 {
37 int result;
38
39 diff -rc IgorXOPs5.bak/XOP1/XOP1.h IgorXOPs5/XOP1/XOP1.h
40 *** IgorXOPs5.bak/XOP1/XOP1.h Mon Mar 22 14:26:10 2004
41 --- IgorXOPs5/XOP1/XOP1.h Mon Oct 18 13:59:03 2010
42 ***************
43 *** 5,8 ****
44 /* no equates needed */
45
46 /* Prototypes */
47 ! HOST_IMPORT void main(IORecHandle ioRecHandle);
48 --- 5,8 ----
49 /* no equates needed */
50
51 /* Prototypes */
52 ! HOST_IMPORT int main(IORecHandle ioRecHandle);
53 diff -rc IgorXOPs5.bak/XOPSupport/XOPStandardHeaders.h IgorXOPs5/XOPSupport/XOPStandardHeaders.h
54 *** IgorXOPs5.bak/XOPSupport/XOPStandardHeaders.h Fri Sep 1 10:36:28 2006
55 --- IgorXOPs5/XOPSupport/XOPStandardHeaders.h Mon Oct 18 14:03:25 2010
56 ***************
57 *** 36,42 ****
58
59 // We use the WIN32 symbol to detect that we are compiling for Windows because _WINDOWS_ is not defined until we include Windows.h.
60 #ifdef WIN32 // Compiling for Windows [
61 ! #include <Windows.h> // This creates the _WINDOWS_ symbol.
62
63 #ifdef SetPort // SetPort is defined in WinSpool.h
64 #undef SetPort // But we use SetPort in the Macintosh sense.
65 --- 36,42 ----
66
67 // We use the WIN32 symbol to detect that we are compiling for Windows because _WINDOWS_ is not defined until we include Windows.h.
68 #ifdef WIN32 // Compiling for Windows [
69 ! #include <windows.h> // This creates the _WINDOWS_ symbol.
70
71 #ifdef SetPort // SetPort is defined in WinSpool.h
72 #undef SetPort // But we use SetPort in the Macintosh sense.
73 diff -rc IgorXOPs5.bak/XOPSupport/XOPSupport.c IgorXOPs5/XOPSupport/XOPSupport.c
74 *** IgorXOPs5.bak/XOPSupport/XOPSupport.c Fri Jul 13 13:30:50 2007
75 --- IgorXOPs5/XOPSupport/XOPSupport.c Mon Oct 18 14:34:36 2010
76 ***************
77 *** 370,376 ****
78 versionInfoSize = GetFileVersionInfoSize(igorName, &dwHandle);
79 if (versionInfoSize <= 0)
80 return 0;
81 ! versionBuffer = NewPtr(versionInfoSize);
82 if (versionBuffer == NULL)
83 return 0;
84 if (GetFileVersionInfo(igorName, 0L, versionInfoSize, versionBuffer) == 0) {
85 --- 370,376 ----
86 versionInfoSize = GetFileVersionInfoSize(igorName, &dwHandle);
87 if (versionInfoSize <= 0)
88 return 0;
89 ! versionBuffer = (char*)NewPtr(versionInfoSize);
90 if (versionBuffer == NULL)
91 return 0;
92 if (GetFileVersionInfo(igorName, 0L, versionInfoSize, versionBuffer) == 0) {
93 diff -rc IgorXOPs5.bak/GBLoadWave/GBLoadWave.c IgorXOPs5/GBLoadWave/GBLoadWave.c
94 *** IgorXOPs5.bak/GBLoadWave/GBLoadWave.c Mon Mar 22 14:25:16 2004
95 --- IgorXOPs5/GBLoadWave/GBLoadWave.c Thu Oct 28 10:13:30 2010
96 ***************
97 *** 379,385 ****
98
99 bytesInWave = arrayPoints * bytesInPoint;
100 totalBytes = numArrays * bytesInWave;
101 ! buffer = NewPtr(totalBytes);
102 if (buffer == NIL)
103 return NOMEM;
104
105 --- 379,385 ----
106
107 bytesInWave = arrayPoints * bytesInPoint;
108 totalBytes = numArrays * bytesInWave;
109 ! buffer = (char*)NewPtr(totalBytes);
110 if (buffer == NIL)
111 return NOMEM;
112
113 ***************
114 *** 495,501 ****
115 */
116 buffer = NIL;
117 if (lsp->inputBytesPerPoint > lsp->outputBytesPerPoint) { // Can't read directly into wave?
118 ! buffer = NewPtr(numPoints*lsp->inputBytesPerPoint); // Get temporary buffer.
119 if (buffer == NIL)
120 return NOMEM;
121 }
122 --- 495,501 ----
123 */
124 buffer = NIL;
125 if (lsp->inputBytesPerPoint > lsp->outputBytesPerPoint) { // Can't read directly into wave?
126 ! buffer = (char*)NewPtr(numPoints*lsp->inputBytesPerPoint); // Get temporary buffer.
127 if (buffer == NIL)
128 return NOMEM;
129 }
130 ***************
131 *** 504,510 ****
132 ciPtr = caPtr + column;
133 GetWaveStuff(ciPtr->waveHandle, &ciPtr->hState, &dataType, &ciPtr->dataPtr);
134 if (buffer==NIL) // Reading directly into wave.
135 ! readDataPtr = ciPtr->dataPtr;
136 else // Reading into buffer.
137 readDataPtr = buffer;
138 count = lsp->inputBytesPerPoint*numPoints;
139 --- 504,510 ----
140 ciPtr = caPtr + column;
141 GetWaveStuff(ciPtr->waveHandle, &ciPtr->hState, &dataType, &ciPtr->dataPtr);
142 if (buffer==NIL) // Reading directly into wave.
143 ! readDataPtr = (char*)ciPtr->dataPtr;
144 else // Reading into buffer.
145 readDataPtr = buffer;
146 count = lsp->inputBytesPerPoint*numPoints;
147 ***************
148 *** 840,846 ****
149 main does any necessary initialization and then sets the XOPEntry field of the
150 XOPRecHandle to the address to be called for future messages.
151 */
152 ! HOST_IMPORT void
153 main(IORecHandle ioRecHandle)
154 {
155 int result;
156 --- 840,846 ----
157 main does any necessary initialization and then sets the XOPEntry field of the
158 XOPRecHandle to the address to be called for future messages.
159 */
160 ! HOST_IMPORT int
161 main(IORecHandle ioRecHandle)
162 {
163 int result;
164 ***************
165 *** 850,861 ****
166
167 if (igorVersion < 500) {
168 SetXOPResult(OLD_IGOR); // OLD_IGOR is defined in GBLoadWave.h and there are corresponding error strings in GBLoadWave.r and GBLoadWaveWinCustom.rc.
169 ! return;
170 }
171
172 if (result = RegisterOperations()) {
173 SetXOPResult(result);
174 ! return;
175 }
176
177 SetXOPResult(0L);
178 --- 850,861 ----
179
180 if (igorVersion < 500) {
181 SetXOPResult(OLD_IGOR); // OLD_IGOR is defined in GBLoadWave.h and there are corresponding error strings in GBLoadWave.r and GBLoadWaveWinCustom.rc.
182 ! return (0);
183 }
184
185 if (result = RegisterOperations()) {
186 SetXOPResult(result);
187 ! return (0);
188 }
189
190 SetXOPResult(0L);
191 diff -rc IgorXOPs5.bak/GBLoadWave/GBLoadWave.h IgorXOPs5/GBLoadWave/GBLoadWave.h
192 *** IgorXOPs5.bak/GBLoadWave/GBLoadWave.h Mon Mar 22 14:25:16 2004
193 --- IgorXOPs5/GBLoadWave/GBLoadWave.h Thu Oct 28 10:12:19 2010
194 ***************
195 *** 111,117 ****
196 /* Prototypes */
197
198 // In GBLoadWave.c
199 ! HOST_IMPORT void main(IORecHandle ioRecHandle);
200 int LoadWave(LoadSettings* lsp, const char* baseName, const char* symbolicPathName, const char* fileParam, int runningInUserFunction);
201
202 // In GBLoadWaveOperation.c
203 --- 111,117 ----
204 /* Prototypes */
205
206 // In GBLoadWave.c
207 ! HOST_IMPORT int main(IORecHandle ioRecHandle);
208 int LoadWave(LoadSettings* lsp, const char* baseName, const char* symbolicPathName, const char* fileParam, int runningInUserFunction);
209
210 // In GBLoadWaveOperation.c
211 diff -rc IgorXOPs5.bak/GBLoadWave/GBLoadWaveDialog.c IgorXOPs5/GBLoadWave/GBLoadWaveDialog.c
212 *** IgorXOPs5.bak/GBLoadWave/GBLoadWaveDialog.c Mon Mar 22 14:25:16 2004
213 --- IgorXOPs5/GBLoadWave/GBLoadWaveDialog.c Thu Oct 28 11:34:13 2010
214 ***************
215 *** 322,328 ****
216 }
217
218 static int
219 ! DataTypeItemNumberToDataTypeCode(dataTypeItemNumber)
220 {
221 int result;
222
223 --- 322,328 ----
224 }
225
226 static int
227 ! DataTypeItemNumberToDataTypeCode(int dataTypeItemNumber)
228 {
229 int result;
230
231 diff -rc IgorXOPs5.bak/GBLoadWave/GBLoadWaveOperation.c IgorXOPs5/GBLoadWave/GBLoadWaveOperation.c
232 *** IgorXOPs5.bak/GBLoadWave/GBLoadWaveOperation.c Mon Mar 22 14:25:16 2004
233 --- IgorXOPs5/GBLoadWave/GBLoadWaveOperation.c Thu Oct 28 10:47:16 2010
234 ***************
235 *** 348,352 ****
236 cmdTemplate = "GBLoadWave /A[=name:ABaseName] /B[=number:lowByteFirst] /D[=number:doublePrecision] /F=number:dataFormat /I[={string:macFilterStr,string:winFilterStr}] /J=number:floatFormat /L=number:dataLengthInBits /N[=name:NBaseName] /O[=number:overwrite] /P=name:pathName /Q[=number:quiet] /S=number:skipBytes /T={number:fileDataType,number:waveDataType} /U=number:pointsPerArray /V[=number:interleaved] /W=number:numberOfArraysInFile /Y={number:offset,number:multiplier} [string:fileParamStr]";
237 runtimeNumVarList = "V_flag;";
238 runtimeStrVarList = "S_fileName;S_path;S_waveNames;";
239 ! return RegisterOperation(cmdTemplate, runtimeNumVarList, runtimeStrVarList, sizeof(GBLoadWaveRuntimeParams), ExecuteGBLoadWave, 0);
240 }
241 --- 348,352 ----
242 cmdTemplate = "GBLoadWave /A[=name:ABaseName] /B[=number:lowByteFirst] /D[=number:doublePrecision] /F=number:dataFormat /I[={string:macFilterStr,string:winFilterStr}] /J=number:floatFormat /L=number:dataLengthInBits /N[=name:NBaseName] /O[=number:overwrite] /P=name:pathName /Q[=number:quiet] /S=number:skipBytes /T={number:fileDataType,number:waveDataType} /U=number:pointsPerArray /V[=number:interleaved] /W=number:numberOfArraysInFile /Y={number:offset,number:multiplier} [string:fileParamStr]";
243 runtimeNumVarList = "V_flag;";
244 runtimeStrVarList = "S_fileName;S_path;S_waveNames;";
245 ! return RegisterOperation(cmdTemplate, runtimeNumVarList, runtimeStrVarList, sizeof(GBLoadWaveRuntimeParams), (void*)(ExecuteGBLoadWave), 0);
246 }
247 diff -rc IgorXOPs5.bak/XOP1/XOP1.c IgorXOPs5/XOP1/XOP1.c
248 *** IgorXOPs5.bak/XOP1/XOP1.c Mon Mar 22 14:26:10 2004
249 --- IgorXOPs5/XOP1/XOP1.c Wed Oct 27 14:08:58 2010
250 ***************
251 *** 128,134 ****
252 cmdTemplate = "XOP1 wave";
253 runtimeNumVarList = "";
254 runtimeStrVarList = "";
255 ! return RegisterOperation(cmdTemplate, runtimeNumVarList, runtimeStrVarList, sizeof(XOP1RuntimeParams), ExecuteXOP1, 0);
256 }
257
258 static int
259 --- 128,134 ----
260 cmdTemplate = "XOP1 wave";
261 runtimeNumVarList = "";
262 runtimeStrVarList = "";
263 ! return RegisterOperation(cmdTemplate, runtimeNumVarList, runtimeStrVarList, sizeof(XOP1RuntimeParams), (void*)(ExecuteXOP1), 0);
264 }
265
266 static int
267 ***************
268 *** 169,176 ****
269 main does any necessary initialization and then sets the XOPEntry field of the
270 ioRecHandle to the address to be called for future messages.
271 */
272 ! HOST_IMPORT void
273 ! main(IORecHandle ioRecHandle)
274 {
275 int result;
276
277 --- 169,175 ----
278 main does any necessary initialization and then sets the XOPEntry field of the
279 ioRecHandle to the address to be called for future messages.
280 */
281 ! HOST_IMPORT int main(IORecHandle ioRecHandle)
282 {
283 int result;
284
285 ***************
286 *** 180,186 ****
287
288 if (result = RegisterOperations()) {
289 SetXOPResult(result);
290 ! return;
291 }
292
293 SetXOPResult(0);
294 --- 179,185 ----
295
296 if (result = RegisterOperations()) {
297 SetXOPResult(result);
298 ! return (0);
299 }
300
301 SetXOPResult(0);
302 diff -rc IgorXOPs5.bak/XOP1/XOP1.h IgorXOPs5/XOP1/XOP1.h
303 *** IgorXOPs5.bak/XOP1/XOP1.h Mon Mar 22 14:26:10 2004
304 --- IgorXOPs5/XOP1/XOP1.h Mon Oct 18 13:59:03 2010
305 ***************
306 *** 5,8 ****
307 /* no equates needed */
308
309 /* Prototypes */
310 ! HOST_IMPORT void main(IORecHandle ioRecHandle);
311 --- 5,8 ----
312 /* no equates needed */
313
314 /* Prototypes */
315 ! HOST_IMPORT int main(IORecHandle ioRecHandle);
316 diff -rc IgorXOPs5.bak/XOPSupport/XOPStandardHeaders.h IgorXOPs5/XOPSupport/XOPStandardHeaders.h
317 *** IgorXOPs5.bak/XOPSupport/XOPStandardHeaders.h Fri Sep 1 10:36:28 2006
318 --- IgorXOPs5/XOPSupport/XOPStandardHeaders.h Mon Oct 18 14:03:25 2010
319 ***************
320 *** 36,42 ****
321
322 // We use the WIN32 symbol to detect that we are compiling for Windows because _WINDOWS_ is not defined until we include Windows.h.
323 #ifdef WIN32 // Compiling for Windows [
324 ! #include <Windows.h> // This creates the _WINDOWS_ symbol.
325
326 #ifdef SetPort // SetPort is defined in WinSpool.h
327 #undef SetPort // But we use SetPort in the Macintosh sense.
328 --- 36,42 ----
329
330 // We use the WIN32 symbol to detect that we are compiling for Windows because _WINDOWS_ is not defined until we include Windows.h.
331 #ifdef WIN32 // Compiling for Windows [
332 ! #include <windows.h> // This creates the _WINDOWS_ symbol.
333
334 #ifdef SetPort // SetPort is defined in WinSpool.h
335 #undef SetPort // But we use SetPort in the Macintosh sense.
336 diff -rc IgorXOPs5.bak/XOPSupport/XOPSupport.c IgorXOPs5/XOPSupport/XOPSupport.c
337 *** IgorXOPs5.bak/XOPSupport/XOPSupport.c Fri Jul 13 13:30:50 2007
338 --- IgorXOPs5/XOPSupport/XOPSupport.c Mon Oct 18 14:34:36 2010
339 ***************
340 *** 370,376 ****
341 versionInfoSize = GetFileVersionInfoSize(igorName, &dwHandle);
342 if (versionInfoSize <= 0)
343 return 0;
344 ! versionBuffer = NewPtr(versionInfoSize);
345 if (versionBuffer == NULL)
346 return 0;
347 if (GetFileVersionInfo(igorName, 0L, versionInfoSize, versionBuffer) == 0) {
348 --- 370,376 ----
349 versionInfoSize = GetFileVersionInfoSize(igorName, &dwHandle);
350 if (versionInfoSize <= 0)
351 return 0;
352 ! versionBuffer = (char*)NewPtr(versionInfoSize);
353 if (versionBuffer == NULL)
354 return 0;
355 if (GetFileVersionInfo(igorName, 0L, versionInfoSize, versionBuffer) == 0) {
356 Only in IgorXOPs5/XOPSupport: XOPSupport.c.rej