Rev 554 | Rev 556 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 554 | Rev 555 | ||
---|---|---|---|
Line 1079... | Line 1079... | ||
1079 | sfrTmp.sfScript = smSystemScript; |
1079 | sfrTmp.sfScript = smSystemScript; |
1080 | 1080 | ||
1081 | est = 16000; |
1081 | est = 16000; |
1082 | 1082 | ||
1083 | FSpDelete(&sfrTmp.sfFile); |
1083 | FSpDelete(&sfrTmp.sfFile); |
1084 | if (FSpCreate(&sfrTmp.sfFile, SIG_SIMPLETEXT, TEXT_FILETYPE, sfr->sfScript) == noErr) |
1084 | if (FSpCreate(&sfrTmp.sfFile, SIG_SIMPLETEXT, TEXT_FILETYPE, sfr->sfScript) == noErr) { |
1085 | if (FSpOpenDF(&sfrTmp.sfFile, fsWrPerm, &rTmp) == noErr) { |
1085 | if (FSpOpenDF(&sfrTmp.sfFile, fsWrPerm, &rTmp) == noErr) { |
1086 | if ((hTmp = PINEWHANDLE(1))) { // don't set initial size to 0, since some hosts (e.g. GIMP/PSPI) are incompatible with that. |
1086 | if ((hTmp = PINEWHANDLE(1))) { // don't set initial size to 0, since some hosts (e.g. GIMP/PSPI) are incompatible with that. |
1087 | PIUNLOCKHANDLE(hTmp); // should not be necessary |
1087 | PIUNLOCKHANDLE(hTmp); // should not be necessary |
1088 | if (!(e = PISETHANDLESIZE(hTmp, (int32)(est))) && (p = start = PILOCKHANDLE(hTmp, false))) { |
1088 | if (!(e = PISETHANDLESIZE(hTmp, (int32)(est))) && (p = start = PILOCKHANDLE(hTmp, false))) { |
1089 | 1089 | ||
Line 1132... | Line 1132... | ||
1132 | e = PISETHANDLESIZE(hTmp, (int32)(p - start)); // could ignore this error, maybe |
1132 | e = PISETHANDLESIZE(hTmp, (int32)(p - start)); // could ignore this error, maybe |
1133 | } |
1133 | } |
1134 | savehandleintofile(hTmp, rTmp); |
1134 | savehandleintofile(hTmp, rTmp); |
1135 | PIDISPOSEHANDLE(hTmp); |
1135 | PIDISPOSEHANDLE(hTmp); |
1136 | } |
1136 | } |
- | 1137 | else res = MSG_OUT_OF_MEMORY_ID; |
|
1137 | FSClose(rTmp); |
1138 | FSClose(rTmp); |
1138 | } |
1139 | } |
- | 1140 | else res = MSG_CANNOT_OPEN_FILE_ID; |
|
- | 1141 | } |
|
- | 1142 | else res = MSG_CANNOT_CREATE_FILE_ID; |
|
1139 | 1143 | ||
1140 | free(curFileNameOrig); |
1144 | free(curFileNameOrig); |
1141 | for (i = 0; i < 29; i++) { |
1145 | for (i = 0; i < 29; i++) { |
1142 | free(tmp_cur_filter_str[i]); // free all "token2" |
1146 | free(tmp_cur_filter_str[i]); // free all "token2" |
1143 | } |
1147 | } |