- Remove redundant inttohex function.

git-svn-id: trunk@3483 -
This commit is contained in:
daniel 2006-05-12 10:07:46 +00:00
parent 83a0c8cd4b
commit 2341cae336
5 changed files with 6 additions and 33 deletions

View File

@ -209,9 +209,7 @@ var C: string;
begin
C:='';
for I:=1 to length(S) do
begin
Insert('#$'+IntToHex(ord(S[I]),2),C,Length(C)+1);
end;
Insert('#$'+hexstr(ord(S[I]),2),C,Length(C)+1);
PaletteToStr:=C;
end;

View File

@ -287,7 +287,7 @@ begin
if (OldKey=WantedKeys[i]) and (i<>j) then
begin
If ConfirmBox('"'+St+'" is used for'+#13+
'key $'+IntToHex(OldKey,4)+' '+WantedKeysLabels[i]+#13+
'key $'+hexstr(oldKey,4)+' '+WantedKeysLabels[i]+#13+
'Change it to '+WantedKeysLabels[j],nil,true)=cmYes then
begin
KeyEscape[i]:='';

View File

@ -1025,7 +1025,7 @@ function AddrStr(Addr: longint): string;
type TLongint = record LoW,HiW: word; end;
begin
with TLongint(Addr) do
AddrStr:='$'+IntToHex(HiW,4)+IntToHex(LoW,4);
AddrStr:='$'+hexstr(HiW,4)+hexstr(LoW,4);
end;
begin
ClearFormatParams;

View File

@ -146,7 +146,6 @@ function FloatToStr(D: Double; Decimals: byte): string;
function FloatToStrL(D: Double; Decimals: byte; MinLen: byte): string;
function HexToInt(S: string): longint;
function HexToCard(S: string): cardinal;
function IntToHex(L: longint; MinLen: integer): string;
function GetStr(P: PString): string;
function GetPChar(P: PChar): string;
function BoolToStr(B: boolean; const TrueS, FalseS: string): string;
@ -504,30 +503,6 @@ begin
HexToCard:=L;
end;
function IntToHex(L: longint; MinLen: integer): string;
const HexNums : string[16] = '0123456789ABCDEF';
var S: string;
R: real;
function DivF(Mit,Mivel: real): longint;
begin
DivF:=trunc(Mit/Mivel);
end;
function ModF(Mit,Mivel: real): longint;
begin
ModF:=trunc(Mit-DivF(Mit,Mivel)*Mivel);
end;
begin
S:='';
R:=L; if R<0 then begin R:=R+2147483647+2147483647+2; end;
repeat
Insert(HexNums[ModF(R,16)+1],S,1);
R:=DivF(R,16);
until R=0;
while length(S)<MinLen do
Insert('0',S,1);
IntToHex:=S;
end;
function FloatToStr(D: Double; Decimals: byte): string;
var S: string;
L: byte;

View File

@ -1511,11 +1511,11 @@ begin
begin
if LastEmittedChar<>ord(hscLineBreak) then
EmitText(hscLineBreak);
EmitDebugText('[tag0x'+IntToHex(Cmd,2)+']');
EmitDebugText('[tag0x'+hexstr(Cmd,2)+']');
end;
$80 : begin
FontNumber:=ReadSHORT;
EmitDebugText('[font'+IntToStr(FontNumber)+']');
EmitDebugText('[font'+inttostr(FontNumber)+']');
end;
$81 : {LineBreak}
begin
@ -1614,7 +1614,7 @@ begin
AddLinkToTopic(T,ID,LinkOfs);
end;
end;
else EmitDebugText('[tag0x'+IntToHex(Cmd,2)+']');
else EmitDebugText('[tag0x'+hexstr(Cmd,2)+']');
end;
end;
if SLen>0 then