From 6bac2d07bfa3969c85a84d9a15768ce4df2ddd61 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 26 Apr 2005 16:04:44 +0000 Subject: [PATCH] header for the string array git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@293 9efc2488-bf62-4759-914b-345cdb29e865 --- include/opensrf/string_array.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 include/opensrf/string_array.h diff --git a/include/opensrf/string_array.h b/include/opensrf/string_array.h new file mode 100644 index 0000000..805e1e2 --- /dev/null +++ b/include/opensrf/string_array.h @@ -0,0 +1,28 @@ +#include + +#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 -- 2.43.2