summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-05 15:07:44 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-05 15:07:44 +0200
commit43088bb827104d0d59c12a9407ed922f7fc5e2df (patch)
treef9388359c279166b973acc9468e9f08cae06144f
parentae274a4eefaffa366b6644b757932123f9654fa7 (diff)
downloadfpGUI-43088bb827104d0d59c12a9407ed922f7fc5e2df.tar.xz
Removed utf8tools package requirement.
* But I had to sacrafice correct utf8 character handling in IsAlhpa() and IsDigit() functions. I'll fix this later. Signed-off-by: Graeme Geldenhuys <graeme@mastermaths.co.za>
-rw-r--r--src/newview_fpgui.lpi7
-rw-r--r--src/newview_fpgui.lpr2
-rw-r--r--src/nvUtilities.pas19
3 files changed, 16 insertions, 12 deletions
diff --git a/src/newview_fpgui.lpi b/src/newview_fpgui.lpi
index d6a62afc..19a5f9c9 100644
--- a/src/newview_fpgui.lpi
+++ b/src/newview_fpgui.lpi
@@ -27,13 +27,10 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
- <RequiredPackages Count="2">
+ <RequiredPackages Count="1">
<Item1>
- <PackageName Value="utf8tools"/>
- </Item1>
- <Item2>
<PackageName Value="fpgui_toolkit"/>
- </Item2>
+ </Item1>
</RequiredPackages>
<Units Count="16">
<Unit0>
diff --git a/src/newview_fpgui.lpr b/src/newview_fpgui.lpr
index a9b0f6b2..5eef5ee4 100644
--- a/src/newview_fpgui.lpr
+++ b/src/newview_fpgui.lpr
@@ -10,7 +10,7 @@ uses
{$IFDEF Timing}EpikTimer,{$ENDIF}
fpg_main, frm_main, DataTypes, HelpFileHeader, HelpWindow,
IPFEscapeCodes, HelpTopic, CompareWordUnit, SearchTable, TextSearchQuery,
- nvUtilities, nvNullObjects, HelpFile, SearchUnit, utf8tools;
+ nvUtilities, nvNullObjects, HelpFile, SearchUnit;
procedure MainProc;
diff --git a/src/nvUtilities.pas b/src/nvUtilities.pas
index be347fba..a8e3eb96 100644
--- a/src/nvUtilities.pas
+++ b/src/nvUtilities.pas
@@ -41,9 +41,9 @@ function IsAlpha(const AChar: TfpgChar): boolean;
implementation
-uses
- character // from utf8tools package (pulls in LCL requirement which we MUST change)
- ;
+//uses
+// character // from utf8tools package (pulls in LCL requirement which we MUST change)
+// ;
Function ExtractNextValue( var S: string;
@@ -107,12 +107,19 @@ end;
function IsDigit(const AChar: TfpgChar): boolean;
begin
- Result := TCharacter.IsDigit(AChar);
+ { TODO -oGraeme -cunicode : Not utf-8 compliant. }
+ Result := ( AChar>='0' ) and ( AChar<='9' );
+ //Result := TCharacter.IsDigit(AChar);
end;
function IsAlpha(const AChar: TfpgChar): boolean;
-begin
- Result := TCharacter.IsLetter(AChar);
+var
+ UppercaseC: TfpgChar;
+Begin
+ { TODO -oGraeme -cunicode : Not utf-8 compliant. }
+ UppercaseC := UpperCase( AChar );
+ Result := ( UppercaseC >= 'A' ) and ( UppercaseC <= 'Z' );
+ //Result := TCharacter.IsLetter(AChar);
end;
end.