/* ----------------------------------------------------------------- * lookup a symbol in the global symbol table */ static void * lookupSymbol( char *lbl ) { void *val; initLinker() ; assert(global_symbol_table != NULL); val = search_StringMap(global_symbol_table, lbl); return val; }
int main() { LNode* head; head = initLinker(20); printf("Original Linker:\n"); printLinker(head); printf("[recursive] Invert the Linker:\n"); invertPrint(head); printf("\n"); printf("[change the linker] Invert the Linker:\n"); head = invertLinker(head); printLinker(head); return 0; }