/programs/cmm/lib/lexer.h |
---|
File deleted |
\ No newline at end of file |
/programs/cmm/lib/file_system.h |
---|
1,13 → 1,3 |
#ifndef INCLUDE_FILESYSTEM_H |
#define INCLUDE_FILESYSTEM_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_STRING_H |
#include "../lib/strings.h" |
#endif |
:struct f70{ |
dword func; |
dword param1; |
336,5 → 326,4 |
strcat(#size, " Kb"); |
return #size; |
} |
#endif |
} |
/programs/cmm/lib/kolibri.h |
---|
1,5 → 1,5 |
//CODED by Veliant, Leency, Nable. GNU GPL licence. |
#ifndef INCLUDE_KOLIBRI_H |
#define INCLUDE_KOLIBRI_H |
#startaddress 0 |
877,6 → 877,4 |
__generator = GetStartTime(); |
//mem_Init(); |
main(); |
} |
#endif |
} |
/programs/cmm/lib/strings.h |
---|
1,14 → 1,3 |
#ifndef INCLUDE_STRING_H |
#define INCLUDE_STRING_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_MEM_H |
#include "../lib/mem.h" |
#endif |
//------------------------------------------------------------------------------ |
// strspn(dword text1,text2) --- example: strspn("12 year","1234567890") -> return 2 |
// strpbrk(dword text1,text2) --- example: strpbrk("this test", " ckfi") -> return "is test" |
50,8 → 39,6 |
} |
*/ |
inline int strspn(dword text1,text2) |
{ |
dword beg; |
389,7 → 376,7 |
} |
/*inline fastcall signed int strchr( ESI,BL) |
inline fastcall signed int strchr( ESI,BL) |
{ |
int jj=0; |
do{ |
398,20 → 385,9 |
IF(AL==BL) return jj; |
} while(AL!=0); |
return 0; |
}*/ |
inline dword strchr(dword shb;char s) |
{ |
char ss; |
loop() |
{ |
ss = DSBYTE[shb]; |
if(!ss)return 0; |
if(ss==s)return shb; |
shb++; |
} |
} |
inline fastcall signed int strrchr( ESI,BL) |
{ |
int jj=0, last=0; |
756,50 → 732,28 |
{ |
char s; |
dword ret,l; |
//l = strlen(text); |
ret = 0; |
s = DSBYTE[text]; |
//if(l==6) |
while(s) |
{ |
ret <<= 4; |
if(s>='A')&&(s<='F')ret |= s-'A'+10; |
else if(s>='a')&&(s<='f')ret |= s-'a'+10; |
else if(s>='0')&&(s<='9')ret |= s-'0'; |
else if(s>='0')&&(s<='9')ret |= s-'a'+10; |
text++; |
s = DSBYTE[text]; |
} |
return ret; |
} |
inline signed csshexdec(dword text) |
/*else if(l==3) while(s) |
{ |
char s; |
dword ret,l; |
byte tmp; |
l = strlen(text); |
ret = 0; |
s = DSBYTE[text]; |
tmp = 0; |
if(l==6) while(s) |
{ |
ret <<= 4; |
if(s>='A')&&(s<='F')ret |= s-'A'+10; |
else if(s>='a')&&(s<='f')ret |= s-'a'+10; |
else if(s>='0')&&(s<='9')ret |= s-'0'; |
else if(s>='0')&&(s<='9')ret |= s-'a'+10; |
text++; |
s = DSBYTE[text]; |
} |
else if(l==3) while(s) |
{ |
ret |= tmp; |
ret <<= 4; |
ret |= tmp; |
ret <<= 4; |
if(s>='A')&&(s<='F')tmp = s-'A'+10; |
else if(s>='a')&&(s<='f')tmp = s-'a'+10; |
else if(s>='0')&&(s<='9')tmp = s-'0'; |
text++; |
s = DSBYTE[text]; |
} |
}*/ |
return ret; |
} |
887,19 → 841,6 |
return buf-ret; |
} |
inline signed strcoll(dword text1,text2) |
{ |
char s,ss; |
loop() |
{ |
s = DSBYTE[text2]; |
ss=strchr(text1,s); |
if(ss)return ss; |
text2++; |
} |
return 0; |
} |
inline void debugi(dword d_int) |
{ |
char tmpch[12]; |
913,4 → 854,3 |
#define stricmp strcmpi |
#define strcmpn strncmp |
#endif |
/programs/cmm/lib/random.h |
---|
1,10 → 1,23 |
#ifndef INCLUDE_RANDOM_H |
#define INCLUDE_RANDOM_H |
/******************************************************************************* |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
MenuetOS MineSweeper |
Copyright (C) 2003 Ivan Poddubny |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation; either version 2 of the License, or |
(at your option) any later version. |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
*******************************************************************************/ |
#define MASK_RAND 123456789 |
#define IQ_RAND 12773 |
#define IA_RAND 16807 |
80,4 → 93,3 |
__generator = EAX; |
} |
#endif |
/programs/cmm/lib/dll.h |
---|
1,6 → 1,3 |
#ifndef INCLUDE_DLL_H |
#define INCLUDE_DLL_H |
char a_libdir[43] = "/sys/lib/\0"; |
:inline void error_init(dword text) |
237,7 → 234,4 |
@exit01: |
return -1; |
//error_init(dllname); |
} |
#endif |
} |
/programs/cmm/lib/obj/http.h |
---|
1,15 → 1,5 |
//HTTP library |
#ifndef INCLUDE_LIBHTTP_H |
#define INCLUDE_LIBHTTP_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword libHTTP = #alibHTTP; |
char alibHTTP[23] = "/sys/lib/http.obj\0"; |
75,6 → 65,4 |
:dword file_get_contents(dword url,...) |
{ |
http_get(url,FLAG_HTTP11,""); |
} |
#endif |
} |
/programs/cmm/lib/obj/proc_lib.h |
---|
1,13 → 1,3 |
#ifndef INCLUDE_PROCLIB_H |
#define INCLUDE_PROCLIB_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword Proc_lib = #aProc_lib; |
char aProc_lib[] = "/sys/lib/proc_lib.obj"; |
41,4 → 31,3 |
word y_start; |
}; |
#endif |
/programs/cmm/lib/obj/box_lib.h |
---|
1,15 → 1,4 |
//BOX_LIB - Asper |
#ifndef INCLUDE_BOX_LIB_H |
#define INCLUDE_BOX_LIB_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword boxlib = #aEdit_box_lib; |
char aEdit_box_lib[]="/sys/lib/box_lib.obj"; |
180,6 → 169,4 |
dword font_size_y; |
dword font_color; |
dword font_backgr_color; |
}; |
#endif |
}; |
/programs/cmm/lib/obj/truetype.h |
---|
1,14 → 1,5 |
// Truetype library |
#ifndef INCLUDE_LIBTRUETYPE_H |
#define INCLUDE_LIBTRUETYPE_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword libtruetype = #att_libtruetype; |
char att_libtruetype[22] = "/sys/lib/truetype.obj\0"; |
44,5 → 35,3 |
int index_map; // a cmap mapping for our chosen character encoding |
int indexToLocFormat; // format needed to map from glyph index to glyph |
}; |
#endif |
/programs/cmm/lib/obj/xml.h |
---|
1,13 → 1,3 |
#ifndef INCLUDE_LIBXML_H |
#define INCLUDE_LIBXML_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword XML = #aXML_lib; |
char aXML_lib[] = "/sys/lib/xml.obj"; |
133,6 → 123,4 |
dword strict; // (int) |
dword reserved1; // (int) |
AXElement reserved2; // (AXElement) |
}; |
#endif |
}; |
/programs/cmm/lib/obj/libini.h |
---|
1,14 → 1,3 |
#ifndef INCLUDE_LIBINI_H |
#define INCLUDE_LIBINI_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword libini = #alibini; |
char alibini[] = "/sys/lib/libini.obj"; |
34,5 → 23,3 |
//char aini_get_shortcut[] = "ini_get_shortcut"; |
char aini_get_color[] = "ini_get_color"; |
//char aini_set_color[] = "ini_set_color"; |
#endif |
/programs/cmm/lib/obj/iconv.h |
---|
1,15 → 1,5 |
//convert text characters |
#ifndef INCLUDE_LIBICONV_H |
#define INCLUDE_LIBICONV_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword iconv_lib = #a_iconv_lib; |
char a_iconv_lib[19]="/sys/lib/iconv.obj\0"; |
66,6 → 56,4 |
CH_CP1252, |
CH_ISO8859_5, |
CH_CP866 |
}; |
#endif |
}; |
/programs/cmm/lib/obj/libimg_lib.h |
---|
1,25 → 1,5 |
//Asper |
#ifndef INCLUDE_LIBIMG_H |
#define INCLUDE_LIBIMG_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_MEM_H |
#include "../lib/mem.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
#ifndef INCLUDE_LIBIO_H |
#include "../lib/obj/libio_lib.h" |
#endif |
:byte init_imglib_check; |
//library |
dword libimg = #alibimg; |
char alibimg[21] = "/sys/lib/libimg.obj\0"; |
120,5 → 100,3 |
$stc |
return 0; |
} |
#endif |
/programs/cmm/lib/obj/libio_lib.h |
---|
1,15 → 1,5 |
//Asper |
#ifndef INCLUDE_LIBIO_H |
#define INCLUDE_LIBIO_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
//library |
dword libio = #alibio; |
char alibio[21] = "/sys/lib/libio.obj\0"; //"libio.obj\0"; |
42,5 → 32,3 |
#define SEEK_SET 0 |
#define SEEK_CUR 1 |
#define SEEK_END 2 |
#endif |
/programs/cmm/lib/obj/netcode.h |
---|
1,14 → 1,5 |
//Network library |
#ifndef INCLUDE_NETCODE_H |
#define INCLUDE_NETCODE_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword netcode_lib = #a_netcode_lib; |
char a_netcode_lib[21]="/sys/lib/netcode.obj\0"; |
25,6 → 16,4 |
Кодирование массива inp длиной len в массив outp (строку с '\0'). Функция возвращает длину outp. |
int base64_decode(char inp[], char outp[], int len); |
Декодирование массива inp длиной len в массив outp (строку с '\0'). Функция возвращает длину outp.*/ |
#endif |
Декодирование массива inp длиной len в массив outp (строку с '\0'). Функция возвращает длину outp.*/ |
/programs/cmm/lib/obj/network.h |
---|
1,14 → 1,5 |
//Network library |
#ifndef INCLUDE_NETWORK_H |
#define INCLUDE_NETWORK_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_DLL_H |
#include "../lib/dll.h" |
#endif |
dword network_lib = #a_network_lib; |
char a_network_lib[21]="/sys/lib/network.obj\0"; |
70,5 → 61,3 |
struct addrinfo *ai_next; |
}; |
*/ |
#endif |
/programs/cmm/lib/patterns/restart_process.h |
---|
1,10 → 1,3 |
#ifndef INCLUDE_RESTART_PROCESS_H |
#define INCLUDE_RESTART_PROCESS_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
enum { |
MULTIPLE, |
SINGLE |
23,6 → 16,4 |
} |
} |
RunProgram(proc_name, ""); |
} |
#endif |
} |
/programs/cmm/lib/patterns/libimg_load_skin.h |
---|
1,10 → 1,3 |
#ifndef INCLUDE_LIBIMG_LOAD_SKIN_H |
#define INCLUDE_LIBIMG_LOAD_SKIN_H |
#ifndef INCLUDE_LIBIMG_H |
#include "../lib/obj/libimg_lib.h" |
#endif |
struct libimg_image { |
dword image, w, h; |
}; |
25,6 → 18,4 |
image_data = ESDWORD[struct_pointer + 24]; |
max_i = w * h * 4 + image_data; |
for (i = image_data; i < max_i; i += 4) if (DSDWORD[i]==0) DSDWORD[i] = new_transparent_color; |
} |
#endif |
} |
/programs/cmm/lib/gui.h |
---|
1,14 → 1,5 |
#ifndef INCLUDE_GUI_H |
#define INCLUDE_GUI_H |
//#include "strings.h" |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#ifndef INCLUDE_STRING_H |
#include "../lib/strings.h" |
#endif |
:void DrawRectangle(dword x,y,w,h,color1) |
{ |
if (w<=0) || (h<=0) return; |
177,6 → 168,4 |
col = strength * DSBYTE[color_image] / 10; |
DSBYTE[color_image] = col; |
} |
} |
#endif |
} |
/programs/cmm/lib/draw_buf.h |
---|
1,10 → 1,4 |
#ifndef INCLUDE_DRAW_BUF_H |
#define INCLUDE_DRAW_BUF_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
dword buf_data; |
dword zbuf_data; |
155,5 → 149,3 |
PutPaletteImage(zbuf_data+8, zbufw, zbufh, zbufx, zbufy, 32, 0); |
} |
} |
#endif |
/programs/cmm/lib/copyf.h |
---|
1,11 → 1,5 |
//copyf - copy file or folder with content |
#ifndef INCLUDE_COPYF_H |
#define INCLUDE_COPYF_H |
#ifndef INCLUDE_FILESYSTEM_H |
#include "../lib/file_system.h" |
#endif |
:int copyf(dword from1, in1) |
{ |
dword error; |
81,12 → 75,16 |
for (i=0; i<fcount; i++) |
{ |
filename = i*304+dirbuf+72; |
sprintf(#copy_from2,"%s/%s",from2,filename); |
sprintf(#copy_in2,"%s/%s",in2,filename); |
strcpy(#copy_from2, from2); |
chrcat(#copy_from2, '/'); |
strcat(#copy_from2, filename); |
strcpy(#copy_in2, in2); |
chrcat(#copy_in2, '/'); |
strcat(#copy_in2, filename); |
if ( TestBit(ESDWORD[filename-40], 4) ) //isdir? |
{ |
if ( (!strncmp(filename, ".",1)) || (!strncmp(filename, "..",2)) ) continue; |
if ( (!strcmp(filename, ".")) || (!strcmp(filename, "..")) ) continue; |
CopyFolder(#copy_from2, #copy_in2); |
} |
else |
147,8 → 145,15 |
{ |
char error[256]; |
N = fabs(N); |
if (N<=33) strcpy(#error, ERROR_TEXT[N]); |
else sprintf(#error,"%d%s",N," - Unknown error number O_o"); |
if (N<=33) |
{ |
strcpy(#error, ERROR_TEXT[N]); |
} |
else |
{ |
strcpy(#error, itoa(N)); |
strcat(#error, " - Unknown error number O_o"); |
} |
return #error; |
} |
156,6 → 161,4 |
{ |
if (path) debugln(path); |
debugln(get_error(error_number)); |
} |
#endif |
} |
/programs/cmm/lib/socket.h |
---|
1,10 → 1,3 |
#ifndef INCLUDE_SOCKET_H |
#define INCLUDE_SOCKET_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
#define SOCK_STREAM 1 |
#define SOCK_DGRAM 2 |
15,8 → 8,7 |
dword errorcode; |
struct sockaddr_in |
{ |
struct sockaddr_in{ |
word sin_family; |
word sin_port; |
dword sin_addr; |
102,5 → 94,3 |
errorcode = EBX; |
$pop ebx |
} |
#endif |
/programs/cmm/lib/encoding.h |
---|
1,32 → 1,26 |
#ifndef INCLUDE_ENCODING_H |
#define INCLUDE_ENCODING_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
inline fastcall void wintodos( ESI) |
{ |
while (BL=ESBYTE[ESI]) |
{ |
if (BL>=192) |
IF (BL>=192) |
{ |
if (BL>=240) ESBYTE[ESI] = BL - 16; |
else ESBYTE[ESI] = BL - 64; |
IF (BL>=240) ESBYTE[ESI] = BL - 16; |
ELSE ESBYTE[ESI] = BL - 64; |
} |
else |
ELSE |
{ |
if (BL==178) ESBYTE[ESI] = 73; //I |
if (BL==179) ESBYTE[ESI] = 105; //i |
if (BL==175) ESBYTE[ESI] = 244; //J |
if (BL==191) ESBYTE[ESI] = 245; //j |
if (BL==170) ESBYTE[ESI] = 242; //E |
if (BL==186) ESBYTE[ESI] = 243; //e |
if (BL==168) ESBYTE[ESI] = 240; //ð |
if (BL==184) ESBYTE[ESI] = 'e'; //e |
if (BL==180) ESBYTE[ESI] = 254; //ã |
if ((BL==147) || (BL==148) || (BL==171) || (BL==187)) ESBYTE[ESI] = 34; |
if ((BL==150) || (BL==151)) ESBYTE[ESI] = 45; |
IF (BL==178) ESBYTE[ESI] = 73; //I |
IF (BL==179) ESBYTE[ESI] = 105; //i |
IF (BL==175) ESBYTE[ESI] = 244; //J |
IF (BL==191) ESBYTE[ESI] = 245; //j |
IF (BL==170) ESBYTE[ESI] = 242; //E |
IF (BL==186) ESBYTE[ESI] = 243; //e |
IF (BL==168) ESBYTE[ESI] = 240; //ð |
IF (BL==184) ESBYTE[ESI] = 'e'; //e |
IF (BL==180) ESBYTE[ESI] = 254; //ã |
IF ((BL==147) || (BL==148) || (BL==171) || (BL==187)) ESBYTE[ESI] = 34; |
IF ((BL==150) || (BL==151)) ESBYTE[ESI] = 45; |
} |
ESI++; |
} |
36,14 → 30,14 |
byte mas[66] = "î ¡æ¤¥ä£å¨©ª«¬®¯ïàáâ㦢ìë§èíéçê "; |
inline fastcall void koitodos( EDI) |
{ |
while (BL=ESBYTE[EDI]) |
WHILE (BL=ESBYTE[EDI]) |
{ |
if (BL >= 0xC0) |
IF (BL >= 0xC0) |
{ |
BL -= 0xC0; |
ESBYTE[EDI] = mas[BL]; |
} |
//if (ESBYTE[EDI]=='\244') ESBYTE[EDI]='i'; |
//IF (ESBYTE[EDI]=='\244') ESBYTE[EDI]='i'; |
EDI++; |
} |
} |
55,27 → 49,27 |
EDI=ESI; |
while (BL=ESBYTE[ESI]) |
{ |
if (BL == 0xD0) || (BL == 0xD1) EDI--; |
else if (BL == 0x81) && (ESBYTE[ESI-1]==0xD0) ESBYTE[EDI] = 0xF0; //ø |
else if (BL == 0x91) && (ESBYTE[ESI-1]==0xD1) ESBYTE[EDI] = 0xF1; //ì |
IF (BL == 0xD0) || (BL == 0xD1) EDI--; |
else IF (BL == 0x81) && (ESBYTE[ESI-1]==0xD0) ESBYTE[EDI] = 0xF0; //ø |
else IF (BL == 0x91) && (ESBYTE[ESI-1]==0xD1) ESBYTE[EDI] = 0xF1; //ì |
//0xE2 0x80 - ñãðóïïèðîâàòü |
else if (BL == 0xE2) && (ESBYTE[ESI+1]==0x80) |
switch (ESBYTE[ESI+2]) |
else IF (BL == 0xE2) && (ESBYTE[ESI+1]==0x80) |
SWITCH (ESBYTE[ESI+2]) |
{ |
case 0x93: //long defis |
case 0x94: |
CASE 0x94: |
{ |
ESBYTE[EDI] = '-'; |
ESI+=2; |
break; |
BREAK; |
} |
case 0xA2: //central point |
CASE 0xA2: //central point |
{ |
ESBYTE[EDI] = '*'; |
ESI+=2; |
break; |
BREAK; |
} |
case 0xA6: //ìíîãîòî÷èå |
CASE 0xA6: //ìíîãîòî÷èå |
{ |
ESBYTE[EDI] = ESBYTE[EDI+1] = ESBYTE[EDI+2] = '.'; |
EDI+=2; |
84,67 → 78,67 |
} |
} |
else if (BL == 0xC2) //òàáëèöó ïåðåêîäèðîâîê? |
switch(ESBYTE[ESI+1]) { |
else IF (BL == 0xC2) //òàáëèöó ïåðåêîäèðîâîê? |
SWITCH(ESBYTE[ESI+1]) { |
case 0xAB: //" |
case 0xBB: //" |
CASE 0xBB: //" |
{ |
ESBYTE[EDI] = '\"'; |
ESI++; |
break; |
BREAK; |
} |
case 0xB7: // _ |
CASE 0xB7: // _ |
{ |
ESBYTE[EDI] = '_'; |
ESI++; |
break; |
BREAK; |
} |
case 0xA0: // Alt+160 - íåðàçáèâàþùèé ïðîáåë |
CASE 0xA0: // Alt+160 - íåðàçáèâàþùèé ïðîáåë |
{ |
ESBYTE[EDI] = ' '; |
ESI++; |
break; |
BREAK; |
} |
case 0xB0: // ãðàäóñ |
CASE 0xB0: // ãðàäóñ |
{ |
ESBYTE[EDI] = '\29'; |
ESI++; |
break; |
BREAK; |
} |
case 0xA9: // (c) --- âûëåò Î_î |
CASE 0xA9: // (c) --- âûëåò Î_î |
{ |
ESBYTE[EDI] = 'c'; |
ESI++; |
break; |
BREAK; |
} |
case 0xAE: // (r) |
CASE 0xAE: // (r) |
{ |
ESBYTE[EDI] = 'r'; |
ESI++; |
break; |
BREAK; |
} |
} |
else if (BL >= 0x90) && (BL <= 0xAF) |
ELSE IF (BL >= 0x90) && (BL <= 0xAF) |
{ |
BL -= 0x10; |
ESBYTE[EDI] = BL; |
} |
else if (BL >= 0x80) && (BL <= 0x8F) |
ELSE IF (BL >= 0x80) && (BL <= 0x8F) |
{ |
BL += 0x60; |
ESBYTE[EDI] = BL; |
} |
else if (BL >= 0xB0) && (BL <= 0xBF) |
ELSE IF (BL >= 0xB0) && (BL <= 0xBF) |
{ |
BL -= 0x10; |
ESBYTE[EDI] = BL; |
} |
else ESBYTE[EDI] = BL; |
ELSE ESBYTE[EDI] = BL; |
ESI++; |
EDI++; |
} |
while (EDI<ESI) |
WHILE (EDI<ESI) |
{ |
ESBYTE[EDI] = ' '; |
EDI++; |
157,13 → 151,13 |
{ |
dword j=0, symbol=0; |
char ch=0x00; |
for (;j<2;j++) |
FOR (;j<2;j++) |
{ |
ch=ESBYTE[htmlcolor+j]; |
if (ch==0x0d) || (ch=='\9') RETURN 0; |
if ((ch>='0') && (ch<='9')) ch -= '0'; |
if ((ch>='A') && (ch<='F')) ch -= 'A'-10; |
if ((ch>='a') && (ch<='f')) ch -= 'a'-10; |
IF (ch==0x0d) || (ch=='\9') RETURN 0; |
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); |
171,4 → 165,3 |
} |
#endif |
/programs/cmm/lib/list_box.h |
---|
1,11 → 1,5 |
//list_box |
#ifndef INCLUDE_LIST_BOX_H |
#define INCLUDE_LIST_BOX_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
struct llist |
{ |
int x, y, w, h, min_h, line_h, text_y; |
156,6 → 150,4 |
current=count-1; |
first=count-visible; |
return 1; |
} |
#endif |
} |
/programs/cmm/lib/cursor.h |
---|
1,11 → 1,5 |
// cursor file should be 32x32 in default MS Windows .cur format |
#ifndef INCLUDE_CURSOR_H |
#define INCLUDE_CURSOR_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
struct CustomCursor |
{ |
dword CursorPointer; |
49,5 → 43,3 |
ECX = CursorPointer; |
$int 0x40 |
} |
#endif |
/programs/cmm/lib/clipboard.h |
---|
1,10 → 1,3 |
#ifndef INCLUDE_CLIPBOARD_H |
#define INCLUDE_CLIPBOARD_H |
#ifndef INCLUDE_KOLIBRI_H |
#include "../lib/kolibri.h" |
#endif |
struct buffer_data |
{ |
dword size; |
56,6 → 49,4 |
$mov eax, 54 |
$mov ebx, 3 |
$int 0x40 |
} |
#endif |
} |
/programs/cmm/lib/mem.h |
---|
1,5 → 1,3 |
#ifndef INCLUDE_MEM_H |
#define INCLUDE_MEM_H |
dword mem_init() |
{ |
98,4 → 96,99 |
#define mem_Free free |
#define mem_Init mem_init |
#endif |
/*:void fastcall memsetz( EDI, ECX) |
{ |
asm { |
XOR EAX, EAX |
MOV EDX, ECX |
SHR ECX, 2 |
REP STOSD |
MOV ECX, EDX |
AND ECX, 3 |
REP STOSB |
} |
} |
:void fastcall memset( EDI, ECX, AL) //copy AL to EDI of ECX num (void *dest, size_t, char c ) |
{ |
asm { |
MOV AH, AL |
MOVZX EDX, AX |
SHL EAX, 16 |
OR EAX, EDX |
MOV EDX, ECX |
SHR ECX, 2 |
REP STOSD |
MOV ECX, EDX |
AND ECX, 3 |
REP STOSB |
} |
} |
:void fastcall memsetd( EDI, ECX, EAX) |
{ |
asm { |
REP STOSD |
} |
} |
:void fastcall memcpyd( EDI, ESI, ECX) |
{ |
asm { |
REP MOVSD |
} |
} |
:void 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: |
} |
} |
:long fastcall memcmp( ESI, EDI, ECX) |
{ |
asm { |
MOV EAX, ECX |
SHR ECX, 2 |
REPE CMPSD |
MOV ECX, EAX |
AND ECX, 3 |
REPE CMPSB |
XOR EAX, EAX |
XOR ECX, ECX |
MOV AL, DSBYTE[ ESI-1] |
MOV CL, DSBYTE[ EDI-1] |
SUB EAX, ECX |
} |
}*/ |
/*#define memzset memsetz |
#define memset0 memsetz |
#define mem0set memsetz |
#define memset32 memsetd |
#define memcpy32 memcpyd*/ |