Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > ListOfArrays
changeset 8:0e6cc9d9ec67 MC_shared
on MC_shared brch, changed VMS__malloc to VMS_int__malloc and added .hgeol
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Fri, 09 Mar 2012 22:14:24 -0800 |
| parents | 94a5b324bc29 |
| children | f75ec4738afc |
| files | .hgeol ListOfArrays.c ListOfArrays.h |
| diffstat | 3 files changed, 21 insertions(+), 7 deletions(-) [+] |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/.hgeol Fri Mar 09 22:14:24 2012 -0800 1.3 @@ -0,0 +1,14 @@ 1.4 + 1.5 +[patterns] 1.6 +**.py = native 1.7 +**.txt = native 1.8 +**.c = native 1.9 +**.h = native 1.10 +**.cpp = native 1.11 +**.java = native 1.12 +**.class = bin 1.13 +**.jar = bin 1.14 +**.sh = native 1.15 +**.pl = native 1.16 +**.jpg = bin 1.17 +**.gif = bin
2.1 --- a/ListOfArrays.c Fri Mar 09 18:22:54 2012 -0800 2.2 +++ b/ListOfArrays.c Fri Mar 09 22:14:24 2012 -0800 2.3 @@ -3,7 +3,7 @@ 2.4 #include "VMS_impl/vmalloc.h" 2.5 2.6 ListOfArrays* makeListOfArrays(size_t entry_size, int num_entries_per_block){ 2.7 - ListOfArrays* newLoA = (ListOfArrays*) VMS__malloc(sizeof(ListOfArrays)); 2.8 + ListOfArrays* newLoA = (ListOfArrays*) VMS_int__malloc(sizeof(ListOfArrays)); 2.9 newLoA->dim1info = makePrivDynArrayOfSize(&(newLoA->dim1),8); 2.10 2.11 newLoA->entry_size = entry_size; 2.12 @@ -32,15 +32,15 @@ 2.13 } 2.14 2.15 void freeListOfArrays(ListOfArrays* list){ 2.16 - freeDynArrayDeep(list->dim1info,&VMS__free); 2.17 - VMS__free((void*)list); 2.18 + freeDynArrayDeep(list->dim1info,&VMS_int__free); 2.19 + VMS_int__free((void*)list); 2.20 } 2.21 2.22 /* 2.23 void addToListOfArraysDependency(Dependency value, ListOfArrays* list){ 2.24 int offset_in_fragment = list->next_free_index % list->num_entries_per_fragment; 2.25 if(offset_in_fragment == 0){ 2.26 - void* newBlock = VMS__malloc(list->entry_size * list->num_entries_per_fragment); 2.27 + void* newBlock = VMS_int__malloc(list->entry_size * list->num_entries_per_fragment); 2.28 addToDynArray(newBlock,list->dim1info); 2.29 } 2.30 Dependency* typedFragment = (Dependency*) ((list->dim1)[list->dim1info->numInArray -1]); 2.31 @@ -51,7 +51,7 @@ 2.32 void addToListOfArraysUnit(Unit value, ListOfArrays* list){ 2.33 int offset_in_fragment = list->next_free_index % list->num_entries_per_fragment; 2.34 if(offset_in_fragment == 0){ 2.35 - void* newBlock = VMS__malloc(list->entry_size * list->num_entries_per_fragment); 2.36 + void* newBlock = VMS_int__malloc(list->entry_size * list->num_entries_per_fragment); 2.37 addToDynArray(newBlock,list->dim1info); 2.38 } 2.39 Unit* typedFragment = (Unit*) ((list->dim1)[list->dim1info->numInArray -1]);
3.1 --- a/ListOfArrays.h Fri Mar 09 18:22:54 2012 -0800 3.2 +++ b/ListOfArrays.h Fri Mar 09 22:14:24 2012 -0800 3.3 @@ -9,7 +9,7 @@ 3.4 #define LISTOFARRAYS_H 3.5 3.6 #include<stddef.h> 3.7 -#include "../DynArray/DynArray.h" 3.8 +#include "DynArray/DynArray.h" 3.9 3.10 3.11 typedef struct { 3.12 @@ -31,7 +31,7 @@ 3.13 #define addToListOfArrays(type,value,list) do { \ 3.14 int offset_in_fragment = list->next_free_index % list->num_entries_per_fragment; \ 3.15 if(offset_in_fragment == 0){ \ 3.16 - void* newBlock = VMS__malloc(list->entry_size * list->num_entries_per_fragment); \ 3.17 + void* newBlock = VMS_int__malloc(list->entry_size * list->num_entries_per_fragment); \ 3.18 addToDynArray(newBlock,list->dim1info); \ 3.19 } \ 3.20 type* typedFragment = (type*) ((list->dim1)[list->dim1info->numInArray -1]); \
