示例#1
0
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,&regs);
}
示例#2
0
int __ll_writeable(const char *file)
{
    DPMI_REGS regs;
   regs.b.al = 0 ;
   regs.h.dx = __nametodta(file,0) ;
   __doscall(0x43,&regs);
   if (regs.b.al != 0)
      return 1 ;
   return !(regs.h.cx & 1) ;
}
示例#3
0
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,&regs)) {
      errno = regs.b.al ;
      return regs.b.al ;
   }
   *__fd = regs.h.ax ;
   return 0 ;
}
示例#4
0
int __ll_remove(char *name)
{
    DPMI_REGS regs;
    regs.h.dx = __nametodta(name,0);
    __doscall(0x41,&regs);
    if (regs.h.flags & 1)
    {
        errno = regs.h.ax & 255;
        return 1;
    }
    
    return 0;
}
示例#5
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,&regs);
   if (regs.h.flags & 1) {
      errno = ENOENT ;
      return regs.b.al ;
   }
   return 0 ;
}