int __ll_creat(char *name, int flags, int shflags) { DPMI_REGS regs; regs.d.ecx = 0; regs.h.dx = __nametodta(name,0); return __doscall(0x3c,®s); }
int __ll_writeable(const char *file) { DPMI_REGS regs; regs.b.al = 0 ; regs.h.dx = __nametodta(file,0) ; __doscall(0x43,®s); if (regs.b.al != 0) return 1 ; return !(regs.h.cx & 1) ; }
unsigned _RTL_FUNC _dos_creat(const char *__pathP, unsigned __attr, int *__fd) { DPMI_REGS regs; regs.d.ecx = __attr; regs.h.dx = __nametodta(__pathP,0); if (!__doscall(0x3c,®s)) { errno = regs.b.al ; return regs.b.al ; } *__fd = regs.h.ax ; return 0 ; }
int __ll_remove(char *name) { DPMI_REGS regs; regs.h.dx = __nametodta(name,0); __doscall(0x41,®s); if (regs.h.flags & 1) { errno = regs.h.ax & 255; return 1; } return 0; }
unsigned _RTL_FUNC _dos_setfileattr(const char *__filename,unsigned __attrib) { DPMI_REGS regs ; regs.h.ax = 01 ; regs.h.cx = __attrib ; regs.h.dx = __nametodta(__filename,0); __doscall(0x43,®s); if (regs.h.flags & 1) { errno = ENOENT ; return regs.b.al ; } return 0 ; }