- Unit Dos;
-
- {$D-,I-,S-,O+}
-
- INTERFACE
-
- Const
-
- { Masques de bit de drapeau }
-
- FCarry = $0001;
- FParity = $0004;
- FAuxiliary = $0010;
- FZero = $0040;
- FSign = $0080;
- FOverflow = $0800;
-
- { Nombres magiques de mode de fichier }
-
- fmClosed = $D7B0;
- fmInput = $D7B1;
- fmOutput = $D7B2;
- fmInOut = $D7B3;
-
- { Constante d'attribut de fichier }
-
- ReadOnly = $01;
- Hidden = $02;
- SysFile = $04;
- VolumeID = $08;
- Directory = $10;
- Archive = $20;
- AnyFile = $3F;
-
- type
-
- { Type de chaine de caractères }
-
- ComStr = string[127]; { Chaine de caractères de ligne de commande }
- PathStr = string[79]; { Chaine de caractères de nom de chemin }
- DirStr = string[67]; { Chaine de caractères d'unité de disque et de répertoire }
- NameStr = string[8]; { Chaine de caractères de nom de fichier }
- ExtStr = string[4]; { Chaine de caractères d'extension de fichier }
-
- { Enregistrement de registres utilisé par Intr et MsDos }
-
- Registers = record
- case Integer of
- 0: (AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags: Word);
- 1: (AL,AH,BL,BH,CL,CH,DL,DH: Byte);
- end;
-
- { Enregistrement de fichier typé et de ficiher non-typé }
-
- FileRec = record
- Handle: Word;
- Mode: Word;
- RecSize: Word;
- Private: array[1..26] of Byte;
- UserData: array[1..16] of Byte;
- Name: array[0..79] of Char;
- end;
-
- { Enregistrement Textfile }
-
- TextBuf = array[0..127] of Char;
- TextRec = record
- Handle: Word;
- Mode: Word;
- BufSize: Word;
- Private: Word;
- BufPos: Word;
- BufEnd: Word;
- BufPtr: ^TextBuf;
- OpenFunc: Pointer;
- InOutFunc: Pointer;
- FlushFunc: Pointer;
- CloseFunc: Pointer;
- UserData: array[1..16] of Byte;
- Name: array[0..79] of Char;
- Buffer: TextBuf;
- end;
-
- { Enregistrement Search utilisé par FindFirst et FindNext }
-
- SearchRec = record
- Fill: array[1..21] of Byte;
- Attr: Byte;
- Time: Longint;
- Size: Longint;
- Name: string[12];
- end;
-
- { Enregistrement Date et time utilisé par PackTime et UnpackTime }
-
- DateTime = record
- Year,Month,Day,Hour,Min,Sec: Word;
- end;
-
- Var
-
- { Variable d'état d'erreur }
-
- DosError: Integer;
-
- Function DosVersion: Word;
- Procedure Intr(IntNo: Byte; var Regs: Registers);
- Procedure MsDos(var Regs: Registers);
- Procedure GetDate(var Year,Month,Day,DayOfWeek: Word);
- Procedure SetDate(Year,Month,Day: Word);
- Procedure GetTime(var Hour,Minute,Second,Sec100: Word);
- Procedure SetTime(Hour,Minute,Second,Sec100: Word);
- Procedure GetCBreak(var Break: Boolean);
- Procedure SetCBreak(Break: Boolean);
- Procedure GetVerify(var Verify: Boolean);
- Procedure SetVerify(Verify: Boolean);
- Function DiskFree(Drive: Byte): Longint;
- Function DiskSize(Drive: Byte): Longint;
- Procedure GetFAttr(var F; var Attr: Word);
- Procedure SetFAttr(var F; Attr: Word);
- Procedure GetFTime(var F; var Time: Longint);
- Procedure SetFTime(var F; Time: Longint);
- Procedure FindFirst(Path: PathStr; Attr: Word; var F: SearchRec);
- Procedure FindNext(var F: SearchRec);
- Procedure UnpackTime(P: Longint; var T: DateTime);
- Procedure PackTime(var T: DateTime; var P: Longint);
- Procedure GetIntVec(IntNo: Byte; var Vector: Pointer);
- Procedure SetIntVec(IntNo: Byte; Vector: Pointer);
- Function FSearch(Path: PathStr; DirList: String): PathStr;
- Function FExpand(Path: PathStr): PathStr;
- Procedure FSplit(Path: PathStr; var Dir: DirStr; var Name: NameStr; var Ext: ExtStr);
- Function EnvCount: Integer;
- Function EnvStr(Index: Integer): String;
- Function GetEnv(EnvVar: String): String;
- Procedure SwapVectors;
- Procedure Keep(ExitCode: Word);
- Procedure Exec(Path: PathStr; ComLine: ComStr);
- Function DosExitCode: Word;
Dernière mise à jour : Dimanche, le 20 avril 2014