Changeset 1544 for trunk/dll/printer.c
- Timestamp:
- Sep 30, 2010, 3:00:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/printer.c
r1505 r1544 81 81 CHAR param = 0, data = 0; 82 82 ULONG datalen = 1, parmlen = 1, htype, flagword; 83 CHAR *modea = "a+"; 83 84 84 85 if (!fWorkPlace) /* assume spooler is active */ 85 86 return TRUE; 86 87 DosError(FERR_DISABLEHARDERR); 87 printhandle = xfopen(printdevname, "a+", pszSrcFile, __LINE__);88 printhandle = xfopen(printdevname, modea, pszSrcFile, __LINE__, FALSE); 88 89 if (printhandle) { 89 90 if (!strnicmp(printdevname, "COM", 3) && isdigit(printdevname[3])) { … … 138 139 int c; 139 140 APIRET rc = MBID_YES; 141 CHAR *mode; 140 142 141 143 if (StopPrinting) … … 176 178 Runtime_Error(pszSrcFile, __LINE__, "printer %s error", 177 179 li->targetpath); 178 else { 179 fpi = _fsopen(li->list[x], "r", SH_DENYWR); 180 else { 181 mode = "r"; 182 fpi = xfsopen(li->list[x], mode, SH_DENYWR, pszSrcFile, __LINE__, TRUE); 180 183 if (!fpi) 181 184 Runtime_Error(pszSrcFile, __LINE__, "cannot open %s", 182 185 li->list[x]); 183 else { 184 fpo = _fsopen(li->targetpath, "a+", SH_DENYRW); 186 else { 187 mode = "a+"; 188 fpo = xfsopen(li->targetpath, mode, SH_DENYRW, pszSrcFile, __LINE__, TRUE); 185 189 if (!fpo) 186 190 Runtime_Error(pszSrcFile, __LINE__, "cannot open %s", … … 310 314 } 311 315 if (prnalt && prnformat && firstpass && pages > 1) { 312 fclose(fpo); 313 fpo = _fsopen(li->targetpath, "a+", SH_DENYRW); 316 fclose(fpo); 317 mode = "a+"; 318 fpo = xfsopen(li->targetpath, mode, SH_DENYRW, pszSrcFile, __LINE__, TRUE); 314 319 if (fpo) { 315 320 rewind(fpi);
Note:
See TracChangeset
for help on using the changeset viewer.