Beispiel #1
0
void DelObjData (const char* Module)
/* Delete the object module from the list */
{
    ObjData* O = ObjRoot;
    ObjData* Last = 0;
    while (O) {
	if (strcmp (O->Name, Module) == 0) {
	    /* Found the module, remove it from the list */
	    if (Last == 0) {
	       	/* This was the first entry in the list */
	       	ObjRoot = O->Next;
	    } else {
	       	Last->Next = O->Next;
	    }
	    if (ObjLast == O) {
	       	/* O was the last object in the list */
	       	ObjLast = Last;
	    }
	    --ObjCount;

	    /* Free the entry */
	    FreeObjData (O);

	    /* Done */
	    return;
	}
	Last = O;
	O = O->Next;
    }

    /* Not found! */
    Warning ("Module `%s' not found in library", Module);
}
Beispiel #2
0
void DelObjData (const char* Module)
/* Delete the object module from the list */
{
    unsigned I;
    for (I = 0; I < CollCount (&ObjPool); ++I) {

        /* Get this object file */
        ObjData* O = CollAtUnchecked (&ObjPool, I);

        /* Did we find it? */
        if (strcmp (O->Name, Module) == 0) {

            /* Free the entry */
            CollDelete (&ObjPool, I);
            FreeObjData (O);

            /* Done */
            return;
        }
    }

    /* Not found! */
    Warning ("Module '%s' not found in library '%s'", Module, LibName);
}