you can now visit caredbar!

This commit is contained in:
Ondřej Novák 2025-01-28 21:46:19 +01:00
parent bf59962724
commit 3b903e2b52
55 changed files with 953 additions and 1428 deletions

View file

@ -68,13 +68,13 @@ void save_stringtable(char *filename,char *backup_name)
int num,rd;
int oldnum=-1,i;
fb=fopen(backup_name,"rt");
fb=fopen_icase(backup_name,"rt");
if (fb==NULL)
{
puts("Cannot open backup file for reading.");
exit(1);
}
fo=fopen(filename,"wt");
fo=fopen_icase(filename,"wt");
if (fo==NULL)
{
puts("Cannot open target file for writting.");

View file

@ -24,7 +24,7 @@ void ReadScript(char *script)
int j=0;
char *pcx;
unsigned short *wpcx;
scr=fopen(script,"rt");
scr=fopen_icase(script,"rt");
if (scr==NULL) Error("Nemohu otevrit soubor: %s",script);
i=fscanf(scr,"%s",szBuff);
while (i!=EOF)
@ -36,7 +36,7 @@ void ReadScript(char *script)
{
sprintf(szBuff,IKNNAME,icount++);
printf("Sestavuji soubor %s\n",szBuff);
trg=fopen(szBuff,"wb");
trg=fopen_icase(szBuff,"wb");
if (trg==NULL) Error("Nelze zapisovat do souboru %s",szBuff);
}
if (!fwrite(pcx,PCXSIZE,1,trg)) Error("Chyba nastala pri zapisu do souboru %s",szBuff);

View file

@ -15,7 +15,7 @@ int load_file(char *filename)
{
int32_t size;
bmp=fopen(filename,"rb");
bmp=fopen_icase(filename,"rb");
if (!bmp) return -1;
fseek(bmp,0,SEEK_END);
size=ftell(bmp);
@ -80,7 +80,7 @@ void conv_hicolor()
int save_file_hi(char *newname)
{
bmp=fopen(newname,"wb");
bmp=fopen_icase(newname,"wb");
if (!bmp) return -1;
fwrite(&xsize,1,2,bmp);
fwrite(&ysize,1,2,bmp);
@ -172,7 +172,7 @@ void conv_256color()
int save_file_256(char *newname)
{
bmp=fopen(newname,"wb");
bmp=fopen_icase(newname,"wb");
if (!bmp) return -1;
fwrite(&xsize,1,2,bmp);
fwrite(&ysize,1,2,bmp);

View file

@ -36,7 +36,7 @@ char global_name[256];
void init(char *filename )
{
pgm=program;
source=fopen(filename,"r");
source=fopen_icase(filename,"r");
cur_spell=0;
if (source==NULL)
{
@ -116,7 +116,7 @@ int build_tables()
void save_tab(char *name)
{
target=fopen(name,"wb");
target=fopen_icase(name,"wb");
if (target==NULL)
{
printf("SAVE: Chyba pri ukladani souboru %s \n",name);

View file

@ -7,25 +7,23 @@
#include <time.h>
/* Data touched at mouse callback time -- they are in a structure to
simplify calculating the size of the region to lock.
*/
simplify calculating the size of the region to lock.
*/
extern MS_EVENT win_mouseEvent;
TMS_BASIC_INFO ms_basic_info={0};
TMS_BASIC_INFO ms_basic_info = { 0 };
static char ms_keys;
/*
void get_ms_event(MS_EVENT *event)
{
CheckMessageQueue();
*event=win_mouseEvent;
win_mouseEvent.event=0;
}
*/
char cz_table_small_normal[] =
{ 0x20, 0x31, 0x21, 0x33, 0x34, 0x35, 0x37, 0xad,
void get_ms_event(MS_EVENT *event)
{
CheckMessageQueue();
*event=win_mouseEvent;
win_mouseEvent.event=0;
}
*/
char cz_table_small_normal[] = { 0x20, 0x31, 0x21, 0x33, 0x34, 0x35, 0x37, 0xad,
0x39, 0x30, 0x38, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x82, 0x2b, 0x88, 0xa8,
0x87, 0xa9, 0x91, 0x98, 0xa0, 0xa1, 0x22, 0x96, 0x3f, 0x3d, 0x3a, 0x5f,
0x32, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
@ -34,105 +32,87 @@ char cz_table_small_normal[] =
0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x2f,
0x7c, 0x28, 0x3b, 0x20 };
char cz_table_small_carka[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34,
0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
0x8f, 0x42, 0x43, 0x44, 0x90, 0x46, 0x47, 0x48, 0x8b, 0x4a, 0x4b, 0x8a,
0x4d, 0x4e, 0x95, 0x50, 0x51, 0xab, 0x53, 0x54, 0x97, 0x56, 0x57, 0x58,
0x9d, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0xa0, 0x62, 0x63, 0x64,
0x82, 0x66, 0x67, 0x68, 0xa1, 0x6a, 0x6b, 0x8d, 0x6d, 0x6e, 0xa2, 0x70,
0x71, 0xaa, 0x73, 0x74, 0xa3, 0x76, 0x77, 0x78, 0x98, 0x7a, 0x7b, 0x7c,
0x7d, 0x7e, 0x20 };
char cz_table_small_hacek[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34,
0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
0x41, 0x42, 0x80, 0x85, 0x89, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x9c,
0x4d, 0xa5, 0xa7, 0x50, 0x51, 0x9e, 0x9b, 0x86, 0xa6, 0x56, 0x57, 0x58,
0x59, 0x92, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x87, 0x83,
0x88, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x8c, 0x6d, 0xa4, 0x93, 0x70,
0x71, 0xa9, 0xa8, 0x9f, 0x96, 0x76, 0x77, 0x78, 0x79, 0x91, 0x7b, 0x7c,
0x7d, 0x7e, 0x20 };
char cz_table_caps_normal[] =
{ 0x20, 0x31, 0x21, 0x33, 0x34, 0x35, 0x37, 0xad,
0x39, 0x30, 0x38, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
0x90, 0x2b, 0x89, 0x9b, 0x80, 0x9e, 0x92, 0x9d, 0x8f, 0x8b,
0x22, 0x96, 0x3f, 0x3d, 0x3a, 0x5f,
char cz_table_small_carka[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33,
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 0x8f, 0x42, 0x43, 0x44, 0x90, 0x46, 0x47, 0x48, 0x8b, 0x4a, 0x4b,
0x8a, 0x4d, 0x4e, 0x95, 0x50, 0x51, 0xab, 0x53, 0x54, 0x97, 0x56, 0x57,
0x58, 0x9d, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0xa0, 0x62, 0x63,
0x64, 0x82, 0x66, 0x67, 0x68, 0xa1, 0x6a, 0x6b, 0x8d, 0x6d, 0x6e, 0xa2,
0x70, 0x71, 0xaa, 0x73, 0x74, 0xa3, 0x76, 0x77, 0x78, 0x98, 0x7a, 0x7b,
0x7c, 0x7d, 0x7e, 0x20 };
char cz_table_small_hacek[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33,
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 0x41, 0x42, 0x80, 0x85, 0x89, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
0x9c, 0x4d, 0xa5, 0xa7, 0x50, 0x51, 0x9e, 0x9b, 0x86, 0xa6, 0x56, 0x57,
0x58, 0x59, 0x92, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x87,
0x83, 0x88, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x8c, 0x6d, 0xa4, 0x93,
0x70, 0x71, 0xa9, 0xa8, 0x9f, 0x96, 0x76, 0x77, 0x78, 0x79, 0x91, 0x7b,
0x7c, 0x7d, 0x7e, 0x20 };
char cz_table_caps_normal[] = { 0x20, 0x31, 0x21, 0x33, 0x34, 0x35, 0x37, 0xad,
0x39, 0x30, 0x38, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x90, 0x2b, 0x89, 0x9b,
0x80, 0x9e, 0x92, 0x9d, 0x8f, 0x8b, 0x22, 0x96, 0x3f, 0x3d, 0x3a, 0x5f,
0x32, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
0x78, 0x79, 0x7a, 0xa3, 0x5c, 0x29, 0x36, 0x3d, 0x3b, 0x41, 0x42, 0x43,
0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x2f,
0x7c, 0x28, 0x3b, 0x20 };
char cz_table_caps_carka[] =
{ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
char cz_table_caps_carka[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33,
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40,
0x40, 0xa0, 0x62, 0x63, 0x64, 0x82, 0x66, 0x67, 0x68, 0xa1, 0x6a, 0x6b,
0x8d, 0x6d, 0x6e, 0xa2, 0x70, 0x71, 0xaa, 0x73, 0x74, 0xa3, 0x76, 0x77,
0x78, 0x98, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x8f, 0x42, 0x43,
0x44, 0x90, 0x46, 0x47, 0x48, 0x8b, 0x4a, 0x4b, 0x8a, 0x4d, 0x4e, 0x95,
0x50, 0x51, 0xab, 0x53, 0x54, 0x97, 0x56, 0x57, 0x58, 0x9d, 0x5a, 0x7b,
0x7c, 0x7d, 0x7e, 0x20 };
char cz_table_caps_hacek[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33,
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 0x61, 0x62, 0x87, 0x83, 0x88, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
0x8c, 0x6d, 0xa4, 0x93, 0x70, 0x71, 0xa9, 0xa8, 0x9f, 0x96, 0x76, 0x77,
0x78, 0x79, 0x91, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x41, 0x42, 0x80,
0x85, 0x89, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x9c, 0x4d, 0xa5, 0xa7,
0x50, 0x51, 0x9e, 0x9b, 0x86, 0xa6, 0x56, 0x57, 0x58, 0x59, 0x92, 0x7b,
0x7c, 0x7d, 0x7e, 0x20 };
char *cz_key_tabs[] = { cz_table_small_normal, cz_table_small_carka,
cz_table_small_hacek, cz_table_caps_normal, cz_table_caps_carka,
cz_table_caps_hacek };
0xa0, 0x62, 0x63, 0x64, 0x82, 0x66, 0x67, 0x68, 0xa1, 0x6a,
0x6b, 0x8d, 0x6d, 0x6e, 0xa2, 0x70, 0x71, 0xaa, 0x73, 0x74,
0xa3, 0x76, 0x77, 0x78, 0x98, 0x7a,
void keyboard(EVENT_MSG *msg, void *user_data) {
int i;
static uint8_t cz_mode = 0;
char c, d;
0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60,
msg;
user_data;
if (msg->msg == E_WATCH) {
*otevri_zavoru = 1;
if (!_bios_keybrd(_KEYBRD_READY))
return;
i = _bios_keybrd(_KEYBRD_READ);
d = i >> 8;
c = i & 0xff;
if (c == '+' && d < 55 && !cz_mode)
cz_mode = 2;
else if (c == '=' && d < 55 && !cz_mode)
cz_mode = 1;
else if (c > 32 && c < 127 && d <= 53) {
if (get_capslock_state())
cz_mode += 3;
c = cz_key_tabs[cz_mode][c - 32];
i = d;
i = (i << 8) + c;
send_message(E_KEYBOARD, i);
cz_mode = 0;
} else
send_message(E_KEYBOARD, i);
0x8f, 0x42, 0x43, 0x44, 0x90, 0x46, 0x47, 0x48, 0x8b, 0x4a,
0x4b, 0x8a, 0x4d, 0x4e, 0x95, 0x50, 0x51, 0xab, 0x53, 0x54,
0x97, 0x56, 0x57, 0x58, 0x9d, 0x5a,
}
}
0x7b, 0x7c, 0x7d, 0x7e, 0x20 };
char cz_table_caps_hacek[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34,
0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
0x61, 0x62, 0x87, 0x83, 0x88, 0x66, 0x67, 0x68, 0x69, 0x6a,
0x6b, 0x8c, 0x6d, 0xa4, 0x93, 0x70, 0x71, 0xa9, 0xa8, 0x9f,
0x96, 0x76, 0x77, 0x78, 0x79, 0x91,
0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60,
0x41, 0x42, 0x80, 0x85, 0x89, 0x46, 0x47, 0x48, 0x49, 0x4a,
0x4b, 0x9c, 0x4d, 0xa5, 0xa7, 0x50, 0x51, 0x9e, 0x9b, 0x86,
0xa6, 0x56, 0x57, 0x58, 0x59, 0x92,
0x7b, 0x7c, 0x7d, 0x7e, 0x20 };
char *cz_key_tabs[]={cz_table_small_normal,cz_table_small_carka,cz_table_small_hacek,
cz_table_caps_normal, cz_table_caps_carka, cz_table_caps_hacek};
void keyboard(EVENT_MSG *msg,void *user_data)
{
int i;
static uint8_t cz_mode=0;
char c,d;
msg;user_data;
if (msg->msg==E_WATCH)
{
*otevri_zavoru=1;
if (!_bios_keybrd(_KEYBRD_READY)) return;
i=_bios_keybrd(_KEYBRD_READ);
d=i>>8;
c=i & 0xff;
if (c=='+' && d<55 && !cz_mode) cz_mode=2;
else if (c=='=' && d<55 && !cz_mode) cz_mode=1;
else if (c>32 && c<127 && d<=53)
{
if (get_capslock_state()) cz_mode +=3;
c=cz_key_tabs[cz_mode][c-32];
i=d;
i=(i<<8)+c;
send_message(E_KEYBOARD,i);
cz_mode=0;
}
else
send_message(E_KEYBOARD,i);
}
}
char ms_get_keycount()
{
return ms_keys;
}
char ms_get_keycount() {
return ms_keys;
}

View file

@ -19,5 +19,5 @@ main()
err_stack=malloc(16384);
install_dos_error(err_proc,(char *)err_stack+16384);
f=fopen("a:\test","r");
f=fopen_icase("a:\test","r");
}

View file

@ -77,7 +77,7 @@ T_EVENT_ROOT *add_event_message(T_EVENT_ROOT **tree,int msg)
r1->next=r;
}
r->event_msg=msg;
//r->used=0;
r->used=0;
r->list=NULL;
return r;
}

View file

@ -23,7 +23,7 @@ main(int argc,char **argv)
puts("File not found");
return 1;
}
f=fopen(argv[3],"w");
f=fopen_icase(argv[3],"w");
fwrite(z,1,s,f);
fclose(f);
puts("File successfuly expanded");

View file

@ -23,7 +23,7 @@ main(int argc,char **argv)
close_manager();
return 1;
}
f=fopen(argv[3],"wb");
f=fopen_icase(argv[3],"wb");
fwrite(z,1,s,f);
fclose(f);
puts("File successfuly expanded");

View file

@ -657,7 +657,7 @@ void do_it_events(EVENT_MSG *msg,void **user_data)
o_aktual->call_event(&msg2, o_aktual);
o_aktual->on_enter();
if (p != NULL)
o_aktual->call_event(msg, o_aktual);
o_aktual->call_event(&fwmsg, o_aktual);
}
}
destroy_message(&fwmsg);

View file

@ -13,7 +13,7 @@ TSTR_LIST read_config(const char *filename)
TSTR_LIST ls;
char buff[256];
f=fopen(filename,"r");
f=fopen_icase(filename,"r");
if (f==NULL) return NULL;
ls=create_list(256);
while (!feof(f))
@ -112,7 +112,7 @@ int save_config(TSTR_LIST ls,const char *filename)
{
int i,cnt,err=0;
FILE *f;
f=fopen(filename,"w");
f=fopen_icase(filename,"w");
if (f==NULL) return -1;
cnt=str_count(ls);
for(i=0;i<cnt && !err;i++) if (ls[i]!=NULL)

View file

@ -24,7 +24,7 @@ void error_extend(char *file,int seek)
FILE *f;
int c,i=0,ls=0,ls0=0,ls1=0,ls2=0;
f=fopen(file,"r");
f=fopen_icase(file,"r");
if (f==NULL) return;
c=getc(f);
while (c!=EOF && ls2<seek)
@ -153,7 +153,7 @@ void xlat_text(FILE *source,FILE *target)
if (count && lastcom)
{
char c[255];
sprintf(c,"Nespr vn˜ po‡et parametr u p©¡kazu '%s'",cm);
sprintf(c,"Nespr<EFBFBD>vn<EFBFBD> po<70>et parametr<74> u p<><70>kazu '%s'",cm);
error(c,ftell(source));
}
else
@ -249,7 +249,7 @@ void open_include(char *name)
FILE *inc;
char *p;
inc=fopen(name,"r");
inc=fopen_icase(name,"r");
if (inc==NULL)
{
char s[256];
@ -273,7 +273,7 @@ main(int argc,char *argv[])
puts("Program vyzaduje dva parametry: LEX_LIB source_file target_file");
exit(0);
}
target_file=fopen(argv[2],"w");
target_file=fopen_icase(argv[2],"w");
open_include(argv[1]);
fclose(target_file);
}

View file

@ -101,7 +101,7 @@ void *load_file(char *filename)
if (mman_action!=NULL) mman_action(MMA_READ);
SEND_LOG("(LOAD) Loading file '%s'",filename);
f=fopen(filename, "rb");
f=fopen_icase(filename, "rb");
if (f==NULL) {
load_error(filename);
return NULL;
@ -157,7 +157,7 @@ static int test_file_exist_DOS(int group,char *filename)
f=alloca(strlen(mman_pathlist[group])+strlen(filename)+1);
strcpy(f,mman_pathlist[group]);
strcat(f,filename);
if (access(f,0)) return 0;
if (!check_file_exists(f)) return 0;
return 1;
}
@ -381,7 +381,7 @@ void init_manager(char *filename,char *swap_is_not_supported) // filename= Jmeno
memset(_handles,0,sizeof(_handles));
if (filename!=NULL)
{
bmf=fopen(filename,"rb");
bmf=fopen_icase(filename,"rb");
if (bmf)
{
main_file_name=(char *)getmem(strlen(filename)+1);
@ -412,7 +412,7 @@ void *load_swaped_block(THANDLE_DATA *h)
}
int find_same(char *name,void *decomp)
int find_same(const char *name,void *decomp)
{
THANDLE_DATA *p;
int i,j;
@ -429,7 +429,7 @@ int find_same(char *name,void *decomp)
return -1;
}
int find_handle(char *name,void *decomp)
int find_handle(const char *name,void *decomp)
{
return find_same(name,decomp);
}
@ -440,7 +440,7 @@ int test_file_exist(int group,char *filename)
return 1;
}
THANDLE_DATA *def_handle(int handle,char *filename,void *decompress,char path)
THANDLE_DATA *def_handle(int handle,const char *filename,void *decompress,char path)
{
THANDLE_DATA *h;
int i;
@ -842,7 +842,7 @@ char add_patch_file(char *filename)
SEND_LOG("Adding patch: %s",filename);
if (!patch) return 2;
if (!bmf) return 3;
patch=fopen(filename,"rb");
patch=fopen_icase(filename,"rb");
if (!patch) return 1;
fseek(patch,4,SEEK_SET);
fread(&l,1,4,patch);

View file

@ -75,7 +75,7 @@ void *getmem(int32_t size); //alokace pameti pres memman. alokovat pomoci
void *grealloc(void *m,int32_t size); //realokace pameti pres memman
void *load_file(char *filename); //obycejne natahne soubor do pameti a vrati ukazatel.
void init_manager(char *filename,char *swp); //inicializuje manager. Jmeno filename i swapname nejsou povinne (musi byt NULL kdyz nejsou pouzity)
THANDLE_DATA *def_handle(int handle,char *filename,void *decompress,char path); //deklaruje rukojet. promenna decompress je ukazatel na funkci ktera upravi data pred vracenim ukazatele
THANDLE_DATA *def_handle(int handle,const char *filename,void *decompress,char path); //deklaruje rukojet. promenna decompress je ukazatel na funkci ktera upravi data pred vracenim ukazatele
void *ablock(int handle); //vraci ukazatel bloku spojeneho s handlem
void alock(int handle); //zamyka blok
void aunlock(int handle); //odmyka blok
@ -87,7 +87,7 @@ void close_manager(void); //uzavre manager a uvolni veskerou pam
void undef_handle(int handle); //uvolni hadle k dalsimu pouziti
THANDLE_DATA *zneplatnit_block(int handle); //zneplatni data bloku
THANDLE_DATA *get_handle(int handle); //vraci informace o rukojeti
int find_handle(char *name,void *decomp); //hleda mezi rukojeti stejnou definici
int find_handle(const char *name,void *decomp); //hleda mezi rukojeti stejnou definici
int test_file_exist(int group,char *filename); //testuje zda soubor existuje v ramci mmanageru
void *afile(char *filename,int group,int32_t *blocksize); //nahraje do pameti soubor registrovany v ramci mmanageru
int32_t get_handle_size(int handle);
@ -118,7 +118,7 @@ void display_status(void); //zobrazi na display status memmanageru
char *get_time_str(void);
int q_current_task(void);
void send_log_impl(int task, const char *format, ...) __attribute__((format(printf, 2, 3)));
#define OPEN_LOG(log) memcpy(stderr,fopen(log,"w"),sizeof(FILE));
#define OPEN_LOG(log) memcpy(stderr,fopen_icase(log,"w"),sizeof(FILE));
#define SEND_LOG(...) send_log_impl(q_current_task(), __VA_ARGS__)
#define CLOSE_LOG(void) fclose(logfile);
#else

View file

@ -5,6 +5,8 @@
/*#include "..\types.h"*/
#include "pcx.h"
#include "memman.h"
#include <stdarg.h>
/*#include "..\bgraph.h"*/
#define SHADE_STEPS 5
@ -95,7 +97,8 @@ int load_pcx(char *pcx,int32_t fsize,int conv_type,char **buffer, ... )
{
unsigned short paleta2[256];
char *paleta1;
char *ptr1;unsigned short *ptr2;
char *ptr1;
unsigned short *ptr2;
char *ptr3;
int i;
PCXHEADER pcxdata;
@ -145,10 +148,14 @@ int load_pcx(char *pcx,int32_t fsize,int conv_type,char **buffer, ... )
}
if (conv_type==A_FADE_PAL)
{
int *i,tr,tg,tb;
int tr,tg,tb;
i=(int *)&buffer;i++;
tr=*i++;tg=*i++;tb=*i++;
va_list lst;
va_start(lst, buffer);
tr=va_arg(lst,int);
tg=va_arg(lst,int);
tb=va_arg(lst,int);
va_end(lst);
palette_shadow(paleta1,(unsigned short (*)[256])ptr1,tr,tg,tb);
ptr1+=SHADE_PAL;
}
@ -178,7 +185,7 @@ int open_pcx(char *filename,int type,char **buffer,...)
char *src;
int32_t fsize;
pcx=fopen(filename,"rb");
pcx=fopen_icase(filename,"rb");
if (pcx==NULL) return -1;
fseek(pcx,0,SEEK_END);
fsize=ftell(pcx);

View file

@ -166,7 +166,7 @@ void save_font(char *filename,word bufsiz)
{
FILE *f;
f=fopen(filename,"wb");
f=fopen_icase(filename,"wb");
fwrite(char_table,sizeof(char_table),1,f);
fwrite(font_buffer,bufsiz,1,f);
fclose(f);

View file

@ -208,7 +208,7 @@ int load_string_list(TSTR_LIST *list,const char *filename)
int i,j,lin=0;
FILE *f;
f=fopen(filename,"r");
f=fopen_icase(filename,"r");
if (*list==NULL) *list=create_list(256);
if (f==NULL) return -1;
do

View file

@ -416,7 +416,7 @@ int open_backsound(char *filename)
lastname[127]=0;
strncpy(lastname,filename,127);
}
bsnd=fopen(lastname,"rb");
bsnd=fopen_icase(lastname,"rb");
if (bsnd==NULL)
{
clear_buffer=32;