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(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();} 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); load_dll2(#abox_lib, #boxlib_init,0);
if (load_dll2(libtruetype, #truetype,0)!=0) {debug("Íå óäàëîñü ïîäêëþ÷èòü áèáëèîòåêó TrueType"w); use_truetype = 2;} if (load_dll2(libtruetype, #truetype,0)!=0) {debug("Íå óäàëîñü ïîäêëþ÷èòü áèáëèîòåêó TrueType"w); use_truetype = 2; }
else init_font(#fontlol);
init_font(#fontlol);
if (!URL) strcpy(#URL, "/sys/home.htm"); if (!URL) strcpy(#URL, "/sys/home.htm");
strcpy(#editURL, #URL); strcpy(#editURL, #URL);

View File

@ -200,4 +200,9 @@ inline fastcall void GetCurDir( ECX, EDX)
$mov eax,30 $mov eax,30
$mov ebx,2 $mov ebx,2
$int 0x40 $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 true 1
#define false 0 #define false 0
#define NULL 0
//Button options //Button options
#define BT_DEL 0x80000000 #define BT_DEL 0x80000000
#define BT_HIDE 0x40000000 #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 struct proc_info
{ {
#define SelfInfo -1 #define SelfInfo -1
@ -368,6 +394,14 @@ void PutImage(dword EBX,w,h,x,y)
$int 0x40 $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) void PutPaletteImage(dword EBX,w,h,x,y,ESI,EDI)
{ {
EAX = 65; EAX = 65;

View File

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