header for the string array
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 26 Apr 2005 16:04:44 +0000 (16:04 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 26 Apr 2005 16:04:44 +0000 (16:04 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@293 9efc2488-bf62-4759-914b-345cdb29e865

include/opensrf/string_array.h [new file with mode: 0644]

diff --git a/include/opensrf/string_array.h b/include/opensrf/string_array.h
new file mode 100644 (file)
index 0000000..805e1e2
--- /dev/null
@@ -0,0 +1,28 @@
+#include <stdio.h>
+
+#include "opensrf/generic_utils.h"
+
+#define STRING_ARRAY_MAX_SIZE 1024
+
+#ifndef STRING_ARRAY_H
+#define STRING_ARRAY_H
+
+struct string_array_struct {
+               char** array;   
+               int size;
+               int arr_size;
+               int total_string_size;
+};
+typedef struct string_array_struct string_array;
+
+string_array* init_string_array(int size);
+void string_array_add(string_array*, char* string);
+
+char* string_array_get_string(string_array* arr, int index);
+void string_array_destroy(string_array*);
+
+/* total size of all included strings */
+int string_array_get_total_size(string_array* arr);
+
+
+#endif