84 |
* r) vb VARRAY structure |
* r) vb VARRAY structure |
85 |
*/ |
*/ |
86 |
VARRAY * |
VARRAY * |
87 |
varray_open(size, expand) |
varray_open(int size, int expand) |
|
int size; |
|
|
int expand; |
|
88 |
{ |
{ |
89 |
VARRAY *vb = (VARRAY *)malloc(sizeof(VARRAY)); |
VARRAY *vb = (VARRAY *)malloc(sizeof(VARRAY)); |
90 |
|
|
113 |
* This procedure doesn't operate the contents of the array. |
* This procedure doesn't operate the contents of the array. |
114 |
*/ |
*/ |
115 |
void * |
void * |
116 |
varray_assign(vb, index, force) |
varray_assign(VARRAY *vb, int index, int force) |
|
VARRAY *vb; |
|
|
int index; |
|
|
int force; |
|
117 |
{ |
{ |
118 |
if (index < 0) |
if (index < 0) |
119 |
die("varray_assign: illegal index value."); |
die("varray_assign: illegal index value."); |
159 |
* This procedure doesn't operate the contents of the array. |
* This procedure doesn't operate the contents of the array. |
160 |
*/ |
*/ |
161 |
void * |
void * |
162 |
varray_append(vb) |
varray_append(VARRAY *vb) |
|
VARRAY *vb; |
|
163 |
{ |
{ |
164 |
return varray_assign(vb, vb->length, 1); |
return varray_assign(vb, vb->length, 1); |
165 |
} |
} |
169 |
* i) vb VARRAY structure |
* i) vb VARRAY structure |
170 |
*/ |
*/ |
171 |
void |
void |
172 |
varray_reset(vb) |
varray_reset(VARRAY *vb) |
|
VARRAY *vb; |
|
173 |
{ |
{ |
174 |
vb->length = 0; |
vb->length = 0; |
175 |
} |
} |
179 |
* i) vb VARRAY structure |
* i) vb VARRAY structure |
180 |
*/ |
*/ |
181 |
void |
void |
182 |
varray_close(vb) |
varray_close(VARRAY *vb) |
|
VARRAY *vb; |
|
183 |
{ |
{ |
184 |
if (vb) { |
if (vb) { |
185 |
if (vb->vbuf) |
if (vb->vbuf) |