Qsmtp  0.30dev
control.h
Go to the documentation of this file.
1 
4 #ifndef CONTROL_H
5 #define CONTROL_H
6 
7 #include <sys/types.h>
8 
9 typedef int (*checkfunc)(const char *);
10 
11 extern int controldir_fd;
12 
13 extern size_t lloadfilefd(int, char **, const int striptab) __attribute__ ((nonnull (2)));
14 extern int loadintfd(int, unsigned long *, const unsigned long def) __attribute__ ((nonnull (2)));
15 extern size_t loadoneliner(int base, const char *filename, char **buf, const int optional) __attribute__ ((nonnull (2, 3)));
16 extern size_t loadonelinerfd(int fd, char **buf) __attribute__ ((nonnull (2)));
17 extern int loadlistfd(int, char ***, checkfunc) __attribute__ ((nonnull (2)));
18 extern int finddomainfd(int, const char *, const int) __attribute__ ((nonnull (2)));
19 extern int finddomain(const char *buf, const off_t size, const char *domain) __attribute__ ((nonnull (3)));
20 
21 extern char **data_array(unsigned int entries, size_t datalen, void *oldbuf, size_t oldlen);
22 
23 #endif
int loadintfd(int, unsigned long *, const unsigned long def)
Definition: control.c:216
int loadlistfd(int, char ***, checkfunc)
Definition: control.c:365
size_t loadoneliner(int base, const char *filename, char **buf, const int optional)
read a configuration file that only may contain one line
Definition: control.c:251
int finddomainfd(int, const char *, const int)
Definition: control.c:437
size_t loadonelinerfd(int fd, char **buf)
Definition: control.c:291
int finddomain(const char *buf, const off_t size, const char *domain)
search a domain entry in a given buffer
Definition: control.c:492
int controldir_fd
Definition: control.c:24
char ** data_array(unsigned int entries, size_t datalen, void *oldbuf, size_t oldlen)
create a combined data and pointer array
Definition: control.c:329
size_t lloadfilefd(int, char **, const int striptab)
Definition: control.c:106