diff --git a/xs.h b/xs.h index da853f5..9cae3dc 100644 --- a/xs.h +++ b/xs.h @@ -34,6 +34,9 @@ typedef char d_char; /* auto-destroyable strings */ #define xs __attribute__ ((__cleanup__ (_xs_destroy))) d_char +/* not really all, just very much */ +#define XS_ALL 0xfffffff + void *xs_free(void *ptr); void *_xs_realloc(void *ptr, size_t size, const char *file, int line, const char *func); #define xs_realloc(ptr, size) _xs_realloc(ptr, size, __FILE__, __LINE__, __FUNCTION__) @@ -74,7 +77,7 @@ d_char *xs_list_pop(d_char *list, char **data); int xs_list_in(char *list, const char *val); d_char *xs_join(char *list, const char *sep); d_char *xs_split_n(const char *str, const char *sep, int times); -#define xs_split(str, sep) xs_split_n(str, sep, 0xfffffff) +#define xs_split(str, sep) xs_split_n(str, sep, XS_ALL) d_char *xs_dict_new(void); d_char *xs_dict_append_m(d_char *dict, const char *key, const char *mem, int dsz); #define xs_dict_append(dict, key, data) xs_dict_append_m(dict, key, data, xs_size(data)) diff --git a/xs_glob.h b/xs_glob.h index c5293dc..978c200 100644 --- a/xs_glob.h +++ b/xs_glob.h @@ -5,7 +5,7 @@ #define _XS_GLOB_H d_char *xs_glob_n(const char *spec, int basename, int reverse, int max); -#define xs_glob(spec, basename, reverse) xs_glob_n(spec, basename, reverse, 0xfffffff) +#define xs_glob(spec, basename, reverse) xs_glob_n(spec, basename, reverse, XS_ALL) #ifdef XS_IMPLEMENTATION diff --git a/xs_io.h b/xs_io.h index 9649484..6112dcb 100644 --- a/xs_io.h +++ b/xs_io.h @@ -79,7 +79,7 @@ d_char *xs_read(FILE *f, int *sz) d_char *xs_readall(FILE *f) /* reads the rest of the file into a string */ { - int size = 0xfffffff; + int size = XS_ALL; return xs_read(f, &size); } diff --git a/xs_regex.h b/xs_regex.h index e0d1b7a..302bcf0 100644 --- a/xs_regex.h +++ b/xs_regex.h @@ -5,9 +5,9 @@ #define _XS_REGEX_H d_char *xs_regex_split_n(const char *str, const char *rx, int count); -#define xs_regex_split(str, rx) xs_regex_split_n(str, rx, 0xfffffff) +#define xs_regex_split(str, rx) xs_regex_split_n(str, rx, XS_ALL) d_char *xs_regex_match_n(const char *str, const char *rx, int count); -#define xs_regex_match(str, rx) xs_regex_match_n(str, rx, 0xfffffff) +#define xs_regex_match(str, rx) xs_regex_match_n(str, rx, XS_ALL) #ifdef XS_IMPLEMENTATION diff --git a/xs_version.h b/xs_version.h index ac5d43f..b23be3e 100644 --- a/xs_version.h +++ b/xs_version.h @@ -1 +1 @@ -/* a78beb97d364ff31cbaa504e275118afeaea7a59 */ +/* 2c01845d968c01c84aa52ff00ed029d9277c2d9c */