comparison ListOfArrays.h @ 15:7a5228a4a377

Renamed VMS to PR, in new branch
author Sean Halle <seanhalle@yahoo.com>
date Mon, 03 Sep 2012 15:08:15 -0700
parents f75ec4738afc
children 7731a4d31baa
comparison
equal deleted inserted replaced
7:09ad83642b31 10:c683d62b08c1
29 ListOfArrays* makeListOfArrays(size_t entry_size, int num_entries_per_block); 29 ListOfArrays* makeListOfArrays(size_t entry_size, int num_entries_per_block);
30 30
31 #define addToListOfArrays(type,value,list) do { \ 31 #define addToListOfArrays(type,value,list) do { \
32 int offset_in_fragment = list->next_free_index % list->num_entries_per_fragment; \ 32 int offset_in_fragment = list->next_free_index % list->num_entries_per_fragment; \
33 if(offset_in_fragment == 0){ \ 33 if(offset_in_fragment == 0){ \
34 void* newBlock = VMS_int__malloc(list->entry_size * list->num_entries_per_fragment); \ 34 void* newBlock = PR_int__malloc(list->entry_size * list->num_entries_per_fragment); \
35 addToDynArray(newBlock,list->dim1info); \ 35 addToDynArray(newBlock,list->dim1info); \
36 } \ 36 } \
37 type* typedFragment = (type*) ((list->dim1)[list->dim1info->numInArray -1]); \ 37 type* typedFragment = (type*) ((list->dim1)[list->dim1info->numInArray -1]); \
38 typedFragment[offset_in_fragment] = value; \ 38 typedFragment[offset_in_fragment] = value; \
39 list->next_free_index++; \ 39 list->next_free_index++; \