void initDone () { m_dumpTable = true; encodeChar ('B'); encodeChar ('M'); encodeChar ('L'); encodeChar ('1'); dumpTable (); }
CeeSectionString::~CeeSectionString() { #ifdef RDATA_STATS dumpTable(); #endif for (int i=0; i < MaxRealEntries; i++) deleteEntries(stringTable[i]); }
void SchemaDumper::dumpTables (QStringList &output) { output << notr ("tables:"); QSharedPointer<Result> result=interface.executeQueryResult (notr ("SHOW TABLES")); while (result->next ()) dumpTable (output, result->value (0).toString ()); }
int main (int argc, char * argv []) { MediaList includeMedia; myStderr = stderr; printf ("MeMo Compiler v%s\n", VERSION); setExePath (argv[0]); if (argc < 2) { usage (argv[0]); } if (strcmp (argv[1], "-d") ==0) { dumpTable (argv[2]); return (0); } if (strcmp (argv[1], "-b") ==0) { ByteCode::generate (argv[2]); return (0); } bool verbose = false; int start = 1; char * dir = (char *)"."; char * file = NULL; while (start < argc) { if (strcmp (argv[start], "-v") == 0) { verbose = true; } else if (strcmp (argv[start], "-s") == 0) { myStderr = stdout; } else if (strcmp (argv[start], "-o") == 0) { start++; dir = strdup (argv[start]); } else if (strcmp (argv[start], "-I") == 0) { start++; MultiPathFile::addMultiplePaths (argv[start]); } else if (strcmp (argv[start], "-i") == 0) { start++; includeMedia.addMedia (argv[start]); } else if (strcmp (argv[start], "-h") ==0) { usage (argv[0]); return (0); } else if (strcmp (argv[start], "--compat") == 0) { ByteCode::s_compat = true; } else if (strcmp (argv[start], "--ignore-new-paths") == 0) { MultiPathFile::s_follow = false; } else { file = argv [start]; } start++; } if (file != NULL && endsWith (file, "wrl")) { compile (file, dir, includeMedia, verbose); } else { usage (argv[0]); } return (0); }
void lua::utils::printType(TraversalInfo input) { auto luaType = lua_type(input.L, input.index); auto luaTypeName = lua_typename(input.L, luaType); if (input.indent) { helper::indent(input.level, input.output); } input.output << luaTypeName; switch (luaType) { case LUA_TNIL: break; case LUA_TBOOLEAN: input.output << '(' << std::boolalpha << lua_toboolean(input.L, input.index) << ')'; break; case LUA_TNUMBER: input.output << '(' << lua_tonumber(input.L, input.index) << ')'; break; case LUA_TSTRING: input.output << "(\"" << lua_tostring(input.L, input.index) << "\")"; break; case LUA_TTABLE: if (input.level < input.maxLevel) { dumpTable(input); } else { input.output << "{<max-level-reached>}"; } break; case LUA_TFUNCTION: case LUA_TLIGHTUSERDATA: case LUA_TUSERDATA: case LUA_TTHREAD: input.output << "(?)"; break; default: GEP_ASSERT(false, "Unexpected lua type", luaType, luaTypeName); break; } }
int main (void) { char currentLine[256]; createTable (); /* Read opcode descriptions from `stdin'. For each mnemonic, make an entry into the opcode table. */ while (fgets (currentLine, sizeof (currentLine), stdin) != NULL) { char opcode[16]; char mnemonic[16]; char format[16]; char description[64]; char archtag[16]; int archbits; if (currentLine[0] == '#') continue; memset (opcode, 0, 8); if (sscanf (currentLine, "%15s %15s %15s \"%[^\"]\" %15s", opcode, mnemonic, format, description, archtag) == 5) { if (strcmp (archtag, "esaonly") == 0) archbits = ARCHBITS_ESAONLY; else if (strcmp (archtag, "esa") == 0) archbits = ARCHBITS_ESA; else if (strcmp (archtag, "esame") == 0) archbits = ARCHBITS_ESAME; else archbits = 0; insertOpcode (opcode, mnemonic, format, archbits); } else fprintf (stderr, "Couldn't scan line %s\n", currentLine); } dumpTable (); return 0; }
ostream& ossimTableRemapper::print(ostream& os) const { ossimScalarTypeLut* sl = ossimScalarTypeLut::instance(); os << "\nossimTableRemapper::print:" << "\ntheTableBinCount: " << theTableBinCount << "\ntheTableBandCount: " << theTableBandCount << "\ntheTableType: " << TABLE_TYPE[theTableType] << "\ntheInputScalarType: " << (*sl)[theInputScalarType] << "\ntheOutputScalarType: " << (*sl)[theOutputScalarType] << endl; if (theTile.valid()) { os << "theTile:\n" << *theTile << endl; } if (theTmpTile.valid()) { os << "theTmpTile:\n" << *theTmpTile << endl; } switch (theOutputScalarType) { case OSSIM_UCHAR: { dumpTable(ossim_uint8(0), os); break; } case OSSIM_USHORT11: case OSSIM_USHORT16: { dumpTable(ossim_uint16(0), os); break; } case OSSIM_SSHORT16: { dumpTable(ossim_sint16(0), os); break; } case OSSIM_NORMALIZED_FLOAT: case OSSIM_FLOAT: { dumpTable(ossim_float32(0), os); break; } case OSSIM_NORMALIZED_DOUBLE: case OSSIM_DOUBLE: { dumpTable(ossim_float64(0), os); break; } case OSSIM_SCALAR_UNKNOWN: default: { if(traceDebug()) { // Shouldn't hit this. ossimNotify(ossimNotifyLevel_WARN) << "ossimTableRemapper::print OSSIM_SCALAR_UNKNOWN!\n"; } break; } } // End of "switch (theTableType)" return os; }
void tmprofile_result(void) { dumpTable(); }
int main (void) { char currentLine[256]; createTable (); /* Read opcode descriptions from `stdin'. For each mnemonic, make an entry into the opcode table. */ while (fgets (currentLine, sizeof (currentLine), stdin) != NULL) { char opcode[16]; char mnemonic[16]; char format[16]; char description[64]; char cpu_string[16]; char modes_string[16]; int min_cpu; int mode_bits; char *str; if (currentLine[0] == '#') continue; memset (opcode, 0, 8); if (sscanf (currentLine, "%15s %15s %15s \"%[^\"]\" %15s %15s", opcode, mnemonic, format, description, cpu_string, modes_string) == 6) { if (strcmp (cpu_string, "g5") == 0) min_cpu = S390_OPCODE_G5; else if (strcmp (cpu_string, "g6") == 0) min_cpu = S390_OPCODE_G6; else if (strcmp (cpu_string, "z900") == 0) min_cpu = S390_OPCODE_Z900; else if (strcmp (cpu_string, "z990") == 0) min_cpu = S390_OPCODE_Z990; else if (strcmp (cpu_string, "z9-109") == 0) min_cpu = S390_OPCODE_Z9_109; else if (strcmp (cpu_string, "z9-ec") == 0) min_cpu = S390_OPCODE_Z9_EC; else { fprintf (stderr, "Couldn't parse cpu string %s\n", cpu_string); exit (1); } str = modes_string; mode_bits = 0; do { if (strncmp (str, "esa", 3) == 0 && (str[3] == 0 || str[3] == ',')) { mode_bits |= 1 << S390_OPCODE_ESA; str += 3; } else if (strncmp (str, "zarch", 5) == 0 && (str[5] == 0 || str[5] == ',')) { mode_bits |= 1 << S390_OPCODE_ZARCH; str += 5; } else { fprintf (stderr, "Couldn't parse modes string %s\n", modes_string); exit (1); } if (*str == ',') str++; } while (*str != 0); insertOpcode (opcode, mnemonic, format, min_cpu, mode_bits); } else fprintf (stderr, "Couldn't scan line %s\n", currentLine); } dumpTable (); return 0; }
int main(int argc, char * argv[]) { int i = 0; int fd = 0; int smallCount = 100000; if(argc < 2) { fprintf(stderr, "Invlaid number of Arguments. Exiting Program"); return 1; } //finds the smallest file, saves it's index for(c = 1; c < argc; c++) { fd = open(argv[c], O_RDONLY); bufferSize = (int)lseek(fd, 0, SEEK_END); if(bufferSize < smallCount) { shortFile = c; smallCount = bufferSize; } } //For multi-threaded portion, divide count into equal portions among threads. //Use locks to make sure the threads aren't overwriting any data(they'll be working on the same hash table) //switch shortest file with first file in argument array char * temp = argv[shortFile]; argv[shortFile] = argv[1]; argv[1] = temp; //create hash table for every file entry int numFile = 1; for(numFile = 1; numFile < argc; numFile++) { fd = open(argv[1], O_RDONLY); if (fd < 0) { fprintf(stderr, "Could not open file. moving on to next file"); numFile++; } else { int bufferSize = (int)lseek(fd, 0, SEEK_END); char buffer[bufferSize]; read(fd, buffer, bufferSize); createHash(0, bufferSize, fd, buffer, numFile); dumpTable(numFile); } } for(c = 1; c < argc; c++) { checkRef(arr[c]); } /*int numResults = 0; //createResults(argc - 1); createResults(1); i = 0; while(results[i].count != 0) { i++; } numResults = i; sortResults(numResults); printResults(); //dumpTable(argc - 1);*/ }