fixes init script for non ipv6 enabled systems #472755
[packages/xinetd.git] / xinetd / util.h
1 #ifndef UTIL_H
2 #define UTIL_H
3
4 #include "pset.h"
5 #include "defs.h"
6
7 void out_of_memory(const char *func);
8 const struct name_value *nv_find_value(const struct name_value nv_array[],const char *name);
9 const struct name_value *nv_find_name(const struct name_value nv_array[],int value);
10 const char *nv_get_name(const struct name_value nv_array[],int value);
11 char **argv_alloc(unsigned count);
12 status_e copy_pset(const pset_h from,pset_h *to,unsigned size);
13 void no_control_tty(void);
14 status_e write_buf(int fd,const char *buf,int len);
15 void tabprint(int fd, int tab_level, const char *fmt, ...)
16 #ifdef __GNUC__
17         __attribute__ ((format (printf, 3, 4)));
18 #else
19  ;
20 #endif
21 void drain(int sd);
22 int parse_int(const char *, int , int , int *);
23 int parse_uint(const char *, int , int , unsigned int *);
24 int parse_ull(const char *, int , int , unsigned long long *);
25 int parse_base10(const char *, int *);
26 int parse_ubase10(const char *, unsigned int *);
27 bool_int parse_all_digits(const char *ptr);
28
29 #endif