void outputZapAll(pDeclList declList) { printAll(declList, g_dirList, g_commentList, g_logList); zapSLList(declList, zapDeclInfo); // declList = createSLList(); zapSLList(g_dirList, zapCTree); g_dirList = createSLList(); zapSLList(g_commentList, zapToken); g_commentList = createSLList(); zapSLList(g_logList, zapToken); g_logList = createSLList(); }
void wicExit(int exitCode) { if (exitCode == 0) { zapOutputSystem(); zapCmdLineOptions(); zapTokPos(g_currPos); assert(isEmptySLList(g_logList)); zapSLList(g_logList, NULL); assert(isEmptySLList(g_dirList)); zapSLList(g_dirList, NULL); assert(isEmptySLList(g_commentList)); zapSLList(g_commentList, NULL); zapMemory(); zapDebug(); zapWicResources(); checkMemory(); } else { printf("WIC: Terminating with error...\n"); fcloseall(); } exit(exitCode); }
int zapSymbolTableElem(void *_entry, void *dummy) { pSymTabEntry entry = _entry; dummy = dummy; switch (entry->type) { case SYMT_MACRO: zapSLList(entry->repr.macroCode, zapToken); break; case SYMT_TYPEDEF: zapDeclInfo(entry->repr.typeCode); break; default: assert(0); } wicFree(entry->name); wicFree(entry); return 0; }
void zapCmdLineOptions(void) { zapSLList(g_opt.fileNameList, wicFree); zapSLList(g_opt.incPathList, zapFDReadInd); }