- Timestamp:
- May 31, 2003, 3:33:42 PM (20 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 5e53c4a
- Parents:
- c86a35c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
list.c
r1aee7d9 rd09e5a1 26 26 27 27 int owl_list_append_element(owl_list *l, void *element) { 28 void *ptr; 29 28 30 if ((l->size+1) > (l->avail/GROWAT)) { 29 l->list=owl_realloc(l->list, l->avail*GROWBY*sizeof(void *)); 31 ptr=owl_realloc(l->list, l->avail*GROWBY*sizeof(void *)); 32 if (ptr==NULL) return(-1); 33 l->list=ptr; 30 34 l->avail=l->avail*GROWBY; 31 if (l->list==NULL) return(-1);32 35 } 33 36 … … 38 41 39 42 int owl_list_prepend_element(owl_list *l, void *element) { 43 void *ptr; 40 44 int i; 41 45 42 46 if ((l->size+1) > (l->avail/GROWAT)) { 43 l->list=owl_realloc(l->list, l->avail*GROWBY*sizeof(void *)); 47 ptr=owl_realloc(l->list, l->avail*GROWBY*sizeof(void *)); 48 if (ptr==NULL) return(-1); 49 l->list=ptr; 44 50 l->avail=l->avail*GROWBY; 45 if (l->list==NULL) return(-1);46 51 } 47 52
Note: See TracChangeset
for help on using the changeset viewer.