forked from bakagirl/Arachne-WWW-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ERRORS.C
99 lines (84 loc) · 1.59 KB
/
ERRORS.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// ========================================================================
// All errors are here:
// (c)1997-2000 Michael Polak, Arachne Labs
// ========================================================================
#include "arachne.h"
#include "html.h"
void memory_destroy(void)
{
#ifndef CLEMTEST
#ifdef VIRT_SCR
deallocvirtual();
#endif
x_fnt_cls();
#endif
mouseoff();
ie_destroy();
}
//chybove hlaseni na zacatku
// tr.: error message at the beginning
void memerr0(void)
{
x_grf_mod(3);
#ifdef POSIX
printf(MSG_MEMERR);
#else
printf(MSG_MEM);
printf(MSG_BYTES,MIN_MEMORY-farcoreleft());
#endif
memory_destroy();
exit(EXIT_TO_DOS);
}
void memerr(void)
{
char command[80];
command[0]='\0';
savepick();
ie_savef(&history);
ie_savebin(&HTTPcache);
memory_destroy();
#ifdef POSIX
printf(MSG_MEMERR);
exit(-1);
#else
closebat(command,RESTART_NONFATAL_ERROR);
exit(willexecute(command));
#endif
}
void cfgerr (struct ib_editor *f)
{
x_grf_mod(3);
printf(MSG_CFGERR,f->filename,f->maxlines);
memory_destroy();
exit(EXIT_TO_DOS);
}
//!!JdS 2004/3/6 {
void badcookiesfile ()
{
#ifndef LINUX
x_grf_mod(3);
printf("Error: The 'cookies.lst' file is either broken or incompatible.");
memory_destroy();
exit(EXIT_TO_DOS);
#else
return;
#endif
}
//!!JdS 2004/3/6 }
void mallocerr(char *msg, char *file , int line)
{
x_grf_mod(3);
// debug version
printf(MSG_ALLOC,msg, line, file);
// non-debug version
// printf(MSG_ALLOC,msg);
memory_destroy();
puts("ok");
exit(EXIT_ABNORMAL); //goto FATAL.HTM
}
void DNSerr(char *host)
{
char str[128];
sprintf(str,MSG_DNSERR,host);
outs(str);
}