File: conv.h

package info (click to toggle)
darkstat 3.0.708-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 708 kB
  • ctags: 592
  • sloc: ansic: 5,326; sh: 322; makefile: 131
file content (33 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (2)
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
33
/* darkstat 3
 * copyright (c) 2001-2007 Emil Mikulic.
 *
 * conv.h: convenience functions.
 */

#include <sys/types.h>

void *xmalloc(const size_t size);
void *xcalloc(const size_t num, const size_t size);
void *xrealloc(void *original, const size_t size);
char *xstrdup(const char *s);
char *split_string(const char *src, const size_t left, const size_t right);
void  strntoupper(char *str, const size_t length);
int   str_starts_with(const char *haystack, const char *needle);
char**split(const char delimiter, const char *str, int *num_chunks);
char *qs_get(const char *qs, const char *key);

void  daemonize_start(void);
void  daemonize_finish(void);
void  privdrop(const char *chroot_dir, const char *privdrop_user);
void  fd_set_nonblock(const int fd);
void  fd_set_block(const int fd);

#ifndef HAVE_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t siz);
#endif

#ifndef HAVE_STRLCAT
size_t strlcat(char *dst, const char *src, size_t siz);
#endif

/* vim:set ts=3 sw=3 tw=78 expandtab: */