#include #include #include "slist.h" #include "objs.h" Object *Object::first = 0; Object::Object(char *Pname) { name = new char[strlen(Pname)+1]; strcpy(name, Pname); df = rf = lf = busy = 0; next = first; first = this; } Object::~Object() { delete name; } ObjList::ObjList() { objs = (Object **)malloc(10*sizeof(Object *)); max = 10; count = 0; } ObjList::~ObjList() { free(objs); } void ObjList::add(Object *o) { int i; for (i=0; i= max) { max += 10; objs = (Object **)realloc(objs, max * sizeof(Object *)); } objs[count++] = o; }