void Ctrl::sProcessMSG(MSG& msg) { if (msg.message == WM_HOTKEY) { if((int)msg.wParam >= 0 && (int)msg.wParam < Ctrl::hotkey.GetCount()) Ctrl::hotkey[(int)msg.wParam](); return; } if(!DHCtrl::PreprocessMessageAll(msg)) if(msg.message != WM_SYSKEYDOWN && msg.message != WM_SYSKEYUP || PassWindowsKey((dword)msg.wParam) || msg.wParam == VK_MENU) //17.11 Mirek - fix to get windows menu invoked on Alt+Space TranslateMessage(&msg); // 04/09/07: TRC fix to make barcode reader going better #if 0 DDUMP(msg.hwnd); for(WinMsg *m = sWinMsg; m->ID; m++) if(m->ID == msg.message) { RLOG(m->name << ' ' << Sprintf(", wParam = %d (0x%x), lParam = %d (0x%x)", msg.wParam, msg.wParam, msg.lParam, msg.lParam)); break; } char cls[200]; GetClassName(msg.hwnd, cls, 200); DDUMP(cls); #endif if(IsWindowUnicode(msg.hwnd)) DispatchMessageW(&msg); else DispatchMessage(&msg); }
FontDB::FontDB() { for(int i = 0; i < Font::GetFaceCount(); i++) { DDUMP(Font::GetFaceName(i)); DDUMP(Font::GetFaceInfo(i) & Font::SCALEABLE); DDUMP(Font::GetFaceInfo(i) & Font::LOCAL); } Add(list.SizePos()); list.AddColumn("Face"); list.AddColumn("V").SetDisplay(CenteredImageDisplay()); list.AddColumn("I").SetDisplay(CenteredImageDisplay()); list.AddColumn("Density"); list.AddColumn("Complexity"); list.AddColumn("VT"); list.AddColumn("IT"); list.AddColumn("VS"); list.AddColumn("IS"); list.AddColumn("VW"); list.AddColumn("Number"); list.AddColumn("Similar"); // list.AddColumn("Lower"); // list.AddColumn("Upper"); list.ColumnWidths("114 57 55 56 35 33 27 30 40 37 111 338"); list.SetLineCy(40); }
void SerializePPFiles(Stream& s) { s % sAllMacros % sPPfile % sPPserial; if(s.IsLoading()) LoadPPConfig(); #if 0 if(s.IsLoading()) { _DBG_ DDUMP(sPPfile.GetCount()); DDUMP(sAllMacros.GetCount()); DDUMP(sPPserial); Index<int> psegment; for(int i = 0; i < sPPfile.GetCount(); i++) { const PPFile& p = sPPfile[i]; for(int j = 0; j < p.item.GetCount(); j++) psegment.FindAdd(p.item[j].segment_id); } DDUMP(psegment.GetCount()); int n = 0; _DBG_ Index<int> msegment; for(int i = 0; i < sAllMacros.GetCount(); i++) { _DBG_ if(sAllMacros.IsUnlinked(i)) n++; else msegment.FindAdd(sAllMacros[i].segment_id); } DLOG("UNLINKED " << n); DLOG("Segments " << msegment.GetCount()); }
void Test(const char *path) { DDUMP(sizeof(CppItem)); Cpp cpp; cpp.WhenError = callback(AddError); cpp.path = path; cpp.filedir = GetFileFolder(path); // cpp.include_path = cpp.filedir;//"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Vc\\Include;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Include;C:\\OpenSSL-Win32\\include;C:\\u\\pgsql\\include;C:\\u\\OpenSSL-Win32\\include"; // cpp.include_path = "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Vc\\Include;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Include;C:\\OpenSSL-Win32\\include;C:\\u\\pgsql\\include;C:\\u\\OpenSSL-Win32\\include"; cpp.include_path = "C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Vc\\Include;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0\\Include;C:\\u\\OpenSSL-Win32\\include;C:\\u\\pgsql\\include;C:\\Program Files (x86)\\MySQL\\MySQL Connector C 6.1\\include"; cpp.include_path << ";c:/u/upp.src/uppsrc"; FileIn in(path); Index<String> inc; cpp.DoCpp(in, inc); // StringStream ss(pp); // Parse(ss, Vector<String>() << "__cdecl", base, path, callback(AddError)); DLOG("======================="); DUMPC(inc); DLOG("======================="); DUMPC(errs); DLOG("======================="); Qualify(cpp.base); String out; for(int i = 0; i < cpp.base.GetCount(); i++) { out << Nvl(cpp.base.GetKey(i), "<globals>") << " {\n"; const Array<CppItem>& ma = cpp.base[i]; for(int j = 0; j < ma.GetCount(); j++) { const CppItem& m = ma[j]; out << '\t' << CppItemKindAsString(m.kind) << ' ' << m.qitem << ' ' << m.line << "\n"; // DDUMP(StoreAsString(const_cast<CppItem&>(m)).GetCount()); } out << "}\n"; } LOG(out); }
int main(void) { struct diag_vcdiff *vcdiff; struct diag_vcdiff_context *context; struct diag_vcdiff_vm *vm; uint8_t *target; #define HELLO_VCDIFF DIAGONAL_TEST_DIR "/vcdiff/hello.vcdiff" context = diag_vcdiff_context_new_path(HELLO_VCDIFF); if (!context) { return 1; } context->compatibility = 1; vcdiff = diag_vcdiff_read(context); if (!vcdiff) { return 2; } assert(vcdiff->num_windows == 1); #define CDUMP(x) printf("context->" #x ": %d\n", context->x) CDUMP(compatibility); #undef CDUMP #define VDUMP(x) printf("vcdiff->" #x ": %d\n", vcdiff->x) VDUMP(version); VDUMP(indicator); VDUMP(compressor_id); VDUMP(length_code_table_data); #undef VDUMP #define WDUMP(x) printf("vcdiff->windows[0]->" #x ": %d\n", vcdiff->windows[0]->x) WDUMP(indicator); WDUMP(length_source_segment); WDUMP(position_source_segment); #undef WDUMP #define DDUMP(x) printf("vcdiff->windows[0]->delta->" #x ": %d\n", vcdiff->windows[0]->delta->x) DDUMP(length); DDUMP(s_window); DDUMP(indicator); DDUMP(length_data); DDUMP(length_inst); DDUMP(length_addr); #undef DDUMP vm = diag_vcdiff_vm_new_path(HELLO_VCDIFF); target = diag_vcdiff_decode(vm, vcdiff); assert(target && vm->s_target == 14); assert(strncmp("hello, world.\n", (const char *)target, 14) == 0); diag_vcdiff_vm_destroy(vm); diag_vcdiff_context_destroy(context); return EXIT_SUCCESS; }