Format util.h
* Formalise usage function with argument type void.
This commit is contained in:
parent
9f4ac595a8
commit
f9d07ac21a
20
util.h
20
util.h
|
@ -3,15 +3,15 @@
|
|||
#define SHIFT_ARGS() argv++; argc--
|
||||
#define SET_ARGV0() argv0 = argv[0]; SHIFT_ARGS()
|
||||
|
||||
void die(const char* fmt, ...);
|
||||
void edie(const char* fmt, ...);
|
||||
void usage();
|
||||
void die (const char* fmt, ...);
|
||||
void edie (const char* fmt, ...);
|
||||
void usage (void);
|
||||
|
||||
void* ecalloc(size_t nmemb, size_t size);
|
||||
void* ecalloc (size_t nmemb, size_t size);
|
||||
|
||||
size_t str_pushc(char* s, char c, size_t s_size, size_t realloc_amount);
|
||||
int str_trimr(char* s, char c, int max_num);
|
||||
char* str_concat(int count, ...);
|
||||
size_t str_pushc (char* s, char c, size_t s_size, size_t realloc_amount);
|
||||
int str_trimr (char* s, char c, int max_num);
|
||||
char* str_concat (int count, ...);
|
||||
#define STR_EALLOC(s) ecalloc(s, sizeof(char))
|
||||
#define STR_MALLOC(s) calloc(s, sizeof(char))
|
||||
|
||||
|
@ -20,8 +20,8 @@ struct str_list {
|
|||
char** values;
|
||||
};
|
||||
|
||||
struct str_list* str_list_add(struct str_list* l, char* s);
|
||||
struct str_list str_list_new(int count, ...);
|
||||
void str_list_free(struct str_list* l);
|
||||
struct str_list* str_list_add (struct str_list* l, char* s);
|
||||
struct str_list str_list_new (int count, ...);
|
||||
void str_list_free (struct str_list* l);
|
||||
#define STR_LIST_INIT() str_list_new(0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue