29
28
const char *my_progname=0;
30
29
char curr_dir[FN_REFLEN]= {0},
31
30
home_dir_buff[FN_REFLEN]= {0};
32
uint32_t my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
33
uint32_t my_file_total_opened= 0;
31
ulong my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
32
ulong my_file_total_opened= 0;
34
33
int my_umask=0664, my_umask_dir=0777;
35
34
struct st_my_file_info my_file_info_default[MY_NFILE]= {{0,UNOPEN}};
36
uint32_t my_file_limit= MY_NFILE;
35
uint my_file_limit= MY_NFILE;
37
36
struct st_my_file_info *my_file_info= my_file_info_default;
39
38
/* From mf_brkhant */
55
54
uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */
57
56
/* from safe_malloc */
58
uint32_t sf_malloc_prehunc=0, /* If you have problem with core- */
57
uint sf_malloc_prehunc=0, /* If you have problem with core- */
59
58
sf_malloc_endhunc=0, /* dump when malloc-message.... */
60
59
/* set theese to 64 or 128 */
61
60
sf_malloc_quick=0; /* set if no calls to sanity */
62
uint32_t sf_malloc_cur_memory= 0L; /* Current memory usage */
63
uint32_t sf_malloc_max_memory= 0L; /* Maximum memory usage */
64
uint32_t sf_malloc_count= 0; /* Number of times NEW() was called */
65
unsigned char *sf_min_adress= (unsigned char*) ~(unsigned long) 0L,
66
*sf_max_adress= (unsigned char*) 0L;
61
ulong sf_malloc_cur_memory= 0L; /* Current memory usage */
62
ulong sf_malloc_max_memory= 0L; /* Maximum memory usage */
63
uint sf_malloc_count= 0; /* Number of times NEW() was called */
64
uchar *sf_min_adress= (uchar*) ~(unsigned long) 0L,
65
*sf_max_adress= (uchar*) 0L;
67
66
/* Root of the linked list of struct st_irem */
68
67
struct st_irem *sf_malloc_root = NULL;
70
69
/* from my_alarm */
71
70
int volatile my_have_got_alarm=0; /* declare variable to reset */
72
uint32_t my_time_to_wait_for_lock=2; /* In seconds */
71
ulong my_time_to_wait_for_lock=2; /* In seconds */
74
73
/* from errors.c */
75
char * globerrs[GLOBERRS]; /* my_error_messages is here */
75
77
void (*my_abort_hook)(int) = (void(*)(int)) exit;
76
void (*error_handler_hook)(uint32_t error,const char *str,myf MyFlags)=
78
void (*error_handler_hook)(uint error,const char *str,myf MyFlags)=
77
79
my_message_no_curses;
78
void (*fatal_error_handler_hook)(uint32_t error,const char *str,myf MyFlags)=
80
void (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)=
79
81
my_message_no_curses;
81
83
/* How to disable options */