2005-11-18 18:54:58 +03:00
|
|
|
/*
|
2006-01-20 17:20:24 +03:00
|
|
|
* (C)opyright MMIV-MMVI Anselm R. Garbe <garbeam at gmail dot com>
|
2005-11-18 18:54:58 +03:00
|
|
|
* See LICENSE file for license details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#ifndef nil
|
|
|
|
#define nil (void *)0
|
|
|
|
#endif
|
|
|
|
|
2006-01-29 15:41:16 +03:00
|
|
|
/* array.c */
|
2006-03-01 13:55:46 +03:00
|
|
|
void ** cext_array_attach(void **array, void *p, unsigned int psize, unsigned int *size);
|
|
|
|
void cext_array_detach(void **array, void *p, unsigned int *size);
|
2006-01-29 15:41:16 +03:00
|
|
|
|
2005-12-08 03:31:23 +03:00
|
|
|
/* emallocz.c */
|
2006-03-01 13:55:46 +03:00
|
|
|
void *cext_emallocz(unsigned int size);
|
2005-11-18 18:54:58 +03:00
|
|
|
|
2006-04-03 00:53:56 +04:00
|
|
|
/* evector.c */
|
|
|
|
#define EVECTOR(name, type) \
|
|
|
|
typedef struct { \
|
|
|
|
unsigned int size; \
|
|
|
|
type * data; \
|
|
|
|
} name
|
|
|
|
|
|
|
|
EVECTOR(evector_t, void*);
|
|
|
|
|
2006-04-03 15:05:40 +04:00
|
|
|
void cext_evector_attach(evector_t *v, void *p);
|
|
|
|
void cext_evector_detach(evector_t *v, void *p);
|
2006-04-03 00:53:56 +04:00
|
|
|
|
2005-11-18 18:54:58 +03:00
|
|
|
/* estrdup.c */
|
2005-12-06 17:56:57 +03:00
|
|
|
char *cext_estrdup(const char *s);
|
2005-11-18 18:54:58 +03:00
|
|
|
|
|
|
|
/* strlcat.c */
|
2006-03-01 13:55:46 +03:00
|
|
|
unsigned int cext_strlcat(char *dst, const char *src, unsigned int siz);
|
2005-11-18 18:54:58 +03:00
|
|
|
|
|
|
|
/* strlcpy.c */
|
2006-03-01 13:55:46 +03:00
|
|
|
unsigned int cext_strlcpy(char *dst, const char *src, unsigned int siz);
|
2005-11-18 18:54:58 +03:00
|
|
|
|
|
|
|
/* strtonum.c */
|
2005-12-21 18:18:11 +03:00
|
|
|
long long cext_strtonum(const char *numstr, long long minval,
|
2006-03-23 13:34:00 +03:00
|
|
|
long long maxval, const char **errstrp);
|
2005-11-18 18:54:58 +03:00
|
|
|
|
|
|
|
/* tokenize.c */
|
2006-03-01 13:55:46 +03:00
|
|
|
unsigned int cext_tokenize(char **result, unsigned int reslen, char *str, char delim);
|