2 * This file is part of libdyn.a, the C Dynamic Object library. It
3 * contains the source code for the functions DynCreate() and
6 * There are no restrictions on this code; however, if you make any
7 * changes, I request that you document them so that I do not get
8 * credit or blame for your modifications.
10 * Written by Barr3y Jaspan, Student Information Processing Board (SIPB)
11 * and MIT-Project Athena, 1989.
19 #define DEFAULT_INC 100
22 static int default_increment = DEFAULT_INC;
24 DynObject DynCreate(el_size, inc)
29 obj = (DynObject) malloc(sizeof(DynObjectRec));
33 obj->array = (DynPtr) malloc(0);
34 obj->el_size = el_size;
35 obj->num_el = obj->size = 0;
36 obj->debug = obj->paranoid = 0;
37 obj->inc = (!! inc) ? inc : default_increment;