array.h (458B)
1 typedef struct Array Array; 2 3 struct Array { 4 short magic; 5 QLock *l; 6 long size; 7 long n; 8 long count; 9 char *p; 10 void (*free)(void *); 11 }; 12 13 Array * arraycreate(long size, long n, void (*free)(void *)); 14 int arraydel(Array *, long, long); 15 void arrayfree(Array *); 16 void * arraygrow(Array *, long, void *); 17 void * arrayget(Array *, long, void *); 18 void * arrayend(Array *); 19 void * arrayinsert(Array *, long, long, void *); 20 void * arrayset(Array *, long, void *);