]> git.evergreen-ils.org Git - OpenSRF.git/blob - include/opensrf/string_array.h
805e1e2bd354183f0393716e1fc56beb31765a1f
[OpenSRF.git] / include / opensrf / string_array.h
1 #include <stdio.h>
2
3 #include "opensrf/generic_utils.h"
4
5 #define STRING_ARRAY_MAX_SIZE 1024
6
7 #ifndef STRING_ARRAY_H
8 #define STRING_ARRAY_H
9
10 struct string_array_struct {
11                 char** array;   
12                 int size;
13                 int arr_size;
14                 int total_string_size;
15 };
16 typedef struct string_array_struct string_array;
17
18 string_array* init_string_array(int size);
19 void string_array_add(string_array*, char* string);
20
21 char* string_array_get_string(string_array* arr, int index);
22 void string_array_destroy(string_array*);
23
24 /* total size of all included strings */
25 int string_array_get_total_size(string_array* arr);
26
27
28 #endif