8 |
#endif |
#endif |
9 |
|
|
10 |
/* Error codes returned by functions. */ |
/* Error codes returned by functions. */ |
11 |
#define ERROR_TRIVIAL 1 |
#define ERROR_SIGNAL 1 |
12 |
#define ERROR_FILE_OPEN 2 |
#define ERROR_TRIVIAL 2 |
13 |
#define ERROR_CONFIG_PARSE 3 |
#define ERROR_FILE_OPEN 3 |
14 |
#define ERROR_MEMORY_ALLOCATION 4 |
#define ERROR_CONFIG_PARSE 4 |
15 |
#define ERROR_NETWORK 5 |
#define ERROR_MEMORY_ALLOCATION 5 |
16 |
#define ERROR_SSL 6 |
#define ERROR_NETWORK 6 |
17 |
#define ERROR_UNDEFINED 7 |
#define ERROR_SSL 7 |
18 |
|
#define ERROR_UNDEFINED 8 |
19 |
|
|
20 |
/* Flags that control the program's options. */ |
/* Flags that control the program's options. */ |
21 |
#define OPTION_DETAILS_QUIET 0x01 |
#define OPTION_DETAILS_QUIET 0x01 |
105 |
void verbose(const char *info,...); |
void verbose(const char *info,...); |
106 |
void error(const char *errmsg,...); |
void error(const char *errmsg,...); |
107 |
void fatal(unsigned int errnum, const char *fatal,...); |
void fatal(unsigned int errnum, const char *fatal,...); |
108 |
|
void catch_signals(void); |
109 |
|
void signal_handler(int sig); |
110 |
int open_logfile(void); |
int open_logfile(void); |
111 |
int create_logfile(void); |
int create_logfile(void); |
112 |
int close_logfile(void); |
int close_logfile(void); |