home *** CD-ROM | disk | FTP | other *** search
- -- An exact copy of this module appears in both the Pascal and C libraries.
- {*********************************************************************
- (C) Copyright 1983-92 MetaWare Incorporated; Santa Cruz, CA 95060.
- *********************************************************************}
-
- Export(System,MSDOS,Fileh_type);
- pragma include('STATUS.pf');
- pragma include('SYSTEM.pf');
- pragma include('MSDOS.pf');
- pragma fragmented_implementation(System);
- pragma fragmented_implementation(MSDOS);
- with System,Status;
-
- program Implement_DOS_interface;
- pragma Alias(Implement_DOS_interface,Implement.RTE || 'DOS_interface2');
-
- with Registers;
- with Loopholes:[Address,Adr,Retype,&];
-
- procedure Stringproc(Mkdir,C_Mkdir) (Stringparm(Name));
- begin
- DOS_name(Name,57);
- end;
-
- procedure Stringproc(Chdir,C_Chdir) (Stringparm(Name));
- begin
- DOS_Name(Name,59);
- end;
-
- procedure Stringproc(Chmod,C_Chmod) (Stringparm(Name); Mode: File_mode);
- begin
- CX.R := Retype(Mode,Byte);
- Ax.L := 1;
- DOS_name(Name,67);
- end;
-
- function Stringproc(Filemode,C_filemode) (Stringparm(Name)): File_mode;
- begin
- Ax.L := 0;
- DOS_name(Name,67);
- return(Retype(Cx.L,File_mode));
- end;
-
- procedure Stringproc(Find_first,C_Find_first) (Stringparm(Path); var S: Find_buffer; Attr: File_mode);
- begin
- Set_DMA(Adr(S));
- CX.R := Retype(Attr,Byte);
- DOS_name(Path,78);
- end;
-
- procedure Stringproc(Rmdir,C_Rmdir) (Stringparm(Name));
- begin
- DOS_name(Name,58);
- end;
-
- procedure Stringproc(Rename,C_Rename) (Stringparm(Old); Stringparm(New));
- #if PPLIB
- var S: Strcopy;
- #endif
- begin { Rename Old to New. }
- #if HCLIB
- Load_ptr(ES,DI,New);
- #else
- S := New; S[Length(New)+1] := Chr(0);
- Load_ptr(ES,DI,Adr(S));
- #endif
- DOS_name(Old,86);
- end;
-
- -- (C) Copyright 1983,84,85 MetaWare Incorporated; Santa Cruz, CA 95060.
-
-