DML is a collection of 87 useful routines not found in the standard Turbo Pascal Version 5.0 Library
#.R:E #.W:96 #.H:...DML UNIT Version 1.00... #.H:...$$Day Mon D, YEAR$$ $$Z:MI A.M.$$ Page $$$... #.H: #.F: #.F:... Copyright (c) 1989, by DML Software Inc. ... #.X:8 DML is a collection of 87 useful routines not found in the standard Turbo Pascal Version 5.0 Library. Full source code and documentation is included for the entire library. The entire library can be accessed by a single USE DML statement, or the four unit modules can be accessed indiviadually by a USE GEN, NUM, STRG, KBD statement. Because of Turbo Pascal's smart linking, the distrinction is moot. Because the individual UNITs take advantage of circular references, they are NOT immediately source level compatible with Turbo Pascal 4.0, but the overall DML UNIT is Turbo Pascal 4.0 source level compatible. The demo program DMLTEST exercises every unit call. This overall documentation is in three sections: A) UNIT INTERFACES B) PROCEDURE ALPHABETICAL LISTING C) FILES ON DISK # A) UNIT INTERFACES --------------------------------------------------------------------------- I) GEN.TPU - GENERAL PURPOSE PROCEDURES (42) --------------------------------------------------------------------------- 1) System programming extensions (5) PROCEDURE Abend(ExitCode : BYTE; ProcAddr : POINTER); PROCEDURE CallProcedure(ProcAddr : POINTER); PROCEDURE CallProcedureX( ProcAddr : POINTER; I1 : INTEGER; VAR S1 : STRING; VAR I2 : INTEGER); FUNCTION LongAddr(Seg, Ofs : WORD) : LONGINT; FUNCTION Same (VAR Var1, Var2; Len : WORD) : BOOLEAN; 2) File I/O and Protection (5) FUNCTION ReadOnlyExist(FileName : STRING) : BOOLEAN; FUNCTION ReadOnlyGetAttr(FileName : STRING) : BOOLEAN; FUNCTION ReadOnlySetAttr(FileName : STRING ; Flag : BOOLEAN) : INTEGER; FUNCTION FileOpen(VAR GenFileDummy; GenFileRecLen : WORD; GenFileOpenMode : WORD) : INTEGER; FUNCTION FileAssignAndOpen( GenFileName : STRING; VAR GenFileDummy; GenFileRecLen : WORD; GenFileOpenMode : WORD) : BOOLEAN; 3) Text Encryption (2) FUNCTION EnCrypt (Orig : STRING) : STRING; FUNCTION DeCrypt (Orig : STRING) : STRING; 4) General Purpose Video (7) PROCEDURE GenBeep (Frequency, Duration : WORD); FUNCTION ColorMonitorInstalled : BOOLEAN; PROCEDURE Cursor (Visible : BOOLEAN); PROCEDURE CursorInsertSize; PROCEDURE CursorOverwriteSize; FUNCTION ScrBackCursorColor : WORD; FUNCTION ScrForeCursorColor : WORD; # 5) Video Messages (6) PROCEDURE Pause; PROCEDURE ScrErrMsg (Message : STRING ); PROCEDURE ScrStatMsg (Message : STRING); FUNCTION ScrYN (Message : STRING) : BOOLEAN; FUNCTION ScrYouAreSure (Message : STRING ) : BOOLEAN; PROCEDURE Wait (DispWait : BOOLEAN); 6) Disk and Memory Sizes (4) FUNCTION BytesOnDiskFree(Drive : CHAR) : LONGINT; FUNCTION FreeDOSMem : LONGINT; FUNCTION SizeOfMem : LONGINT; FUNCTION StackAvail : WORD; 7) Instruction Timing (2) FUNCTION TimeElapsed : REAL; FUNCTION TimeTotal(Start , Stop : REAL) : STRING; 8) General Purpose File (4) FUNCTION Exist (FileName: STRING) : BOOLEAN; FUNCTION LinesInFile (FileName : STRING) : INTEGER; FUNCTION GetFileDateAndTimeString (FileName : STRING) : STRING; FUNCTION GetFileDateAndTimeLongInt (FileName : STRING) : LONGINT; 9) Math (2) FUNCTION Power (X, Y : REAL) : REAL; FUNCTION Log (x : REAL) : REAL; 10) DOS and Environment (3) FUNCTION DOSVersionR : REAL; FUNCTION WhoAmI : STRING; FUNCTION GetEnvString(EnvVar : STRING) : STRING; 11) Version Control (2) FUNCTION GetDMLVersion(Module : WORD) : STRING; FUNCTION GetDMLVersions : STRING; # --------------------------------------------------------------------------- II) NUM.TPU - NUMERIC PROCEDURES (18) --------------------------------------------------------------------------- 1) General Numeric Formatting And Conversion (12) FUNCTION B2S (Flag : BOOLEAN) : STRING; FUNCTION W2S (Num : WORD; Mask : STRING) : STRING; FUNCTION I2S (Num : INTEGER; Mask : STRING) : STRING; FUNCTION L2S (Num : LONGINT; Mask : STRING) : STRING; FUNCTION R2S (Num : REAL; Mask : STRING) : STRING; FUNCTION D2S (Num : DOUBLE; Mask : STRING) : STRING; FUNCTION S2R (Source : STRING) : REAL; FUNCTION S2D (Source : STRING) : DOUBLE; FUNCTION StrNumTest (Fld : STRING) : StrNumType; FUNCTION S2L (Source : STRING) : LONGINT; FUNCTION S2I (Source : STRING) : INTEGER; FUNCTION S2W (Source : STRING) : WORD; 2) Date and Time Formatting And Conversion (6) FUNCTION NumTh (Num : INTEGER) : STRING; PROCEDURE Date2R (VAR JulSec : REAL; DateTime : T_DateTime); PROCEDURE R2Date (JulSec : REAL; VAR DateTime : T_DateTime); FUNCTION Date2S (DateTime : T_DateTime; Mask : STRING) : STRING; PROCEDURE GetDOSDateAndTime (VAR JulSec : REAL; VAR DateTime : T_DateTime); PROCEDURE SetDOSDateAndTime (DateTime : T_DateTime); # --------------------------------------------------------------------------- III) STRG - STRING PROCEDURES (14) --------------------------------------------------------------------------- 1) General Purpose String (10) FUNCTION RJS (Source : STRING; Size : BYTE) : STRING; FUNCTION LJS (Source : STRING; Size : BYTE) : STRING; FUNCTION CJS (Source : STRING; Size : BYTE) : STRING; FUNCTION Strip (Source : STRING; Code : BYTE) : STRING; FUNCTION StrCase (Source : STRING; Code : BYTE) : STRING; FUNCTION StrField (Source : STRING; Delimiter : CHAR; Num : BYTE) : STRING; FUNCTION StrFill (FillCh : CHAR; Num : BYTE) : STRING; FUNCTION StrPad (Source : STRING) : STRING; FUNCTION StrShiftLeft (Fld : STRING; Posit : BYTE) : STRING; FUNCTION StrShiftRight (Fld : STRING; Posit : BYTE; Fill : CHAR) : STRING; 2) String Conversion (4) PROCEDURE S2C (Strg : STRING ; VAR CharA ; Len : BYTE); FUNCTION C2S (VAR CharA ; BYTE : WORD) : STRING; PROCEDURE S2Z (Strg : STRING ; VAR CharA); FUNCTION Z2S (VAR CharA) : STRING; # --------------------------------------------------------------------------- IV) KBD - KEYBOARD PROCEDURES (13) --------------------------------------------------------------------------- 1) General Purpose Keyboard (9) FUNCTION KbdGetStatus : WORD; PROCEDURE KbdSetInsMode (InsMode : BOOLEAN); PROCEDURE KbdSetCapsLock (CapsLock : BOOLEAN); PROCEDURE KbdSetNumLock (NumLock : BOOLEAN); PROCEDURE KbdSetScrollLock (ScrollLock : BOOLEAN); FUNCTION KbdInsModeStatus : BOOLEAN; FUNCTION KbdCapsLockStatus : BOOLEAN; FUNCTION KbdNumLockStatus : BOOLEAN; FUNCTION KbdScrollLockStatus : BOOLEAN; 2) Keyboard Buffer (4) PROCEDURE KbdClear; FUNCTION KbdNumValuesWaiting : WORD; FUNCTION KbdInputValue : WORD; FUNCTION KbdKeyWaiting : BOOLEAN; # B) PROCEDURE ALPHABETICAL LISTING Procedure Name UNIT Abend GEN B2S NUM BytesOnDiskFree GEN C2S STRG CallProcedure GEN CallProcedureX GEN CJS STRG ColorMonitorInstalled GEN Cursor GEN CursorInsertSize GEN CursorOverwriteSize GEN D2S NUM Date2R NUM Date2S NUM DeCrypt GEN DOSVersionR GEN EnCrypt GEN Exist GEN FileAssignAndOpen GEN FileOpen GEN FreeDOSMem GEN GenBeep GEN GetDMLVersion GEN GetDMLVersions GEN GetDOSDateAndTime NUM GetEnvString GEN GetFileDateAndTimeLongInt GEN GetFileDateAndTimeString GEN I2S NUM KbdCapsLockStatus KBD KbdClear KBD KbdGetStatus KBD KbdInputValue KBD KbdInsModeStatus KBD KbdKeyWaiting KBD KbdNumLockStatus KBD KbdNumValuesWaiting KBD KbdScrollLockStatus KBD KbdSetCapsLock KBD KbdSetInsMode KBD KbdSetNumLock KBD KbdSetScrollLock KBD L2S NUM LJS STRG LinesInFile GEN LongAddr GEN Log GEN NumTh NUM Pause GEN Power GEN R2Date NUM R2S NUM ReadOnlyExist GEN ReadOnlyGetAttr GEN ReadOnlySetAttr GEN RJS STRG S2C STRG S2D NUM S2I NUM S2L NUM S2R NUM S2W NUM S2Z STRG Same GEN ScrBackCursorColor GEN ScrErrMsg GEN ScrForeCursorColor GEN ScrStatMsg GEN ScrYN GEN ScrYouAreSure GEN SetDOSDateAndTime NUM SizeOfMem GEN StackAvail GEN StrCase STRG StrField STRG StrFill STRG Strip STRG StrNumTest NUM StrPad STRG StrShiftLeft STRG StrShiftRight STRG TimeElapsed GEN TimeTotal GEN W2S NUM Wait GEN WhoAmI GEN Z2S STRG # C) FILES ON DISK (35) 1) SOURCE FILES: *.PAS, INT, IMP, INC (16) DML.PAS - Unit DMLINIT.INC - Unit Initialization GEN.PAS - Unit GEN.INT - Unit Interface GEN.IMP - Unit Implementation NUM.PAS - Unit NUM.INT - Unit Interface NUM.IMP - Unit Implementation STRG.PAS - Unit STRG.INT - Unit Interface STRG.IMP - Unit Implementation KBD.PAS - Unit KBD.INT - Unit Interface KBD.IMP - Unit Implementation DMLTEST.PAS - Unit test program XREF.PAS - Cross reference program 2) UNIT FILES: *.TPU (6) DML.TPU GEN.TPU NUM.TPU STRG.TPU KBD.TPU HEAPTREE.TPU - Quasi B-Tree for Xref program 3) PROGRAM FILES: *.EXE (2) DMLTEST.EXE XREF.EXE # 4) DOCUEMENTATION FILES: *.DOC, TBL (PC-WRITE Format) (11) DML.DOC - This file GEN.DOC NUM.DOC STRG.DOC KBD.DOC GEN.TBL - Table of Contents files NUM.TBL STRG.TBL KBD.TBL XREF.DOC README.DOC - Read me first
Comments
Post a Comment