Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

ragged_array.h

00001 #ifndef RAGGED_ARRAY_H
00002 #define RAGGED_ARRAY_H
00003 
00004 struct ragged_array {
00005     char** arr;
00006     int row_count;
00007     int array_size;
00008 };
00009 
00010 struct ragged_array ragged_array_initialize(const int size);
00011 
00012 struct ragged_array ragged_array_populate(const char *path, const char *prefix, const int line_max);
00013 
00014 // Expand the capacity of the array, without adding new data.
00015 int ragged_array_expand(struct ragged_array* set,const int new_size);
00016 
00017 // Add a line, expanding if necessary.
00018 int ragged_array_add_line(struct ragged_array* set, const char* line);
00019 
00020 // Delete a line while retaining continuity of the array -- warning: potentially slow!
00021 int ragged_array_delete_line(struct ragged_array* set, const int line_index);
00022 
00023 void ragged_array_print( struct ragged_array *set );
00024 
00025 #endif

Generated on Fri Jun 4 09:58:45 2010 for cctools by  doxygen 1.3.9.1