From d846ff43264b9db6543fda626d282fca063b85ad Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 22 May 2010 06:47:40 +0000 Subject: [PATCH] Remove dead code, previously used by rewritten parseSQL(). --- source/helpers.pas | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/source/helpers.pas b/source/helpers.pas index 9b9ba382..1fd6a2b2 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -86,7 +86,6 @@ type function getEnumValues(str: String): String; function IsWhitespace(const c: Char): Boolean; function IsLetter(const c: Char): Boolean; - function IsNumber(const c: Char): Boolean; function GetSQLSplitMarkers(const SQL: String): TSQLBatch; function SplitSQL(const SQL: String): TSQLBatch; function sstr(str: String; len: Integer) : String; @@ -384,49 +383,6 @@ begin end; -{*** - Return true if given character represents a number. - Limitations: only recognizes ANSI numerals. - Eligible for inlining, hope the compiler does this automatically. -} -function IsNumber(const c: Char): Boolean; -var - b: word; -begin - b := ord(c); - Result := (b >= 48) and (b <= 57); -end; - - - -{*** - Scan backwards, returning true if SQL matches the given string case sensitively. - Limitations: in case insensitive mode, input must be ANSI and lower case (for speed). - Eligible for inlining, hope the compiler does this automatically. -} -function scanReverse(const haystack: String; hayIndex: integer; const needle: String; needleEnd: integer; insensitive: boolean): boolean; -var - b: word; - c: Char; -begin - while (hayIndex > 0) and (needleEnd > 0) do begin - // Lowercase ANSI A-Z if requested. - if insensitive then begin - b := Ord(haystack[hayIndex]); - if (b > 64) and (b < 91) then b := b - 65 + 97; - c := Char(b); - end else c := haystack[hayIndex]; - if c <> needle[needleEnd] then begin - result := false; - exit; - end; - needleEnd := needleEnd - 1; - hayIndex := hayIndex - 1; - end; - result := needleEnd = 0; -end; - - function GetSQLSplitMarkers(const SQL: String): TSQLBatch; var i, AllLen, DelimLen, DelimStart, LastLeftOffset, RightOffset, LastNewLineOffset: Integer;