Ejemplo n.º 1
0
void ExpInsert (const char* Name, unsigned Module)
/* Insert an exported identifier and check if it's already in the list */
{
    HashEntry* L;

    /* Create a hash value for the given name */
    unsigned HashVal = HashStr (Name) % HASHTAB_SIZE;

    /* Create a new hash entry */
    HashEntry* H = NewHashEntry (Name, Module);

    /* Search through the list in that slot and print matching duplicates */
    if (HashTab [HashVal] == 0) {
    	/* The slot is empty */
    	HashTab [HashVal] = H;
    	return;
    }
    L = HashTab [HashVal];
    while (1) {
	if (strcmp (L->Name, Name) == 0) {
	    /* Duplicate entry */
	    Warning ("External symbol `%s' in module `%s' is duplicated in "
	       	     "module `%s'",
	  	     Name, GetObjName (L->Module), GetObjName (Module));
	}
     	if (L->Next == 0) {
     	    break;
     	} else {
     	    L = L->Next;
     	}
    }
    L->Next = H;
}
Ejemplo n.º 2
0
const char* GetObjString (const ObjData* O, unsigned Index)
/* Get a string from the string pool of an object file */
{
    if (Index >= O->StringCount) {
        Error ("Invalid string index (%u) in module `%s'",
               Index, GetObjName (O->Index));
    }
    return O->Strings[Index];
}
Ejemplo n.º 3
0
//****************************
void CObjInfo::OnCloseObj()
{
	if(GetTree())
	{
		GetTree()->RemoveFromList(GetObj(),GetObjName());
		SetTree(0);
	}
	else
	{
		if(bDeleteObj&&GetObj())
		{
			delete 	GetObj();
			SetObj(0);
		}
	}
};
Ejemplo n.º 4
0
void CFormObjectDoc::OnCloseDocument() 
{
	if(GetTree())
		GetTree()->RemoveFromList(GetObj(),GetObjName());
	CMetaDocument::OnCloseDocument();
}
Ejemplo n.º 5
0
Trackable::~Trackable()
{
    LOG_DBG_DEEP("Destroying trackable obj: %s", GetObjName(mObjType).c_str());
}