Changeset 1544 for trunk/dll/printer.c


Ignore:
Timestamp:
Sep 30, 2010, 3:00:59 PM (15 years ago)
Author:
Gregg Young
Message:

Changes to fopen and _fsopen to allow FM2 to be loaded in high memory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/printer.c

    r1505 r1544  
    8181  CHAR param = 0, data = 0;
    8282  ULONG datalen = 1, parmlen = 1, htype, flagword;
     83  CHAR *modea = "a+";
    8384
    8485  if (!fWorkPlace)                      /* assume spooler is active */
    8586    return TRUE;
    8687  DosError(FERR_DISABLEHARDERR);
    87   printhandle = xfopen(printdevname, "a+", pszSrcFile, __LINE__);
     88  printhandle = xfopen(printdevname, modea, pszSrcFile, __LINE__, FALSE);
    8889  if (printhandle) {
    8990    if (!strnicmp(printdevname, "COM", 3) && isdigit(printdevname[3])) {
     
    138139  int c;
    139140  APIRET rc = MBID_YES;
     141  CHAR *mode;
    140142
    141143  if (StopPrinting)
     
    176178            Runtime_Error(pszSrcFile, __LINE__, "printer %s error",
    177179                          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);
    180183            if (!fpi)
    181184              Runtime_Error(pszSrcFile, __LINE__, "cannot open %s",
    182185                            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);
    185189              if (!fpo)
    186190                Runtime_Error(pszSrcFile, __LINE__, "cannot open %s",
     
    310314                }
    311315                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);
    314319                  if (fpo) {
    315320                    rewind(fpi);
Note: See TracChangeset for help on using the changeset viewer.