62 static sureInline(arrayList) newArrayList(
int bound)
66 S = calloc(1,
sizeof(
struct arrayList));
70 S->
A = (
int*)calloc(S->
bound/S->
f,
sizeof(
int));
75 static sureInline(arrayList) newArrayListDef()
77 return newArrayList(INT_MAX);
80 static sureInline(
void) freeArrayList(arrayList* S)
87 static sureInline(
int*) splitAL(arrayList* S)
91 R = (
int*)realloc((*S)->A, ((*S)->n)*
sizeof(int));
98 static sureInline(
void) clean(arrayList S)
103 static sureInline(
int*) get(arrayList S)
108 static sureInline(
int) size(arrayList S)
113 static sureInline(
void) pushAL(arrayList S,
int k)
115 if(S->n == (S->bound/S->f))
118 if(S->f < 1) S->f = 1;
120 S->A = (
int*) realloc(S->A, (S->bound/S->f)*
sizeof(int));
126 static sureInline(
void) popAL(arrayList S)