X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=src%2Futils_array.h;h=252c8a76bb6a1cafd469184a49c32ac3091bfa3b;hp=da7cc317c405704c03f6a5a94da7c304cdd417e6;hb=d00ed057f5ca87431c18ecbf9c45364eb85c24f4;hpb=b988bcc13c655299bc3796cccaa583f62704e759 diff --git a/src/utils_array.h b/src/utils_array.h index da7cc31..252c8a7 100644 --- a/src/utils_array.h +++ b/src/utils_array.h @@ -30,10 +30,14 @@ typedef struct str_array_s str_array_t; str_array_t *array_create (void); void array_destroy (str_array_t *a); +/* Appends a string to the array. The string is duplicated, so the original + * string may / must be freed. */ int array_append (str_array_t *a, const char *entry); int array_append_format (str_array_t *a, const char *format, ...) __attribute__((format(printf,2,3))); +/* Prepends a string to the array. The string is duplicated, so the original + * string may / must be freed. */ int array_prepend (str_array_t *a, const char *entry); int array_prepend_format (str_array_t *a, const char *format, ...) __attribute__((format(printf,2,3)));