You've already forked lazarus-ccr
lazbarcodes: Pascalized function in_alpha in lbc_qr.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8238 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -258,33 +258,12 @@ hexagon: array [0..119] of integer = (
|
|||||||
const SSET='0123456789ABCDEF';
|
const SSET='0123456789ABCDEF';
|
||||||
*)
|
*)
|
||||||
|
|
||||||
function in_alpha(glyph: Integer): Integer;
|
function in_alpha(glyph: Integer): Boolean;
|
||||||
var
|
var
|
||||||
retval: Integer = 0;
|
|
||||||
cglyph: Char;
|
cglyph: Char;
|
||||||
begin
|
begin
|
||||||
{INITCODE} retval := 0;
|
cglyph := Char(glyph);
|
||||||
{INITCODE} cglyph := Char (glyph);
|
Result := cglyph in ['0'..'9', 'A'..'Z', ' ', '$', '%', '*', '+', '-', '.', '/', ':'];
|
||||||
if IsTrue(((cglyph >= '0')) and ((cglyph <= '9'))) then
|
|
||||||
begin
|
|
||||||
retval := 1;
|
|
||||||
end;
|
|
||||||
if IsTrue(((cglyph >= 'A')) and ((cglyph <= 'Z'))) then
|
|
||||||
begin
|
|
||||||
retval := 1;
|
|
||||||
end;
|
|
||||||
case cglyph of
|
|
||||||
' ',
|
|
||||||
'$',
|
|
||||||
'%',
|
|
||||||
'*',
|
|
||||||
'+',
|
|
||||||
'-',
|
|
||||||
'.',
|
|
||||||
'/',
|
|
||||||
':': retval := 1;
|
|
||||||
end;
|
|
||||||
exit (retval);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure define_mode(mode: PChar; jisdata: PInteger; length: Integer; gs1: Boolean);
|
procedure define_mode(mode: PChar; jisdata: PInteger; length: Integer; gs1: Boolean);
|
||||||
@@ -301,7 +280,7 @@ begin
|
|||||||
mode[i] := 'K';
|
mode[i] := 'K';
|
||||||
end else begin
|
end else begin
|
||||||
mode[i] := 'B';
|
mode[i] := 'B';
|
||||||
if IsTrue(in_alpha (jisdata[i])) then
|
if in_alpha(jisdata[i]) then
|
||||||
begin
|
begin
|
||||||
mode[i] := 'A';
|
mode[i] := 'A';
|
||||||
end;
|
end;
|
||||||
@@ -3229,7 +3208,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Inc (n_count);
|
Inc (n_count);
|
||||||
end;
|
end;
|
||||||
if IsTrue(in_alpha (jisdata[i])) then
|
if in_alpha(jisdata[i]) then
|
||||||
begin
|
begin
|
||||||
Inc (a_count);
|
Inc (a_count);
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user