-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlib.h
29 lines (22 loc) · 881 Bytes
/
lib.h
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
/******************************************************************************
* @file lib.h
*****************************************************************************/
#ifndef _LIB_H
#define _LIB_H
#if defined (_WIN32)
# define PATHSEP ";"
#else
# define PATHSEP ":"
#endif
#include <stddef.h>
char *skip_whitespace (char *p);
char *to_lower (const char *str);
char *xstrdup (const char *str);
int strstart (const char *val, const char **str);
int xstrcasecmp (const char *s1, const char *s2);
int xstrncasecmp (const char *s1, const char *s2, unsigned long n);
void *xmalloc (unsigned long size);
void *xrealloc (void *ptr, unsigned long size);
void dynarray_add (void *ptab, unsigned long *nb_ptr, void *data);
void parse_args (int *pargc, char ***pargv, int optind);
#endif /* _LIB_H */