aboutsummaryrefslogtreecommitdiff
path: root/src/defs.h
blob: d41c9a85a6cc76f47dc20866bc57ee0c7098a4a2 (plain)
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
#include <stdarg.h>

#ifndef DEFAULT_ADDRESS
# define DEFAULT_ADDRESS "127.0.0.1"
#endif
#ifndef DEFAULT_SERVICE
# define DEFAULT_SERVICE "8080"
#endif
#ifndef DEFAULT_CONFIG_FILE
# define DEFAULT_CONFIG_FILE "/etc/ping903.conf"
#endif
#define COPYLEFT "\
Copyright (C) 2020 Sergey Poznyakoff\n\
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
This is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law.\n\
\n"

void emalloc_die(void);
void *emalloc(size_t s);
char *estrdup(char const *s);
void *e2nrealloc(void *p, size_t *pn, size_t s);

extern char *progname;

void vlogger(int prio, char const *fmt, va_list ap);
void fatal(char const *fmt, ...);
void error(char const *fmt, ...);
void info(char const *fmt, ...);
void syslog_enable(void);
void set_progname(char const *arg);
int set_log_facility(char const *arg);

Return to:

Send suggestions and report system problems to the System administrator.