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 getCmdLineOptions(int argc, char *argv[]) { int i; char *currArg; g_opt.targetLang = TLT_FORTRAN; g_opt.signedChar = 0; g_opt.asmAttachD = 0; g_opt.prefixStructFields = -1; g_opt.structFieldsSep = NULL; g_opt.conflictPrefix = "WIC_"; g_opt.supressLevel = 1; g_opt.outLineLen = 0; g_opt.fileNameList = createSLList(); g_opt.incPathList = createSLList(); g_opt.intSize = SIZE_32; g_opt.nearPtrSize = SIZE_32; g_opt.ptrSize = SIZE_32; g_opt.farPtrSize = SIZE_32; g_opt.hugePtrSize = SIZE_48; g_opt.debug = 0; if (argc <= 1) { printUsageAndExit(); } else { for (i = 1; i < argc; i++) { currArg = argv[i]; _scanCurrArg(currArg); } } addIncPath(getenv("INCLUDE"), 1, 1); if (isEmptySLList(g_opt.fileNameList)) { reportError(FATAL_FILE_NOT_SPECIFIED); } if (g_opt.outLineLen == 0) { switch (g_opt.targetLang) { case TLT_FORTRAN: g_opt.outLineLen = 72; break; case TLT_ASM: g_opt.outLineLen = 79; break; default: assert(0); } } if (g_opt.prefixStructFields == -1) { switch (g_opt.targetLang) { case TLT_FORTRAN: g_opt.prefixStructFields = 0; break; case TLT_ASM: g_opt.prefixStructFields = 1; break; default: assert(0); } } if (g_opt.structFieldsSep == NULL) { switch (g_opt.targetLang) { case TLT_FORTRAN: g_opt.structFieldsSep = ""; break; case TLT_ASM: g_opt.structFieldsSep = "_FS_"; break; default: assert(0); } } }
void initWicBasics(int argc, char *argv[], float dummy) { dummy = dummy; /* Dummy argument to include floating point routines */ initMemory(); initWicResources(argv[0]); initDebug(); g_commentList = createSLList(); g_dirList = createSLList(); g_logList = createSLList(); g_currPos = NULL; getCmdLineOptions(argc, argv); initHashTable(); initOutputSystem(); }