return r;
}
+/*
+ This function dumps the string array to the console. This is useful for debugging only.
+*/
+int pakfire_strings_dump(char** array) {
+ int r;
+
+ // Check inputs
+ if (!array)
+ return -EINVAL;
+
+ // Determine the length of the array
+ size_t length = pakfire_strings_length(array);
+
+ // If the array is empty, we return a message
+ if (!length) {
+ printf("Empty string array\n");
+ return 0;
+ }
+
+ // Dump the array
+ for (unsigned int i = 0; i < length; i++) {
+ r = printf("array[%u] : %s\n", i, array[i]);
+ if (r < 0)
+ return r;
+ }
+
+ return 0;
+}
+
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
int __pakfire_format_size(char* dst, size_t length, double value) {
__attribute__((format(printf, 2, 3)));
int pakfire_strings_appendm(char*** array, const char** strings);
+int pakfire_strings_dump(char** array);
+
#define TIME_STRING_MAX 32
#define pakfire_format_size(dst, value) \