mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 11:59:19 +02:00
- Remove hexstr implementation.
git-svn-id: trunk@7922 -
This commit is contained in:
parent
787aac7478
commit
afeb9d5786
@ -293,31 +293,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
const
|
|
||||||
HexTbl : array[0..15] of char='0123456789ABCDEF';
|
|
||||||
function HexB(b:byte):shortstring;
|
|
||||||
begin
|
|
||||||
HexB[0]:=#2;
|
|
||||||
HexB[1]:=HexTbl[b shr 4];
|
|
||||||
HexB[2]:=HexTbl[b and $f];
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function hexstr(val : cardinal;cnt : byte) : shortstring;
|
|
||||||
const
|
|
||||||
HexTbl : array[0..15] of char='0123456789ABCDEF';
|
|
||||||
var
|
|
||||||
i : longint;
|
|
||||||
begin
|
|
||||||
hexstr[0]:=char(cnt);
|
|
||||||
for i:=cnt downto 1 do
|
|
||||||
begin
|
|
||||||
hexstr[i]:=hextbl[val and $f];
|
|
||||||
val:=val shr 4;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
Function L0(l:longint):string;
|
Function L0(l:longint):string;
|
||||||
{
|
{
|
||||||
return the string of value l, if l<10 then insert a zero, so
|
return the string of value l, if l<10 then insert a zero, so
|
||||||
@ -1499,7 +1474,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if j>1 then
|
if j>1 then
|
||||||
write(',');
|
write(',');
|
||||||
write(hexb(getbyte));
|
write(hexstr(getbyte,2));
|
||||||
end;
|
end;
|
||||||
writeln;
|
writeln;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user