Subversion Repositories SvarDOS

Rev

Rev 1572 | Rev 1574 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1572 Rev 1573
Line 115... Line 115...
115
"xor ax, ax" \
115
"xor ax, ax" \
116
"done:" \
116
"done:" \
117
parm [es] \
117
parm [es] \
118
value [ax];
118
value [ax];
119
 
119
 
-
 
120
unsigned short dosfclose(unsigned short handle);
-
 
121
 
-
 
122
#pragma aux dosfclose = \
-
 
123
"mov ah,0x3e" \
-
 
124
"int 0x21" \
-
 
125
"jc done" \
-
 
126
"xor ax, ax" \
-
 
127
"done:" \
-
 
128
parm [bx] \
-
 
129
value [ax];
-
 
130
 
120
 
131
 
121
/*****************************************************************************
132
/*****************************************************************************
122
 * functions                                                                 *
133
 * functions                                                                 *
123
 *****************************************************************************/
134
 *****************************************************************************/
124
 
135
 
Line 302... Line 313...
302
    }
313
    }
303
    errflag |= mdr_dos_write(fd, eolbuf, eollen, &bytes);
314
    errflag |= mdr_dos_write(fd, eolbuf, eollen, &bytes);
304
    l = l->next;
315
    l = l->next;
305
  }
316
  }
306
 
317
 
307
  errflag |= mdr_dos_fclose(fd);
318
  errflag |= dosfclose(fd);
308
 
319
 
309
  /* did it all work? */
320
  /* did it all work? */
310
  if (errflag == 0) {
321
  if (errflag == 0) {
311
    db->modflag = 0;
322
    db->modflag = 0;
312
    if (saveas != db->fname) mdr_dos_truename(db->fname, saveas);
323
    if (saveas != db->fname) mdr_dos_truename(db->fname, saveas);
Line 783... Line 794...
783
      goto FINDLINE;
794
      goto FINDLINE;
784
    }
795
    }
785
 
796
 
786
  }
797
  }
787
 
798
 
788
  mdr_dos_fclose(fd);
799
  dosfclose(fd);
789
 
800
 
790
  SKIPLOADING:
801
  SKIPLOADING:
791
 
802
 
792
  /* rewind cursor to top of file because it has been used by line_add() */
803
  /* rewind cursor to top of file because it has been used by line_add() */
793
  db_rewind(db);
804
  db_rewind(db);
794
 
805
 
795
  return(err);
806
  return(err);
796
 
807
 
797
  IOERR:
808
  IOERR:
798
  mdr_dos_fclose(fd);
809
  dosfclose(fd);
799
  return(1);
810
  return(1);
800
}
811
}
801
 
812
 
802
 
813
 
803
/* a custom argv-parsing routine that looks directly inside the PSP, avoids the need
814
/* a custom argv-parsing routine that looks directly inside the PSP, avoids the need