Rev 272 | Rev 283 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 272 | Rev 276 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | 62 | ||
63 | // MPW MrC requires prototype |
63 | // MPW MrC requires prototype |
64 | DLLEXPORT MACPASCAL |
64 | DLLEXPORT MACPASCAL |
65 | void ENTRYPOINT(short selector,FilterRecordPtr pb,intptr_t *data,short *result); |
65 | void ENTRYPOINT(short selector,FilterRecordPtr pb,intptr_t *data,short *result); |
66 | 66 | ||
67 | unsigned long get_parm_hash(PARM_T parm) { |
67 | unsigned long get_parm_hash(PARM_T *parm) { |
68 | unsigned long hash; |
68 | unsigned long hash; |
69 | int i; |
69 | int i; |
70 | 70 | ||
71 | hash = djb2((char*)parm.category); |
71 | hash = djb2((char*)parm->category); |
72 | hash += djb2((char*)parm.title); |
72 | hash += djb2((char*)parm->title); |
73 | hash += djb2((char*)parm.copyright); |
73 | hash += djb2((char*)parm->copyright); |
74 | hash += djb2((char*)parm.author); |
74 | hash += djb2((char*)parm->author); |
75 | for (i = 0; i < 4; i++) hash += hash += djb2((char*)parm.map[i]); |
75 | for (i = 0; i < 4; i++) hash += hash += djb2((char*)parm->map[i]); |
76 | for (i = 0; i < 8; i++) hash += hash += djb2((char*)parm.ctl[i]); |
76 | for (i = 0; i < 8; i++) hash += hash += djb2((char*)parm->ctl[i]); |
77 | for (i = 0; i < 4; i++) hash += hash += djb2((char*)parm.formula[i]); |
77 | for (i = 0; i < 4; i++) hash += hash += djb2((char*)parm->formula[i]); |
78 | 78 | ||
79 | return hash; |
79 | return hash; |
80 | } |
80 | } |
81 | 81 | ||
82 | DLLEXPORT MACPASCAL |
82 | DLLEXPORT MACPASCAL |
Line 245... | Line 245... | ||
245 | if (strlen(tempdir) > 0) strcat(tempdir, "\\"); |
245 | if (strlen(tempdir) > 0) strcat(tempdir, "\\"); |
246 | #else |
246 | #else |
247 | if (strlen(tempdir) > 0) strcat(tempdir, "/"); |
247 | if (strlen(tempdir) > 0) strcat(tempdir, "/"); |
248 | #endif |
248 | #endif |
249 | 249 | ||
250 | hash = (gdata->standalone) ? get_parm_hash(gdata->parm) : 0; |
250 | hash = (gdata->standalone) ? get_parm_hash(&gdata->parm) : 0; |
251 | sprintf(outfilename, "%sFilterFoundry%d.afs", tempdir, hash); |
251 | sprintf(outfilename, "%sFilterFoundry%d.afs", tempdir, hash); |
252 | 252 | ||
253 | myc2pstrcpy(sfr.sfFile.name, outfilename); |
253 | myc2pstrcpy(sfr.sfFile.name, outfilename); |
254 | #ifdef WIN_ENV |
254 | #ifdef WIN_ENV |
255 | sfr.nFileExtension = (WORD)(strlen(outfilename) - strlen(".afs") + 1); |
255 | sfr.nFileExtension = (WORD)(strlen(outfilename) - strlen(".afs") + 1); |
Line 343... | Line 343... | ||
343 | if (strlen(tempdir) > 0) strcat(tempdir, "\\"); |
343 | if (strlen(tempdir) > 0) strcat(tempdir, "\\"); |
344 | #else |
344 | #else |
345 | if (strlen(tempdir) > 0) strcat(tempdir, "/"); |
345 | if (strlen(tempdir) > 0) strcat(tempdir, "/"); |
346 | #endif |
346 | #endif |
347 | 347 | ||
348 | hash = (isStandalone) ? get_parm_hash(gdata->parm) : 0; |
348 | hash = (isStandalone) ? get_parm_hash(&gdata->parm) : 0; |
349 | sprintf(outfilename, "%sFilterFoundry%d.afs", tempdir, hash); |
349 | sprintf(outfilename, "%sFilterFoundry%d.afs", tempdir, hash); |
350 | 350 | ||
351 | myc2pstrcpy(sfr.sfFile.name, outfilename); |
351 | myc2pstrcpy(sfr.sfFile.name, outfilename); |
352 | #ifdef WIN_ENV |
352 | #ifdef WIN_ENV |
353 | sfr.nFileExtension = (WORD)(strlen(outfilename) - strlen(".afs") + 1); |
353 | sfr.nFileExtension = (WORD)(strlen(outfilename) - strlen(".afs") + 1); |