You've already forked lazarus-ccr
Adds a new braille routine
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1959 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -25,7 +25,7 @@ uses
|
|||||||
{$ifdef FPBROWSER_TURBOPOWERIPRO}
|
{$ifdef FPBROWSER_TURBOPOWERIPRO}
|
||||||
viewer_ipro,
|
viewer_ipro,
|
||||||
{$endif}
|
{$endif}
|
||||||
browserviewer, utf8_braille;
|
browserviewer, mod_braille;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
|
@ -102,9 +102,9 @@
|
|||||||
<UnitName Value="viewer_ipro"/>
|
<UnitName Value="viewer_ipro"/>
|
||||||
</Unit9>
|
</Unit9>
|
||||||
<Unit10>
|
<Unit10>
|
||||||
<Filename Value="utf8_braille.pas"/>
|
<Filename Value="mod_braille.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="utf8_braille"/>
|
<UnitName Value="mod_braille"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -67,13 +67,39 @@ const
|
|||||||
{u + acute} chr($be), {u + circumflex} 'TODO', {u + diaeresis} chr($b3),
|
{u + acute} chr($be), {u + circumflex} 'TODO', {u + diaeresis} chr($b3),
|
||||||
{y + acute} 'TODO', {thorn} 'TODO', {y + diaeresis} 'TODO');
|
{y + acute} 'TODO', {thorn} 'TODO', {y + diaeresis} 'TODO');
|
||||||
|
|
||||||
|
function ConvertUTF8CharacterToBraille(AInput: string): string;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
function ConvertUTF8TextToBrailleNew(AInput: string): string;
|
||||||
|
var
|
||||||
|
lInput: PChar;
|
||||||
|
lPos: Integer;
|
||||||
|
lCharSize: Integer;
|
||||||
|
lCurChar: string;
|
||||||
|
begin
|
||||||
|
Result := '';
|
||||||
|
lInput := PChar(AInput);
|
||||||
|
lPos := 0;
|
||||||
|
while lPos < Length(AInput) do
|
||||||
|
begin
|
||||||
|
lCharSize := LCLProc.UTF8CharacterLength(lInput);
|
||||||
|
|
||||||
|
SetLength(lCurChar, lCharSize);
|
||||||
|
Move(lCurChar[1], lInput^, lCharSize);
|
||||||
|
Result := Result + ConvertUTF8CharacterToBraille(lCurChar);
|
||||||
|
|
||||||
|
Inc(lInput, lCharSize);
|
||||||
|
Inc(lPos, lCharSize);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function ConvertUTF8TextToBraille(Line: string): string;
|
function ConvertUTF8TextToBraille(Line: string): string;
|
||||||
var
|
var
|
||||||
Count, count_aux, n, n_aux, decr: integer;
|
Count, count_aux, n, n_aux, decr: integer;
|
||||||
Braille_string, string_aux: string;
|
Braille_string, string_aux: string;
|
||||||
num, accented: boolean;
|
num, accented: boolean;
|
||||||
dict_p: dictionary_pointer;
|
dict_p: dictionary_pointer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Braille_string := '';
|
Braille_string := '';
|
||||||
num := False;
|
num := False;
|
||||||
|
Reference in New Issue
Block a user