forked from KolibriOS/kolibrios
c--: small libs update
git-svn-id: svn://kolibrios.org@3958 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5e3125f462
commit
afd7b2f1a8
@ -150,22 +150,6 @@ inline fastcall word GetButtonID()
|
|||||||
$shr eax,8
|
$shr eax,8
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------
|
|
||||||
|
|
||||||
/* ecx = point to structure
|
|
||||||
sysdir_name rb 64
|
|
||||||
sysdir_path rb 64
|
|
||||||
Ïðèìåð:
|
|
||||||
dir_name1 db 'addappl',0
|
|
||||||
dir_path1 db 'HD0/1',0
|
|
||||||
*/
|
|
||||||
inline fastcall int SetAddApplDir( ECX)
|
|
||||||
{
|
|
||||||
EAX = 30;
|
|
||||||
EBX = 3;
|
|
||||||
$int 0x40
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fastcall dword GetFreeRAM()
|
inline fastcall dword GetFreeRAM()
|
||||||
{
|
{
|
||||||
$mov eax, 18
|
$mov eax, 18
|
||||||
@ -381,15 +365,15 @@ inline fastcall void debugch( ECX)
|
|||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
void DefineAndDrawWindow(dword x,y, sizeX,sizeY, byte WindowType,dword WindowAreaColor, EDI, ESI)
|
void DefineAndDrawWindow(dword x, y, size_w, size_h, byte WindowType,dword WindowAreaColor, EDI, ESI)
|
||||||
{
|
{
|
||||||
EAX = 12; // function 12:tell os about windowdraw
|
EAX = 12; // function 12:tell os about windowdraw
|
||||||
EBX = 1;
|
EBX = 1;
|
||||||
$int 0x40
|
$int 0x40
|
||||||
|
|
||||||
EAX = 0;
|
EAX = 0;
|
||||||
EBX = x << 16 + sizeX;
|
EBX = x << 16 + size_w;
|
||||||
ECX = y << 16 + sizeY;
|
ECX = y << 16 + size_h;
|
||||||
EDX = WindowType << 24 | WindowAreaColor;
|
EDX = WindowType << 24 | WindowAreaColor;
|
||||||
$int 0x40
|
$int 0x40
|
||||||
|
|
||||||
|
@ -1,5 +1,26 @@
|
|||||||
#define SOCKET_PASSIVE 0
|
#define SOCKET_PASSIVE 0
|
||||||
#define SOCKET_ACTIVE 1
|
#define SOCKET_ACTIVE 1
|
||||||
|
|
||||||
|
inline fastcall int GetNumOfActiveNetworkDevices()
|
||||||
|
{
|
||||||
|
$mov eax,74
|
||||||
|
BL = -1;
|
||||||
|
$int 0x40
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fastcall dword OpenUnixSocket( ECX, EDX, ESI, EDI)
|
||||||
|
{
|
||||||
|
$mov eax,75
|
||||||
|
$mov bl,0
|
||||||
|
$int 0x40
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ======================= OLD =========================*/
|
||||||
|
|
||||||
inline fastcall dword OpenSocket( ECX, EDX, ESI, EDI)
|
inline fastcall dword OpenSocket( ECX, EDX, ESI, EDI)
|
||||||
{
|
{
|
||||||
$mov eax,53
|
$mov eax,53
|
||||||
@ -7,6 +28,7 @@ inline fastcall dword OpenSocket( ECX, EDX, ESI, EDI)
|
|||||||
$int 0x40
|
$int 0x40
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline fastcall dword CloseSocket( ECX )
|
inline fastcall dword CloseSocket( ECX )
|
||||||
{
|
{
|
||||||
$mov eax, 53
|
$mov eax, 53
|
||||||
|
@ -233,12 +233,14 @@ dword strstri(dword searchin, usestr_s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void strcpyb(dword search_in, copyin, startstr, endstr)
|
unsigned int strcpyb(dword search_in, copyin, startstr, endstr)
|
||||||
{
|
{
|
||||||
dword startp, endp;
|
dword startp, endp;
|
||||||
startp = strstr(search_in, startstr) + strlen(startstr);
|
dword copyin_start_off = copyin;
|
||||||
|
if (startstr==0) startp = search_in; else startp = strstr(search_in, startstr) + strlen(startstr);
|
||||||
endp = strstri(startp, endstr);
|
endp = strstri(startp, endstr);
|
||||||
if (startp==endp) return;
|
if (endp==0) endp = startp+strlen(search_in);
|
||||||
|
//if (startp==endp) return 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DSBYTE[copyin] = DSBYTE[startp];
|
DSBYTE[copyin] = DSBYTE[startp];
|
||||||
@ -247,6 +249,7 @@ void strcpyb(dword search_in, copyin, startstr, endstr)
|
|||||||
}
|
}
|
||||||
while (startp<endp);
|
while (startp<endp);
|
||||||
DSBYTE[copyin] = '\0';
|
DSBYTE[copyin] = '\0';
|
||||||
|
return copyin_start_off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user