Unit EZDSLSup

===EZDSLSUP========================================================== Part of the Delphi Structures Library--supplementary routines. EZDSLSUP is Copyright (c) 1993-1998 by Julian M. Bucknall VERSION HISTORY 19Apr98 JMB 3.00 Major new version, release for Delphi 3 13Mar96 JMB 2.00 release for Delphi 2.0 18Jun95 JMB 1.00 conversion of EZStrucs to Delphi =====================================================================} { Copyright (c) 1993-1998, Julian M. Bucknall. All Rights Reserved

Classes

Functions

EZAssert - --------
EZIntCompare - duplicate an ASCIIZ string} {---Longint data object routines---

--------
EZIntDisposeData - compare two longints

--------
EZIntDupData - 'dispose' a longint

--------
EZNoCompare - 'duplicate' a longint} {---Do nothing routines---

--------
EZNoDisposeData - always returns 0

--------
EZStrCompare - free string from heap

--------
EZStrDispose - assign string on heap

--------
EZStrDisposeData - compare two strings

--------
EZStrDupData - dispose a string

--------
EZStrNew - ---Short string data object routines---

====================================================================} {===Data object routines=============================================
EZStrZCompare - duplicate a string on heap} {---ASCIIZ String data object routines---

--------
EZStrZDisposeData - compare two ASCIIZ strings

--------
EZStrZDupData - dispose an ASCIIZ string

--------
RaiseError - ---EZDSL exceptions---

===EZDSL exceptions=================================================
SafeFreeMem - --------
SafeGetMem - does nothing} {---Safe memory alloc/free routines---

====================================================================} {===SafeFreeMem/SafeGetMem============================================ Allocates and deallocates memory 'safely'.

Types

PEZString
TEZString

Constants

Variables


Functions


procedure EZAssert(Proposition : boolean; WhatCode : integer);

--------

function EZIntCompare(Data1, Data2 : pointer) : integer;

duplicate an ASCIIZ string} {---Longint data object routines---

--------


procedure EZIntDisposeData(aData : pointer);

compare two longints

--------


function EZIntDupData(aData : pointer) : pointer;

'dispose' a longint

--------


function EZNoCompare(Data1, Data2 : pointer) : integer;

'duplicate' a longint} {---Do nothing routines---

--------


procedure EZNoDisposeData(aData : pointer);

always returns 0

--------


function EZStrCompare(Data1, Data2 : pointer) : integer;

free string from heap

--------


procedure EZStrDispose(PS : PEZString);

assign string on heap

--------


procedure EZStrDisposeData(aData : pointer);

compare two strings

--------


function EZStrDupData(aData : pointer) : pointer;

dispose a string

--------


function EZStrNew(const S : TEZString) : PEZString;

---Short string data object routines---

====================================================================} {===Data object routines=============================================


function EZStrZCompare(Data1, Data2 : pointer) : integer;

duplicate a string on heap} {---ASCIIZ String data object routines---

--------


procedure EZStrZDisposeData(aData : pointer);

compare two ASCIIZ strings

--------


function EZStrZDupData(aData : pointer) : pointer;

dispose an ASCIIZ string

--------


procedure RaiseError(WhatCode : integer);

---EZDSL exceptions---

===EZDSL exceptions=================================================


procedure SafeFreeMem(var P; BlockSize : Cardinal);

--------

procedure SafeGetMem(var P; BlockSize : Cardinal);

does nothing} {---Safe memory alloc/free routines---

====================================================================} {===SafeFreeMem/SafeGetMem============================================ Allocates and deallocates memory 'safely'. In debug mode SafeGetMem will fill the allocated block with $CC characters = in the debugger it will show up data in the block that wasn't initialised, and if there is a bug such that the block is executed as code you'll get an automatic breakpoint ($CC = INT $03). 18Jun95 JMB =====================================================================


Types


PEZString = ^TEZString

TEZString = string[255]
EZDSL short strings

Constants


Variables