HTMLv fix, lib update

git-svn-id: svn://kolibrios.org@3054 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2012-11-17 17:25:04 +00:00
parent 9fcea4ddbf
commit 5a0f87bd4c
4 changed files with 73 additions and 42 deletions

View File

@ -106,9 +106,8 @@ void main()
if (load_dll2(libimg, #libimg_init,1)!=0) debug("Íå óäàëîñü ïîäêëþ÷èòü áèáëèîòåêó libimg"w);
if (load_dll2(boxlib, #edit_box_draw,0)!=0) {RunProgram("@notify", "System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();}
load_dll2(#abox_lib, #boxlib_init,0);
if (load_dll2(libtruetype, #truetype,0)!=0) {debug("Íå óäàëîñü ïîäêëþ÷èòü áèáëèîòåêó TrueType"w); use_truetype = 2;}
init_font(#fontlol);
if (load_dll2(libtruetype, #truetype,0)!=0) {debug("Íå óäàëîñü ïîäêëþ÷èòü áèáëèîòåêó TrueType"w); use_truetype = 2; }
else init_font(#fontlol);
if (!URL) strcpy(#URL, "/sys/home.htm");
strcpy(#editURL, #URL);

View File

@ -200,4 +200,9 @@ inline fastcall void GetCurDir( ECX, EDX)
$mov eax,30
$mov ebx,2
$int 0x40
}
void notify(dword notify_param)
{
RunProgram("@notify", notify_param);
}

View File

@ -24,6 +24,8 @@ char program_path[4096];
#define true 1
#define false 0
#define NULL 0
//Button options
#define BT_DEL 0x80000000
#define BT_HIDE 0x40000000
@ -149,6 +151,30 @@ inline fastcall word GetButtonID()
//----------------------------------------
inline fastcall dword GetFreeRAM()
{
$mov eax, 18
$mov ebx, 16
$int 0x40
//return eax = ðàçìåð ñâîáîäíîé ïàìÿòè â êèëîáàéòàõ
}
inline fastcall dword LoadDriver( ECX) //ECX - èìÿ äðàéâåðà
{
$mov eax, 68
$mov ebx, 16
$int 0x40
//return 0 - íåóäà÷à, èíà÷å eax = õýíäë äðàéâåðà
}
inline fastcall dword RuleDriver( ECX) //óêàçàòåëü íà óïðàâëÿþùóþ ñòðóêòóðó
{
$mov eax, 68
$mov ebx, 17
$int 0x40
//return eax = îïðåäåëÿåòñÿ äðàéâåðîì
}
struct proc_info
{
#define SelfInfo -1
@ -368,6 +394,14 @@ void PutImage(dword EBX,w,h,x,y)
$int 0x40
}
void _PutImage(dword x,y, w,h, EBX)
{
EAX = 7;
ECX = w<<16+h;
EDX = x<<16+y;
$int 0x40
}
void PutPaletteImage(dword EBX,w,h,x,y,ESI,EDI)
{
EAX = 65;

View File

@ -9,7 +9,7 @@
// itoa( ESI)
// atoi( EAX)
// strupr( ESI)
// strlwr( ESI)
// strlwr( ESI) ----- âîçìîæíî íå ïîääåðæèâàåò êèðèëëèöó
// strttl( EDX)
// strtok( ESI)
//------------------------------------------------------------------------------
@ -130,38 +130,42 @@ inline fastcall strcat( EDI, ESI)
}
}
char buffer[11];
inline fastcall dword itoa( ESI)
dword itoa( ESI)
{
$mov edi, #buffer
$mov ecx, 10
$test esi, esi
$jns f1
$mov al, '-'
$stosb
$neg esi
f1:
$mov eax, esi
$push -'0'
unsigned char buffer[11];
EDI = #buffer;
ECX = 10;
if (ESI < 0)
{
$mov al, '-'
$stosb
$neg esi
}
$mov eax, esi
$push -'0'
f2:
$xor edx, edx
$div ecx
$push edx
$test eax, eax
$jnz f2
$xor edx, edx
$div ecx
$push edx
$test eax, eax
$jnz f2
f3:
$pop eax
$add al, '0'
$stosb
$jnz f3
$mov eax, #buffer
$ret
$pop eax
$add al, '0'
$stosb
$jnz f3
$mov al, '\0'
$stosb
return #buffer;
}
inline fastcall dword atoi( EDI)
{
//ESI=EDI=EAX;
ESI=EDI;
IF(DSBYTE[ESI]=='-')ESI++;
EAX=0;
@ -175,7 +179,7 @@ inline fastcall dword atoi( EDI)
}
inline fastcall unsigned int strchr( ESI,BL)
inline fastcall signed int strchr( ESI,BL)
{
int jj=0;
do{
@ -183,10 +187,11 @@ inline fastcall unsigned int strchr( ESI,BL)
$lodsb
IF(AL==BL) return jj;
} while(AL!=0);
return 0;
}
inline fastcall unsigned int strrchr( ESI,BL)
inline fastcall signed int strrchr( ESI,BL)
{
int jj=0, last=-1;
do{
@ -280,18 +285,6 @@ LS3:
/* strtok( LPSTR dest, src, divs);
src - óêàçàòåëü íà èñõîäíóþ ñòðîêó èëè ðåçóëüòàò ïðåäûäóùåãî âûçîâà
dest - óêàçàòåëü íà áóôåð, êóäà áóäåò ñêîïèðîâàíî ñëîâî