htmlv: bug with history fixed

git-svn-id: svn://kolibrios.org@2725 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2012-06-02 21:50:26 +00:00
parent 2ac31d5946
commit f6aaf4294f
4 changed files with 35 additions and 115 deletions

View File

@ -41,7 +41,7 @@ void UrlsHistory::AddUrl() //
void UrlsHistory::GoBack()
{
if (history_current<=2) return;
if (history_current<=1) return;
history_current--;
copystr(#history_list[history_current].Item,#URL);
}

View File

@ -155,3 +155,36 @@ int utf8rutodos(dword ESI) //-
}
//------------------------------------------------------------------------------
dword Hex2Symb(char* htmlcolor)
{
dword j=0, symbol=0;
char ch=0x00;
FOR (;j<2;j++)
{
ch=ESBYTE[htmlcolor+j];
IF (ch==0x0d) || (ch=='\9') RETURN '';
IF ((ch>='0') && (ch<='9')) ch -= '0';
IF ((ch>='A') && (ch<='F')) ch -= 'A'-10;
IF ((ch>='a') && (ch<='f')) ch -= 'a'-10;
symbol = symbol*0x10 + ch;
}
wintodos(#symbol);
AL=symbol;
}
/*int hex2char(char c)
{
if (c <=9)
return (c+48);
return (c - 10 + 'a');
}
int hex2char(dword c)
{
if (c <=9)
return (c+48);
return (c - 10 + 'a');
}*/

View File

@ -328,18 +328,6 @@ inline fastcall dword upcase(dword ESI)
}while(AL!=0);
}
/*inline fastcall void lowcase(ESI)
{
do{
$LODSB
IF(AL>='A')&&(AL<='Z'){
AL+=0x20;
DSBYTE[ESI-1]=AL;
CONTINUE;
}
}while(AL!=0);
}*/
inline fastcall lowcase(ESI)
{
do{
@ -353,41 +341,6 @@ inline fastcall lowcase(ESI)
}
dword Hex2Symb(char* htmlcolor)
{
dword j=0, symbol=0;
char ch=0x00;
FOR (;j<2;j++)
{
ch=ESBYTE[htmlcolor+j];
IF (ch==0x0d) || (ch=='\9') RETURN '';
IF ((ch>='0') && (ch<='9')) ch -= '0';
IF ((ch>='A') && (ch<='F')) ch -= 'A'-10;
IF ((ch>='a') && (ch<='f')) ch -= 'a'-10;
symbol = symbol*0x10 + ch;
}
wintodos(#symbol);
AL=symbol;
}
/*int hex2char(char c)
{
if (c <=9)
return (c+48);
return (c - 10 + 'a');
}
int hex2char(dword c)
{
if (c <=9)
return (c+48);
return (c - 10 + 'a');
}*/
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword mainAreaColour,byte headerType,dword headerColour,EDI)
{
EAX = 12; // function 12:tell os about windowdraw

View File

@ -1,66 +0,0 @@
#code32 TRUE
inline fastcall dword malloc(dword ECX){
dword size, heap;
#speed
size = ECX;
EAX = 68;
EBX = 11;
$int 0x40;
heap = EAX;
IF (size<=heap)
{
EAX = 68;
EBX = 12;
ECX = size;
$int 0x40;
}
ELSE EAX=-1;
#codesize
}
inline fastcall dword free(dword ECX){
#speed
EAX = 68;
EBX = 13;
$int 0x40;
#codesize
}
inline fastcall dword realloc(dword ECX, EDX){
#speed
EAX = 68;
EBX = 20;
$int 0x40;
#codesize
}
inline fastcall memmov( EDI, ESI, ECX)
{
asm {
MOV EAX, ECX
CMP EDI, ESI
JG L1
JE L2
SAR ECX, 2
JS L2
REP MOVSD
MOV ECX, EAX
AND ECX, 3
REP MOVSB
JMP SHORT L2
L1: LEA ESI, DSDWORD[ ESI+ECX-4]
LEA EDI, DSDWORD[ EDI+ECX-4]
SAR ECX, 2
JS L2
STD
REP MOVSD
MOV ECX, EAX
AND ECX, 3
ADD ESI, 3
ADD EDI, 3
REP MOVSB
CLD
L2:
}
}