JegasAPI - www.jegas.com

Unit ug_jegas

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

This is first source file of the entire code base Jegas, LLC has; created about 2003. Note: The JegasAPI is what JAS is built on. There is only the JASConfig structure in here for scope reasons, the rest of the JegasAPI is quite separate and free from JAS related anything.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
record rtIOAppendLog used for passing information to the saIOAppendLogColumnHeaders, saIOAppendLogColumnData and bIOAppendLog functions.
record rtJASConfig This Jegas Application Server's internal configuration storage reacord.
record rtJegasCommon This record is designed to contain information about the user, the application itself, and the main log file.
record rtPunkBeGoneStats ============================================================================= =============================================================================

Functions and Procedures

Function bCopyFile(Var p_saSrc: AnsiString; Var p_saDest: AnsiString; Var p_u2IOREsult: Word):Boolean;
Function bCopyFile(Var p_saSrc: AnsiString; Var p_saDest: AnsiString):Boolean;
Function bDeleteFilesInTree(p_saDirectory: ansiString; p_saFileSpec: ansiString):Boolean;
function bGetFileModifiedDate(p_saFilename: ansistring; var p_dtDateTime: TDATETIME): boolean;
function bGetFileSize(p_saFilename: ansistring; var p_u8FileSize: UInt64): boolean;
function bGoodEmail(p_sa: ansistring): boolean;
function bGoodPassword(p_s: string): boolean;
function bGoodUsername(p_sa: ansistring): boolean;
Function bIOAppendLog(Var p_rIOAppendLog: rtIOAppendLog):Boolean;
Function bIsJDTypeBinary(p_u2JDType:word):Boolean;
Function bIsJDTypeBoolean(p_u2JDType:word):Boolean;
Function bIsJDTypeChar(p_u2JDType:word):Boolean;
Function bIsJDTypeCurrency(p_u2JDType:word):Boolean;
Function bIsJDTypeDate(p_u2JDType:word):Boolean;
Function bIsJDTypeDec(p_u2JDType:word):Boolean;
Function bIsJDTypeInt(p_u2JDType:word):Boolean;
Function bIsJDTypeMemo(p_u2JDType:word): boolean;
Function bIsJDTypeNumber(p_u2JDType:word):Boolean;
Function bIsJDTypeString(p_u2JDType:word):Boolean;
Function bIsJDTypeText(p_u2JDType:word):Boolean;
Function bIsJDTypeUInt(p_u2JDType:word):Boolean;
Function bMoveFile(var p_saSrc: AnsiString; var p_saDest: AnsiString):Boolean;
Function bMoveFile(var p_saSrc: AnsiString; var p_saDest: AnsiString; p_u2IOREsult: Word):Boolean;
function bPermBackUp( p_saDestFile: ansistring; p_saSrcDir: ansistring; p_bRecurse: boolean; p_saScriptName: ansistring; var p_u8ErrorCount: UInt64; var p_u8ErrID: UInt64; var p_saErrMsg: ansistring ):boolean;
function bSaveFile( p_saFilename: ansistring; p_saFileData: ansistring; p_iRetryLimit: longint; p_iRetryDelayInMSecs: longint; var p_u2IOResult: word; p_bAppend: boolean ):boolean;
function bSendMail( p_saTo: ansistring; p_saFrom: ansistring; p_saSubject: ansistring; p_saMsg: ansistring ):boolean;
Function bStoreFileInTree( p_saMakeTreeWithThis: ansistring; p_saSourceDirectory: ansiString; p_saSourceFileName: ansiString; p_saDestTreeTop: ansiString; p_saData: AnsiString; Var p_saRelPath: ansiString; p_i4Size: longint; p_i4Levels: longint ):Boolean;
Procedure DebugIN(saSection: AnsiString; p_saSourceFile: AnsiString);
Procedure DebugOUT(saSection: AnsiString; p_saSourceFile: AnsiString);
function DESTROYDIRECTORY(p_saDir: ansistring): boolean;
Function dtAddDays(p_dtFrom: TDATETIME; p_iDays: Longint): TDATETIME;
Function dtAddHours(p_dtFrom: TDATETIME;p_iHours: Longint): TDATETIME;
Function dtAddMinutes(p_dtFrom: TDATETIME; p_iMinutes: Longint): TDATETIME;
Function dtAddMonths(p_dtFrom: TDATETIME; p_iMonths: Longint): TDATETIME;
Function dtAddMSec(p_dtFrom: TDATETIME; p_iMSec: longint): TDATETIME;
Function dtAddSec(p_dtFrom: TDATETIME; p_iSeconds: Longint): TDATETIME;
Function dtAddYears(p_dtFrom: TDATETIME; p_iYears: Longint): TDATETIME;
Function dtSubtractHours(p_dtFrom: TDATETIME;p_iHours: Longint): TDATETIME;
Function dtSubtractMinutes(p_dtFrom: TDATETIME; p_iMinutes: Longint): TDATETIME;
Function dtSubtractMSec(p_dtFrom: TDATETIME; p_iMSec: longint): TDATETIME;
Function dtSubtractSec(p_dtFrom: TDATETIME; p_iSeconds: Longint): TDATETIME;
Function FileExistsInTree( p_saMakeTreeWithThis: ansistring; p_saFilename: ansiString; p_saTreeTop: ansiString; Var p_saRelPath: ansiString; p_u1Size: byte; p_u1Levels: byte ):Boolean;
Function i4PToC(p_sa: AnsiString; Var p_cdest: PChar; p_i4DestCBuflen: LongInt):LongInt;
Function i4WindowStateToInt(p_saWindowState: AnsiString): LongInt;
Function iDiffDays(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
Function iDiffDays(p_tsFrom: TTIMESTAMP;p_tsTo: TTIMESTAMP): Int64;
Function iDiffHours(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): Int64;
Function iDiffHours(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
Function iDiffMinutes(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
Function iDiffMinutes(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): Int64;
Function iDiffMonths(p_dtFrom: TDATETIME;p_dtTo: TDATETIME): Int64;
Function iDiffMonths(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): Int64;
Function iDiffMSec(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
Function iDiffSeconds(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
Function iDiffSeconds(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): Int64;
Function iDiffYears(p_dtFrom: TDATETIME; p_dtTo: TDATETIME):Int64 ;
Function iDiffYears(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP):Int64 ;
Function iMilitaryToNormalHours(p_iHours:longint):longint;
Function iMSec:Int64;
Function iMSec(p_dt: TDATETIME):Int64;
Procedure InitJASConfigRecord;
Procedure JASDebugPrint(p_sa:ansistring);
Procedure JASDebugPrintln(p_sa:ansistring);
Procedure JASPrint(p_sa:ansistring);
Procedure JASPrintln;
Procedure JASPrintln(p_sa:ansistring);
function JCopyFile(p_saSrc: ansistring; p_saDest: Ansistring): boolean;
Function JDate( p_saDate: AnsiString; p_iFormatOut: longint; p_iFormatIn: longint ): AnsiString;
Function JDate( p_saDate: AnsiString; p_iFormatOut: longint; p_iFormatIn: longint; Var p_dt: TDATETIME ): AnsiString;
Function JLog( p_u2LogType_ID: word; p_u8Entry_ID: UInt64; p_saEntryData: AnsiString; p_saSourceFile: AnsiString ): Boolean;
procedure Merge( p_bPerformMerge: boolean; p_uDupeScore: cardinal; p_bCaseSensitive: boolean; var p_bDupe: boolean; p_SrcXDL: JFC_XDL; p_DestXDL: JFC_XDL; p_ColXDL: JFC_XDL );
Procedure ParseName( p_In_saName: ansistring; var p_Out_saFirst: ansistring; var p_Out_saMiddle: ansistring; var p_Out_saLast: ansistring );
function saBase64Decode(p_sa: ansistring): ansistring;
function saBase64Encode(p_sa: ansistring): ansistring;
Function saBuildName( p_saDear: AnsiString; p_saFirst: AnsiString; p_saMiddle: AnsiString; p_saLast: AnsiString; p_saSuffix: ansiString ):ansistring;
function saBytesToHuman(p_u8Size: UInt64): ansistring;
Function saCmdLine: AnsiString;
Function saCToP(Var p_csrc: PChar):AnsiString;
function saCut(p_saSrc: ansistring; p_i8Start: int64; p_i8Length: int64): ansistring;
Function saDebugNest(p_saSectionName: AnsiString; p_bBegin: Boolean; p_uNestLevel: UInt64): AnsiString;
function saDouble(p_fValue: double; p_iDigits: longint; p_iDecimals: longint): ansistring;
function saDoubleEscape(p_saEscapeThis: ansistring; p_chCharToEscape: char): ansistring;
function saEscape(p_saEscapeThis: ansistring; p_chCharToEscape: char; p_saReplaceWith: ansistring): ansistring;
function saExtractDir(p_sa: ansistring): ansistring;
function saExtractExt(p_saFileName: ansistring): ansistring;
function saExtractName(p_saFileName: ansistring): ansistring;
function saExtractPath(p_saFileName: ansistring): ansistring;
function saFileNameNoExt(p_saFileName: ansistring): ansistring;
Function saFormatTimeStamp(p_saFormat: AnsiString; p_ts: TTIMESTAMP): AnsiString;
Function saGetUniqueCommID(p_saPath: AnsiString):ansiString;
function saInsert(p_saSrc: ansistring; p_saInsertMe: ansistring; p_i8Start: int64): ansistring;
Function saIOAppendLogColumnData(Var p_rIOAppendLog: rtIOAppendLog): AnsiString;
Function saIOAppendLogColumnHeaders(Var p_rIOAppendLog: rtIOAppendLog): AnsiString;
function saJasLocateTemplate( p_saREL_PATH_N_FILE:ansistring; p_sCurrentLang, p_sCurrentTheme: string; p_saRequestedDir: ansistring; p_i8Caller: int64; p_VHostTemplateDir: Ansistring; p_saWebShareDir: ansistring ): ansistring;
Function saJDType(p_u2JDType:word): AnsiString;
Function saJegasLogoRawText(p_saEOL: AnsiString; p_bShowJASServerID: boolean): AnsiString;
Function saJegasLogoRawText(p_saEOL: AnsiString): AnsiString;
function saJFCDirAsText(p_Dir: JFC_DIR; p_saLineTerminator: ansistring): ansistring;
function saMid(p_saSrc: ansistring; p_i8Start: int64; p_i8Length: int64): ansistring;
Function saParseLastName(p_saName: ansistring): ansistring;
Function saPhoneConCat(p_saPhone: ansistring; p_saExt: ansistring): ansistring;
Function saProper(p_saSentence: ansistring): ansistring;
Function saSequencedFilename(p_saFilename: AnsiString; p_sExtension: String): AnsiString;
function saSingle(p_fValue: single; p_iDigits: longint; p_iDecimals: longint): ansistring;
function saSolveRelativePath(p_sa: AnsiString):ansistring;
function saWin2LinPath(p_sa: ansistring): ansistring;
Function saWindowStateToString(p_i4WindowState: LongInt): AnsiString;
Function sGetUID:String; inline;
Function StrToTimeStamp(p_sa: AnsiString):TTIMESTAMP;
Function tsAddDays(p_tsFrom: TTIMESTAMP; p_iDays: longint): TTIMESTAMP;
Function tsAddHours(p_tsFrom: TTIMESTAMP; p_Comp_Hours: Comp): TTIMESTAMP;
Function tsAddMinutes(p_tsFrom: TTIMESTAMP; p_Comp_Minutes: Comp): TTIMESTAMP;
Function tsAddMonths( p_tsFrom: TTIMESTAMP; p_iMonths: longint): TTIMESTAMP;
Function tsAddMSec( p_tsFrom: TTIMESTAMP; p_Comp_MSec: Comp): TTIMESTAMP;
Function tsAddSec(p_tsFrom: TTIMESTAMP; p_Comp_Seconds: Comp): TTIMESTAMP;
Function tsAddYears(p_tsFrom: TTIMESTAMP; p_iYears: longint): TTIMESTAMP;
Function tsDiff(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): TTIMESTAMP;
function u2ExecuteShellCommand(p_saWorkingDir: ansistring; p_saCmd: ansistring): word;
Function u2GetCRC16TS(p_saSrcfile: ansistring): word;
Function u2Shell(p_saCommand: AnsiString; p_saParam: AnsiString): word;
function u8FileSize(p_saFilename: ansistring): UInt64;
Function u8GetCRC64TS(p_saSrcfile: ansistring): UInt64;
Function u8GetUID: UInt64; inline;
function uIPAddressCount(p_IP: string):UInt64;
Procedure WaitInMSec(p_i8MilliSeconds: Int64);
Procedure WaitInSec(p_i8Seconds: Int64);

Constants

cnDateFormat_00=0;
cnDateFormat_01=1;
cnDateFormat_02=2;
cnDateFormat_03=3;
cnDateFormat_04=4;
cnDateFormat_05=5;
cnDateFormat_06=6;
cnDateFormat_07=7;
cnDateFormat_08=8;
cnDateFormat_09=9;
cnDateFormat_10=10;
cnDateFormat_11=11;
cnDateFormat_12=12;
cnDateFormat_13=13;
cnDateFormat_14=14;
cnDateFormat_15=15;
cnDateFormat_16=16;
cnDateFormat_17=17;
cnDateFormat_18=18;
cnDateFormat_19=19;
cnDateFormat_20=20;
cnDateFormat_21=21;
cnDateFormat_22=22;
cnDateFormat_23=23;
cnDateFormat_24=24;
cnDateFormat_Elements=11;
cnJegasLogColumns = 8;
csDateDay_1='Sunday';
csDateDay_2='Monday';
csDateDay_3='Tuesday';
csDateDay_4='Wednesday';
csDateDay_5='Thursday';
csDateDay_6='Friday';
csDateDay_7='Saturday';
csDateFormat_00='?';
csDateFormat_01='MM/DD/YYYY HH:NN AM';
csDateFormat_02='MM/DD/YYYY';
csDateFormat_03='YYYY-MM-DD';
csDateFormat_04='DDD MMM DD HH:NN:SS EDT YYYY';
csDateFormat_05='DDD, DD MMM YYYY HH:NN:SS';
csDateFormat_06='DDD, DD MMM YYYY HH:NN:SS UTC';
csDateFormat_07='DDDD, DD MMM, YYYY HH:NN:SS AM';
csDateFormat_08='HH:NN:SS';
csDateFormat_09='HH:NN:SS EDT';
csDateFormat_10='MMM DDD DD YYYY';
csDateFormat_11='YYYY-MM-DD HH:NN:SS';
csDateFormat_12='MM/DD/YY';
csDateFormat_13='DD/MMM/YYYY';
csDateformat_14='DD/MMM/YYYY HH:NN AM';
csDateFormat_15='DD/MMM/YYYY HH:NN';
csDateFormat_16='HH:NN AM';
csDateFormat_17='HH:NN';
csDateFormat_18='DD/MMM/YYYY:HH:NN:SS';
csDateFormat_19='MM/DD/YYYY HH:NN';
csDateFormat_20='MM/DD/YYYY HH:NN';
csDateFormat_21='YYYY-MM-DD HH:NN';
csDateFormat_22='DD/YYYY/MM HH:NN AM';
csDateFormat_23='DDD MMM MM HH:NN:SS YYYY';
csDateFormat_24='DD/MM/YYYY HH:NN AM';
csDateMonth_01='January';
csDateMonth_02='Febuary';
csDateMonth_03='March';
csDateMonth_04='April';
csDateMonth_05='May';
csDateMonth_06='June';
csDateMonth_07='July';
csDateMonth_08='August';
csDateMonth_09='September';
csDateMonth_10='October';
csDateMonth_11='November';
csDateMonth_12='December';
cs_IOAppendLog_QuoteBeginTemp='[JQUOTE_BEGIN]';
cs_IOAppendLog_QuoteEndTemp='[JQUOTE_END]';

Variables

gasDateFormat: array[0..22] Of String;
gasDay: array[1..7] Of String;
gasMonth: array[1..12] Of String;
gbServerCycling: boolean;
gbServerShuttingDown: boolean;
giDebugNestLevel: longint;
grJASConfig: rtJASConfig;
grJegasCommon: rtJegasCommon;
grPunkBeGoneStats: rtPunkBeGoneStats;
gsaJASFooter: Ansistring;
gu2UIDCounter: word;

Description

Functions and Procedures

Function bCopyFile(Var p_saSrc: AnsiString; Var p_saDest: AnsiString; Var p_u2IOREsult: Word):Boolean;
 
Function bCopyFile(Var p_saSrc: AnsiString; Var p_saDest: AnsiString):Boolean;

NOTE: See ug_common for light weight (code size wise) bLoadTextfile variety, does a line by line using readln generically. Uses block read/write with a Constant determined buffer size. See cnFileIO_BufferSize

Function bDeleteFilesInTree(p_saDirectory: ansiString; p_saFileSpec: ansiString):Boolean;

This function deletes all contents of the supplied directory matching filespec. It Does not delete the directories. NOT related to TREE STORAGE routines: FileExistsInTree or bStoreFileInTree but can be used in their directories if proper path is supplied. See: saFileToTreeDos function in ug_common.pp

function bGetFileModifiedDate(p_saFilename: ansistring; var p_dtDateTime: TDATETIME): boolean;

Return DateTime file modified

function bGetFileSize(p_saFilename: ansistring; var p_u8FileSize: UInt64): boolean;

Return the size of the given file.

function bGoodEmail(p_sa: ansistring): boolean;
 
function bGoodPassword(p_s: string): boolean;
 
function bGoodUsername(p_sa: ansistring): boolean;
 
Function bIOAppendLog(Var p_rIOAppendLog: rtIOAppendLog):Boolean;

Purpose: To make the most compatible "generic" logging format for importing data into various applications.

Function bIsJDTypeBinary(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are binary. See ug_common for definitions of jegas types

Function bIsJDTypeBoolean(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are boolean. See ug_common for definitions of jegas types

Function bIsJDTypeChar(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are characters. See ug_common for definitions of jegas types

Function bIsJDTypeCurrency(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are of the Currency data type. See ug_common for definitions of jegas types

Function bIsJDTypeDate(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are dates. See ug_common for definitions of jegas types

Function bIsJDTypeDec(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are fixed or floating point decimal numbers. Not Currency Data types however. See ug_common for definitions of jegas types

Function bIsJDTypeInt(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are integers. See ug_common for definitions of jegas types

Function bIsJDTypeMemo(p_u2JDType:word): boolean;

Returns true for passed Jegas Types that are memos. See ug_common for definitions of jegas types

Function bIsJDTypeNumber(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are numeric. Int, Uint, Decimals, currency BUT NOT BOOLEAN. See ug_common for definitions of jegas types

Function bIsJDTypeString(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are strings. See ug_common for definitions of jegas types

Function bIsJDTypeText(p_u2JDType:word):Boolean;

Returns true for any passed Jegas Type that is TEXT: this includes char, strings and memos. See ug_common for definitions of jegas types

Function bIsJDTypeUInt(p_u2JDType:word):Boolean;

Returns true for passed Jegas Types that are unsigned integers. See ug_common for definitions of jegas types

Function bMoveFile(var p_saSrc: AnsiString; var p_saDest: AnsiString):Boolean;

Basically these call the bCopyfile functions but remove the source file if successful.

Function bMoveFile(var p_saSrc: AnsiString; var p_saDest: AnsiString; p_u2IOREsult: Word):Boolean;
 
function bPermBackUp( p_saDestFile: ansistring; p_saSrcDir: ansistring; p_bRecurse: boolean; p_saScriptName: ansistring; var p_u8ErrorCount: UInt64; var p_u8ErrID: UInt64; var p_saErrMsg: ansistring ):boolean;

Essensially creates a script to perform a " ls -l " with long date format and the recurse flag depnding on the p_bRecurse Parameter. this allowed me to use existing code and freepascal doesn't have an easy way to get the same information. It gives you "do you have access" for linux but not "what permissions does the sales group files have?" This works :)

function bSaveFile( p_saFilename: ansistring; p_saFileData: ansistring; p_iRetryLimit: longint; p_iRetryDelayInMSecs: longint; var p_u2IOResult: word; p_bAppend: boolean ):boolean;

File Saving function. Uses TEXT mode with a Write (versus a writeln) so in theory should be useful for various file types even though creates file of text.

function bSendMail( p_saTo: ansistring; p_saFrom: ansistring; p_saSubject: ansistring; p_saMsg: ansistring ):boolean;
 
Function bStoreFileInTree( p_saMakeTreeWithThis: ansistring; p_saSourceDirectory: ansiString; p_saSourceFileName: ansiString; p_saDestTreeTop: ansiString; p_saData: AnsiString; Var p_saRelPath: ansiString; p_i4Size: longint; p_i4Levels: longint ):Boolean;

(Originated in Wimble project as _bStorePic_) This function returns TRUE if the passed pic file in p_sapicFile (filename only) can be successfully stored in the "pic Database" (so to speak). This was originally designed for the mlsimport.pas application.

It relies on the pic sitting in the [mlsdir]import= directory

Procedure DebugIN(saSection: AnsiString; p_saSourceFile: AnsiString);

FOR DEBUGGING With the DEBUGBEGINANDEND Logging "Tools" - Should be called when function or procedure starts. (Not ideal for threaded apps yet)

Procedure DebugOUT(saSection: AnsiString; p_saSourceFile: AnsiString);

FOR DEBUGGING With the DEBUGBEGINANDEND Logging "Tools" - Should be called last function or procedure exits. (Not ideal for threaded apps yet)

function DESTROYDIRECTORY(p_saDir: ansistring): boolean;

this should probably be called empty directory or something. it destroys all files in the specified folder recursively and it doesn't actually remove the directories themselves, it just empties them.

Function dtAddDays(p_dtFrom: TDATETIME; p_iDays: Longint): TDATETIME;
 
Function dtAddHours(p_dtFrom: TDATETIME;p_iHours: Longint): TDATETIME;
 
Function dtAddMinutes(p_dtFrom: TDATETIME; p_iMinutes: Longint): TDATETIME;
 
Function dtAddMonths(p_dtFrom: TDATETIME; p_iMonths: Longint): TDATETIME;
 
Function dtAddMSec(p_dtFrom: TDATETIME; p_iMSec: longint): TDATETIME;
 
Function dtAddSec(p_dtFrom: TDATETIME; p_iSeconds: Longint): TDATETIME;
 
Function dtAddYears(p_dtFrom: TDATETIME; p_iYears: Longint): TDATETIME;
 
Function dtSubtractHours(p_dtFrom: TDATETIME;p_iHours: Longint): TDATETIME;
 
Function dtSubtractMinutes(p_dtFrom: TDATETIME; p_iMinutes: Longint): TDATETIME;
 
Function dtSubtractMSec(p_dtFrom: TDATETIME; p_iMSec: longint): TDATETIME;
 
Function dtSubtractSec(p_dtFrom: TDATETIME; p_iSeconds: Longint): TDATETIME;
 
Function FileExistsInTree( p_saMakeTreeWithThis: ansistring; p_saFilename: ansiString; p_saTreeTop: ansiString; Var p_saRelPath: ansiString; p_u1Size: byte; p_u1Levels: byte ):Boolean;

(Originated in Wimble Project as _bPicExists_) This function returns TRUE if the passed pic file in p_saPicFileName (filename only) exists in the "pic Database" (so to speak) on the harddrive. If it does exist, (function returns true) the p_saPath parameter returns with the RELATIVE path of the pic's directory so the results can be used for both web and DOS operations. Note: p_saPath is NOT touched UNLESS the picture is found. This makes it easy for weboperations to have a default "NO PICTURE PRESENT" default that gets overrided if the image DOES exist! :)

Function i4PToC(p_sa: AnsiString; Var p_cdest: PChar; p_i4DestCBuflen: LongInt):LongInt;

Use to Copy a PASCAL ANSISTRING to a "C++" String Buffer. returns length actually copied for the benfit of said C++ routines.

Function i4WindowStateToInt(p_saWindowState: AnsiString): LongInt;
 
Function iDiffDays(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;

This looks recursive but its not - there are two versions of many of the datetime functions - one for freepascal TDATETIME and one for OS TIMESTAMPS.

Function iDiffDays(p_tsFrom: TTIMESTAMP;p_tsTo: TTIMESTAMP): Int64;
 
Function iDiffHours(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): Int64;
 
Function iDiffHours(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
 
Function iDiffMinutes(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
 
Function iDiffMinutes(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): Int64;
 
Function iDiffMonths(p_dtFrom: TDATETIME;p_dtTo: TDATETIME): Int64;

This is a funky way to do it, but necessary as far as I know because it manages to handle the leap year stuff by leveraging the FreePascal IncMonth Function. This works out to be accurate, versus day math like days divided by some guess'timate like 30 days a month - which is skewed.

Function iDiffMonths(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): Int64;
 
Function iDiffMSec(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
 
Function iDiffSeconds(p_dtFrom: TDATETIME; p_dtTo: TDATETIME): Int64;
 
Function iDiffSeconds(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): Int64;
 
Function iDiffYears(p_dtFrom: TDATETIME; p_dtTo: TDATETIME):Int64 ;
 
Function iDiffYears(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP):Int64 ;
 
Function iMilitaryToNormalHours(p_iHours:longint):longint;

returns numbers to their non-military counterpart: e.g: 13 becomes 1

Function iMSec:Int64;

cheap milli sec thing - returns milliseconds since midnight This is the Same as the above version of this routine except this one uses the system clock with the sysutils' NOW function.

Function iMSec(p_dt: TDATETIME):Int64;

cheap milli sec thing - returns milliseconds since midnight.

Procedure InitJASConfigRecord;

Resets JAS Configuration to its default app start up state

Procedure JASDebugPrint(p_sa:ansistring);

Sends (generally debug) messages to the console providing that the config- uration file's DebugServerConsoleMessagesEnabled is set to "yes". No carriage return or LineFeed is performed, so you can append previous text you sent to the console.

Procedure JASDebugPrintln(p_sa:ansistring);

Sends (generally debug) messages to the console providing that the config- uration file's DebugServerConsoleMessagesEnabled is set to "yes". This function sends a carriage return and a line feed after your passed string.

Procedure JASPrint(p_sa:ansistring);

Sends messages to the console providing that the configuration file's ServerConsoleMessagesEnabled is set to "yes". No carriage return or LineFeed is performed, so you can append previous text you sent to the console.

Procedure JASPrintln;

Sends messages to the console providing that the configuration file's ServerConsoleMessagesEnabled is set to "yes". This call sends a Carriage return and a linefeed to the console.

Procedure JASPrintln(p_sa:ansistring);

Sends messages to the console providing that the configuration file's ServerConsoleMessagesEnabled is set to "yes". This function sends a carriage return and a line feed after your passed string.

function JCopyFile(p_saSrc: ansistring; p_saDest: Ansistring): boolean;

copy file function that uses delphi classes.

Function JDate( p_saDate: AnsiString; p_iFormatOut: longint; p_iFormatIn: longint ): AnsiString;

Variety Without Passing Date Object In OR Out - See other JDATE routine for more info.

Function JDate( p_saDate: AnsiString; p_iFormatOut: longint; p_iFormatIn: longint; Var p_dt: TDATETIME ): AnsiString;

Date String to String conversion (can optionally pass date object, but send '?' as p_FormatIn parameter.

REQ PARAMETERS: p_saDate - DATE IN STRING FORMAT p_iFormatOut - DESIRED OUTPUT FORMAT —- unless using TDATETIME p_iFormatIn - Format of date coming in —- unless using TDATETIME

If Using TDATETIME, For Input/output, or who knows why you'd do both.... Send ZERO in the Appropriate p_iFormatIn and p_iFormatOut parameters.

var p_dtDateTime - TDATETIME. (Dual Purpose) in/out depending on passed p_saFormatIn and p_saFormatOut Parameters. which case pass '?'.

Function JLog( p_u2LogType_ID: word; p_u8Entry_ID: UInt64; p_saEntryData: AnsiString; p_saSourceFile: AnsiString ): Boolean;

INTERNAL

procedure Merge( p_bPerformMerge: boolean; p_uDupeScore: cardinal; p_bCaseSensitive: boolean; var p_bDupe: boolean; p_SrcXDL: JFC_XDL; p_DestXDL: JFC_XDL; p_ColXDL: JFC_XDL );

p_SrcXDL and p_DestXDL

XDL: Item_i8User = Weight 0-4,000,000,000 (REcommend lower values (Bˆ)> ONLY HONORED IN SrcXDL. This Value is ignored in DestXDL. Range: 4 Byte Unsigned Integer - Don't Exceed. XDL: Item_saName = Field Name (not Caption ideally but would work if both had the same naming. Which Means if DeDuping different tables, the DestXDL Item_saName's should be that of the SrcXDL. XDL: Item_saValue= Value to be compared XDL: Item_saDesc = Undefined.

NOTE: For Merge - the DestXDL will be Populated. So The Values after this routine performs a merge, that you'll want, will be in DestXDL.

If you have a small number of fields you wish to merge with a larger Table, only include the fields that exist in both tables.

The dupe Score is the Score to beat to be considered a DUPE. this is not an exact science - so this is how we learn to tweak settings to get acceptable results. Each kind of dupe checking will have unique WEIGHTS and a DupeScore.

If Both XDL Do No have identical COUNT of Items; also more than ZERO, otherwise the routine will fail.

p_ColXDL

The Collision XDL Returns Colisions Preventing a Full Merge. You Will Get a List of Column Names in p_ColXDL.Item_saName For diagnostic reasons, you will get Src Value in Item_saValue and Dest value in Item_saDesc. This might be useful to make user interface to selectively resolve colisions.

Naturally sending uninitialized XDLs will cause a CRASH.

Procedure ParseName( p_In_saName: ansistring; var p_Out_saFirst: ansistring; var p_Out_saMiddle: ansistring; var p_Out_saLast: ansistring );
 
function saBase64Decode(p_sa: ansistring): ansistring;

Decodes passed string to base64 encoding.

Freepascal has classes for this but I just wanted a simple function I could call to get data from one format to another without to much fuss. Now... because streams can get large; if you find this function needs some optimization or something, consider making an overloaded version of this function that accepts the TStringStream class instances you might have in memory already to avoid having to copy said data in memory again before it can be used.

NOTE: an oddity for this function that isn't related to this function but instead the underlying code. Freepascal has base64 encoding and decoding classes and we are using them. The strange thing was how in some situations a freepascal user reported missing bytes at the end of a base64 decoding. The reason has to do with the way base64 encoding more or less does groups of three bytes at a time. If the number of bytes in a stream is not evenly divisible by 3, you end up with 1 or two stragglers. Turns out.. the weird thing is that those last one or two bytes will get processed when the class destructor (destroy) is called. Here is the article:

function saBase64Encode(p_sa: ansistring): ansistring;

Encodes passed string to base64 encoding.

Freepascal has classes for this but I just wanted a simple function I could call to get data from one format to another without to much fuss. Now... because streams can get large; if you find this function needs some optimization or something, consider making an overloaded version of this function that accepts the TStringStream class instances you might have in memory already to avoid having to copy said data in memory again before it can be used.

NOTE: an oddity for this function that isn't related to this function but instead the underlying code. Freepascal has base64 encoding and decoding classes and we are using them. The strange thing was how in some situations a freepascal user reported missing bytes at the end of a base64 decoding. The reason has to do with the way base64 encoding more or less does groups of three bytes at a time. If the number of bytes in a stream is not evenly divisible by 3, you end up with 1 or two stragglers. Turns out.. the weird thing is that those last one or two bytes will get processed when the class destructor (destroy) is called. Here is the article: http://community.freepascal.org:10000/bboards/message?message_id=243020&forum_id=24088

Function saBuildName( p_saDear: AnsiString; p_saFirst: AnsiString; p_saMiddle: AnsiString; p_saLast: AnsiString; p_saSuffix: ansiString ):ansistring;
 
function saBytesToHuman(p_u8Size: UInt64): ansistring;

this function returns a byte count into a human readable form e.g. 88342348295 bytes – EW Better: 88G 5M whatever

Function saCmdLine: AnsiString;

returns command line when program invoked. saves user and other portions of app to piece back together the parameters - useful for logging purposes so is in mem as one string - not a loop every time the string needs to be placed back together

Function saCToP(Var p_csrc: PChar):AnsiString;

This routine takes a C++ sz and copies it into a Pascal Ansistring.

function saCut(p_saSrc: ansistring; p_i8Start: int64; p_i8Length: int64): ansistring;
 
Function saDebugNest(p_saSectionName: AnsiString; p_bBegin: Boolean; p_uNestLevel: UInt64): AnsiString;

This function is used by internal JLOG logging function and is made available externally for ug_jfc_threadmgr's internal debugging infrastructure.

function saDouble(p_fValue: double; p_iDigits: longint; p_iDecimals: longint): ansistring;

Converts a double to a string

function saDoubleEscape(p_saEscapeThis: ansistring; p_chCharToEscape: char): ansistring;

Double Escapes a String. finds a char then replaces it with two of them.

function saEscape(p_saEscapeThis: ansistring; p_chCharToEscape: char; p_saReplaceWith: ansistring): ansistring;

Escapes a String. Finds a char and replaces it with string. eg: 'Isn/'t' = saEscape('Isn''t','/''');

function saExtractDir(p_sa: ansistring): ansistring;

Identical to saExtractPath. Extracts the directory name excluding the filename.

function saExtractExt(p_saFileName: ansistring): ansistring;

Returns the filename extension only, excluding the path and file name.

function saExtractName(p_saFileName: ansistring): ansistring;

Returns the filename only. It excludes the path and the extension.

function saExtractPath(p_saFileName: ansistring): ansistring;

Returns the path without filename or extension

function saFileNameNoExt(p_saFileName: ansistring): ansistring;

Demoted. See function sExtractName(p_sFilename: string):string; Returns the filename without the extension. Demoted in favor of better function names :) Its identical ;)

Function saFormatTimeStamp(p_saFormat: AnsiString; p_ts: TTIMESTAMP): AnsiString;
 
Function saGetUniqueCommID(p_saPath: AnsiString):ansiString;
 
function saInsert(p_saSrc: ansistring; p_saInsertMe: ansistring; p_i8Start: int64): ansistring;
 
Function saIOAppendLogColumnData(Var p_rIOAppendLog: rtIOAppendLog): AnsiString;

NOTE: Used internally by IOAppendLog This was internally Encapsulated but - returns column data prepared to be outed by IOAppend after an EOL is appendeded for the correct OS implementation.

Function saIOAppendLogColumnHeaders(Var p_rIOAppendLog: rtIOAppendLog): AnsiString;

NOTE: Used internally by IOAppendLog This was internally Encapsulated but - returns column headers prepared to be outed by IOAppend after an EOL is appendeded for the correct OS implementation.

function saJasLocateTemplate( p_saREL_PATH_N_FILE:ansistring; p_sCurrentLang, p_sCurrentTheme: string; p_saRequestedDir: ansistring; p_i8Caller: int64; p_VHostTemplateDir: Ansistring; p_saWebShareDir: ansistring ): ansistring;

This function allows you to ask for a file you need from the system or a theme etc... and it will follow a series of locations to attempt to satisfy that request taking into account the current language, current theme, etc... and work its way back to the stock theme, then the built in templates that are not generally "directly accessible" like the theme bits might be. (It;s like the built in CORE UI for JAS - so - we have a fall back or two to try to keep running - even when things get misconfigured, forgotten or something.

IN: RELPATHNFILE ( e.g.: './en/error/somefile????' ); OUT: Full pathnfile to first version of file in order of precendence

(Current Theme Dir) CURRENT LANG (??) Folder DEFAULTLANGUAGE (EN) ROOT of Theme ( './' )

If NOT ALREADY IN 'stock' theme - check that next.... ('stock' Theme Dir) CURRENT LANG (??) Folder DEFAULTLANGUAGE (EN) ROOT of Theme ( './' )

LAST RESORT: ('templates' Dir) - Which unlike themes - are not generally set up for folks on the outside to access directly. CURRENT LANG (??) Folder DEFAULTLANGUAGE (EN) ROOT of Theme ( './' )

IF NOT TEMPLATE Exists - then an empty string is returned NOTE: if either or both p_saCurrentLang, p_saCurrentTheme are sent blank, than tests reliant on those will be skipped. =============================================================================

Function saJDType(p_u2JDType:word): AnsiString;

diagnostic Aid: Send it the Jegas Data Type - it will return its NAME as text

Function saJegasLogoRawText(p_saEOL: AnsiString; p_bShowJASServerID: boolean): AnsiString;
 
Function saJegasLogoRawText(p_saEOL: AnsiString): AnsiString;
 
function saJFCDirAsText(p_Dir: JFC_DIR; p_saLineTerminator: ansistring): ansistring;

takes a loaded JFC_DIR and produces posix like output with differences were not deemed important for parsing the results.

function saMid(p_saSrc: ansistring; p_i8Start: int64; p_i8Length: int64): ansistring;
 
Function saParseLastName(p_saName: ansistring): ansistring;
 
Function saPhoneConCat(p_saPhone: ansistring; p_saExt: ansistring): ansistring;
 
Function saProper(p_saSentence: ansistring): ansistring;
 
Function saSequencedFilename(p_saFilename: AnsiString; p_sExtension: String): AnsiString;

This function returns the first filename in a sequence like this: FILENAME.###.EXTENSION where ### are fixed length Zero Padded #. Sequenced based on File Presense. Only fails on 999 roll over. Starts at 001 To explain a little clear. If you have SomeFile.001.txt and call this function like: saMyResult:=saSequencedFilename('SomeFile','txt'); and then if there isn't a file named: SomeFile.002.txt already in existance, this is the value you will get back in saMyResult. This function can be useful so make revisions on disk - think VAX if you can go back that far.

function saSingle(p_fValue: single; p_iDigits: longint; p_iDecimals: longint): ansistring;

Converts a single to a string

function saSolveRelativePath(p_sa: AnsiString):ansistring;

This function takes a "DOS RELATIVE PATH" and attempts to solve it by removing the single and double dots ('.', '..') to give a solid path. This function does not verify with the operating system that this is valid, nor can it turn a dir of pure relative information into directory names.

TODO: Make work by verifying the PATH EXISTS as sent, and if it does, getting that information by merely changing to that path, and extracting the results. e.q. getCurDir, switch to path dir, read getdir again, go back to dir we started in (saved with first get dir) If directory can not be resolved, returned passed directory unchanged I suppose.

function saWin2LinPath(p_sa: ansistring): ansistring;

Does its best to convert a windows path to a linux one.

Function saWindowStateToString(p_i4WindowState: LongInt): AnsiString;
 
Function sGetUID:String; inline;

Generates (record) Unique Identifiers returns the number converted to a string for you.

Function StrToTimeStamp(p_sa: AnsiString):TTIMESTAMP;

This function takes a string and parses and converts it to a TTIMESTAMP Note that when I tried to convert 2005-01-01 05:30 AM I got erroneous results - yet when I tried '1/1/5 5:30 PM' I got '2005-01-01 17:30:00' as my timestamp. the point is you want to test to make sure the string format are using works correctly before you move forward. See the JDATE function to convert to and from various date formats.

Function tsAddDays(p_tsFrom: TTIMESTAMP; p_iDays: longint): TTIMESTAMP;
 
Function tsAddHours(p_tsFrom: TTIMESTAMP; p_Comp_Hours: Comp): TTIMESTAMP;
 
Function tsAddMinutes(p_tsFrom: TTIMESTAMP; p_Comp_Minutes: Comp): TTIMESTAMP;
 
Function tsAddMonths( p_tsFrom: TTIMESTAMP; p_iMonths: longint): TTIMESTAMP;
 
Function tsAddMSec( p_tsFrom: TTIMESTAMP; p_Comp_MSec: Comp): TTIMESTAMP;
 
Function tsAddSec(p_tsFrom: TTIMESTAMP; p_Comp_Seconds: Comp): TTIMESTAMP;
 
Function tsAddYears(p_tsFrom: TTIMESTAMP; p_iYears: longint): TTIMESTAMP;
 
Function tsDiff(p_tsFrom: TTIMESTAMP; p_tsTo: TTIMESTAMP): TTIMESTAMP;

Time Difference function between FPC TTIMESTAMPS. Note in testing it was discovered that YEAR differences didn't come back properly (zeroed) and the same for millisecond differences. HOURS, MINUTES and SECONDS do appear to work properly. This may be a flaw in our code, a bug in FPC lower level timestamp conversion routines this library wraps, or could be to exact spec and more work needs to be done on our end to make this function work the way we'd like. At the moment it's hardly in our critical path - but if it becomes so or you want to take a stab at fixing this - let us know! –Jason P Sage

function u2ExecuteShellCommand(p_saWorkingDir: ansistring; p_saCmd: ansistring): word;

Allows you to execute a shell command in a separate process. It inherits the executing user''s environment. No Facility to add to the environment is provided. (Do it another way - use TPROCESS directly if you want to get fancy.

You can however pass the directory you want to be the working directory for the process you are going to invoke.

Function u2GetCRC16TS(p_saSrcfile: ansistring): word;

Thread Safe when ug_jfc_threadmgr.pp employed. returns a 16bit crc of the specified file. errors will be seen as a zero result

Function u2Shell(p_saCommand: AnsiString; p_saParam: AnsiString): word;

Returns ExitCode - Works for DOS and Linux. Note: Linux just appends the two parameters with a space separator. Using this gives you a platform independant way to execute shell commands. See uc_library.iCShell functions WARNING: Using this particular function with the console unit renders the mouse unusable in DOS(At least if you call another FPC app already using it). That in MIND that there may be different precautions that need platform specific "safety" code to handling shelling out, it is recommended you use the iCShell function which does the same thing with precautionary code. (Which last I checked didn't exist cuz I'm waiting on a solution from FPC site) I don't like making routines you use in one case and not in another but any other way would require circular references OR including units in a less than optimized manner just to see if they are IN USE or not.

NOTE: The mouse dying warning was on 1.9.? FreePascal and Windows ME - and refers to the CONSOLE (dos) window only - it's hopefully fixed now - but might be different PERIOD in newer Win platforms and this FreePascal 2.?.? version(s) 2006-05-07 Jason P Sage THE FIX: You have to use the mouse unit directly in your program and then follow these steps after shelling out: DoneMouse; InitMouse; RedrawConsole;

function u8FileSize(p_saFilename: ansistring): UInt64;

returns specified file's size in bytes. if the file does not exist OR is ZERO LENGTH it will return ZERO! (So we get all 64bit space and dont lose half the addressing space) =|:ˆ)>

Function u8GetCRC64TS(p_saSrcfile: ansistring): UInt64;

Thread Safe when ug_jfc_threadmgr.pp employed. returns a 64bit crc of the specified file. errors will be seen as a zero result

Function u8GetUID: UInt64; inline;

Generates (record) Unique Identifiers returns the number as an UInt64 or a 64bit unsigned integer.

function uIPAddressCount(p_IP: string):UInt64;

counts number of IP Addresses represented by the pas IP. Examples: PASSED RESULT ———————— 1.1.1.1 : 1 1.1.1. : 256 1.1.1 : 256 1.1. : 65536 1.1 : 65536 1. : 16777216 1 : 16777216

Procedure WaitInMSec(p_i8MilliSeconds: Int64);
 
Procedure WaitInSec(p_i8Seconds: Int64);

SecsPerDay = 24 * 60 * 60; // Seconds and milliseconds per day MSecsPerDay = SecsPerDay * 1000; DateDelta = 693594; // Days between 1/1/0001 and 12/31/1899

Constants

cnDateFormat_00=0;

0 for when you pass DATE OBJECT, use this as format in, just so routine doesn't kick you out.

cnDateFormat_01=1;

1 ADO Friendly for SAVING TO MSSQL 5/1/2005 12:00 am (or Zero Padded not sure if matters)

cnDateFormat_02=2;
 
cnDateFormat_03=3;

BlueShoes Date Picker Format for isoInit and CGI Params

cnDateFormat_04=4;
 
cnDateFormat_05=5;

5 JavaScript date object - can be used to set time, I think

cnDateFormat_06=6;

6 - NOTE: Your date must already be fixed up to take into account UTC time differences. This function formats it, it doesn't translate the date to your UTC locale etc.

cnDateFormat_07=7;

7 javascript date.toLocaleString() format DDDD=day name spelled out

cnDateFormat_08=8;

8

cnDateFormat_09=9;

9

cnDateFormat_10=10;

10 'Mon May 20 2002'

cnDateFormat_11=11;

11 '2005-01-30 14:15:12'

cnDateFormat_12=12;

12 '01/30/05' USA Short Format

cnDateFormat_13=13;

13 '17/Jan/2007' European TODO: Implement this format in FPC JDATE

cnDateFormat_14=14;

14 'DD/MMM/YYYY HH:MM AM' or '17/Jan/2007 03:08 PM'

cnDateFormat_15=15;

15 'DD/MMM/YYYY HH:MM' or '17/Jan/2007 23:00' Military

cnDateFormat_16=16;

16 'HH:MM AM' or '03:08 PM'

cnDateFormat_17=17;

17 'HH:MM' or '23:00'

cnDateFormat_18=18;
 
cnDateFormat_19=19;

NOT ZERO PADDED

cnDateFormat_20=20;

ZERO PADDED

cnDateFormat_21=21;

11 '2005-01-30 14:15'

cnDateFormat_22=22;
 
cnDateFormat_23=23;
 
cnDateFormat_24=24;
 
cnDateFormat_Elements=11;
 
cnJegasLogColumns = 8;
 
csDateDay_1='Sunday';
 
csDateDay_2='Monday';
 
csDateDay_3='Tuesday';
 
csDateDay_4='Wednesday';
 
csDateDay_5='Thursday';
 
csDateDay_6='Friday';
 
csDateDay_7='Saturday';
 
csDateFormat_00='?';
 
csDateFormat_01='MM/DD/YYYY HH:NN AM';
 
csDateFormat_02='MM/DD/YYYY';
 
csDateFormat_03='YYYY-MM-DD';
 
csDateFormat_04='DDD MMM DD HH:NN:SS EDT YYYY';
 
csDateFormat_05='DDD, DD MMM YYYY HH:NN:SS';

4

csDateFormat_06='DDD, DD MMM YYYY HH:NN:SS UTC';
 
csDateFormat_07='DDDD, DD MMM, YYYY HH:NN:SS AM';
 
csDateFormat_08='HH:NN:SS';
 
csDateFormat_09='HH:NN:SS EDT';
 
csDateFormat_10='MMM DDD DD YYYY';
 
csDateFormat_11='YYYY-MM-DD HH:NN:SS';
 
csDateFormat_12='MM/DD/YY';
 
csDateFormat_13='DD/MMM/YYYY';
 
csDateformat_14='DD/MMM/YYYY HH:NN AM';
 
csDateFormat_15='DD/MMM/YYYY HH:NN';
 
csDateFormat_16='HH:NN AM';
 
csDateFormat_17='HH:NN';
 
csDateFormat_18='DD/MMM/YYYY:HH:NN:SS';
 
csDateFormat_19='MM/DD/YYYY HH:NN';
 
csDateFormat_20='MM/DD/YYYY HH:NN';
 
csDateFormat_21='YYYY-MM-DD HH:NN';
 
csDateFormat_22='DD/YYYY/MM HH:NN AM';
 
csDateFormat_23='DDD MMM MM HH:NN:SS YYYY';
 
csDateFormat_24='DD/MM/YYYY HH:NN AM';
 
csDateMonth_01='January';
 
csDateMonth_02='Febuary';
 
csDateMonth_03='March';
 
csDateMonth_04='April';
 
csDateMonth_05='May';
 
csDateMonth_06='June';
 
csDateMonth_07='July';
 
csDateMonth_08='August';
 
csDateMonth_09='September';
 
csDateMonth_10='October';
 
csDateMonth_11='November';
 
csDateMonth_12='December';
 
cs_IOAppendLog_QuoteBeginTemp='[JQUOTE_BEGIN]';

Alternate Temp Value for quotes found

cs_IOAppendLog_QuoteEndTemp='[JQUOTE_END]';

Alternate Temp Value for quotes found

Variables

gasDateFormat: array[0..22] Of String;
 
gasDay: array[1..7] Of String;
 
gasMonth: array[1..12] Of String;
 
gbServerCycling: boolean;

This is a JAS SPECIFIC variable that is here for scope reasons only. it is not used by the JegasAPI internally.

gbServerShuttingDown: boolean;

This is a JAS SPECIFIC variable that is here for scope reasons only. it is not used by the JegasAPI internally.

giDebugNestLevel: longint;

used for debugging - Nesting Count (Not ideal for threaded apps yet) so I made a thread debug begin-end system too - each thread is logged separately with its memory address used to formulate the filename" TTHREAD85832485789789324423.log <— sort of

grJASConfig: rtJASConfig;
 
grJegasCommon: rtJegasCommon;

This a "TYPE RECORD" of fields pertaining ONLY to JAS or the Jegas Application server. They are here for scope reasons but are not an integral part of the JegasAPI. Globally available.

grPunkBeGoneStats: rtPunkBeGoneStats;

=============================================================================

gsaJASFooter: Ansistring;

This is a JAS SPECIFIC variable that is here for scope reasons only. it is not used by the JegasAPI internally.

gu2UIDCounter: word;

============================================================================= ============================================================================= ***************************************************************************** ============================================================================= ***************************************************************************** !@!Declarations ***************************************************************************** ============================================================================= =============================================================================

JegasAPI - www.jegas.com
Generated by PasDoc 0.14.0.