diff --git a/mx_util.h b/mx_util.h index dbc50e5..26d627e 100644 --- a/mx_util.h +++ b/mx_util.h @@ -1,9 +1,13 @@ #ifndef __MX_UTIL_H__ #define __MX_UTIL_H__ 1 +#include #include #include +#undef mx_free_null +#define mx_free_null(a) do { free(a); (a) = NULL; } while(0) + int mx_strbeginswith(char *str, const char *start, char **endptr); int mx_stribeginswith(char *str, const char *start, char **endptr); int mx_strbeginswithany(char *str, char **starts, char **endptr);