static void zhack_do_feature_stat(int argc, char **argv) { spa_t *spa; objset_t *os; char *target; argc--; argv++; if (argc < 1) { (void) fprintf(stderr, "error: missing pool name\n"); usage(); } target = argv[0]; zhack_spa_open(target, B_TRUE, FTAG, &spa); os = spa->spa_meta_objset; dump_obj(os, spa->spa_feat_for_read_obj, "for_read"); dump_obj(os, spa->spa_feat_for_write_obj, "for_write"); dump_obj(os, spa->spa_feat_desc_obj, "descriptions"); if (spa_feature_is_active(spa, SPA_FEATURE_ENABLED_TXG)) { dump_obj(os, spa->spa_feat_enabled_txg_obj, "enabled_txg"); } dump_mos(spa); spa_close(spa, FTAG); }
static void dump(void* contents, void* contents_end) { void* file_start = contents; if (strncmp(contents, ARMAG, SARMAG)) { uint32_t v = *(uint32_t*)contents; if (v == FAT_MAGIC || v == FAT_CIGAM) fatal("Fat archives are not supported by this tool.\n"); fatal("File does not start with '%s'.\n", ARMAG); } contents += SARMAG; while (contents < contents_end) { struct ar_hdr* header = (struct ar_hdr*)(contents); if (g_verbose) dump_obj(header); char* name; size_t name_len; int is_bsd_name = arobj_name(header, &name, &name_len); if(!strncmp(name, SYMDEF, name_len) || !strncmp(name, SYMDEF_SORTED, name_len)) { dump_symdefs(header, is_bsd_name ? name_len : 0, file_start); } contents += arobj_size(header); } }
void meshlodder(Mesh *mesh) { Mvert *mv; int x; int group, lod; if (mesh->numgroups>MAX_GROUPS) glueError("too many groups in mesh!"); loddermesh=mesh; // loop mesh groups for (group=0; group<mesh->numgroups; group++) { Object *obu=mesh->groups[group]; int vc=obu->vc; // if (obu->orig_indices) glueError("object contains splitted shit, no way jose!"); mv=malloc(sizeof(Mvert)*vc); for (x=0; x<vc; x++) { mv[x].pos=obu->vertices[x]; mv[x].parent=NPAR; } // fix parents for splitted vertices if (obu->orig_indices) { for (x=0; x<obu->linkcnt; x++) { int splitted, parent; splitted=obu->vertex_links[x*2+0]; parent=obu->vertex_links[x*2+1]; mv[splitted].parent=parent; } } // loop lods for (lod=0; lod<MAX_LOD_REDUCTION; lod++) { int killed; //int mergevertices(Mvert *data, int vc, int *indices, int fc) { killed=mergevertices(mv, vc, obu->indices, obu->fc); #ifdef DEBUG_LODDER glueNoticef("mergevertices group %i lod %i, vc=%i killed=%i", group, lod, vc, killed); #endif lodder_vertices[group][lod]=unpack_mvbuffer(mv, vc); #ifdef DEBUG_LODDER dump_obj(lodder_vertices[group][lod], vc, obu->indices, obu->fc); #endif //lodder_normals[group][lod]=calc_lodder_normals(lodder_vertices[group][lod], vc, i2, fc2); } // lod-loop free(mv); glueLoading(); } // mesh group loop }
servercontroller::servercontroller( QWidget*, const char* name ) : KMainWindow( 0, name ) { we_are_exiting = false; m_notificationCount = 0; m_ncm = new nickColourMaker(); MenuBar = menuBar(); KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() ); s_self = this; switch (ksopts->displayMode) { case KSOptions::SDI: displayMgr = new DisplayMgrSDI(); break; case KSOptions::MDI: displayMgr = new DisplayMgrMDI(); break; } sci = new scInside(this, QCString(name) + "_mainview"); setCentralWidget(sci); sci->setFrameStyle(QFrame::Box | QFrame::Raised); ConnectionTree = sci->ConnectionTree; connect(ConnectionTree, SIGNAL(clicked( QListViewItem * )), this, SLOT(WindowSelected(QListViewItem *))); setFrameBorderWidth(5); QPopupMenu *file = new QPopupMenu(this, QCString(name) + "_menu_file"); KStdAction::quit(this, SLOT(endksirc()), actionCollection())->plug(file); #ifndef NDEBUG file->insertItem(i18n("Dump Object Tree"), this, SLOT(dump_obj())); file->insertItem(i18n("Server Debug Window"), this, SLOT(server_debug())); #endif MenuBar->insertItem(i18n("&File"), file); connections = new QPopupMenu(this, QCString(name) + "_menu_connections"); server_id = connections->insertItem(i18n("&New Server..."), this, SLOT(new_connection()), Key_F2 ); join_id = connections->insertItem(i18n("&Join Channel..."), this, SLOT(new_channel()), Key_F3 ); connections->insertSeparator(); connections->insertItem(i18n("&Do Autoconnect..."), this, SLOT(start_autoconnect_check())); connections->setItemEnabled(join_id, FALSE); MenuBar->insertItem(i18n("&Connections"), connections); options = new QPopupMenu(this, QCString(name) + "_menu_options"); options->setCheckable(TRUE); options->insertItem(SmallIcon( "filter" ), i18n("&Filter Rule Editor..."), this, SLOT(filter_rule_editor())); options->insertSeparator(); KStdAction::configureNotifications(this, SLOT(notification_prefs()), actionCollection())->plug(options); KStdAction::preferences(this, SLOT(general_prefs()), actionCollection())->plug(options); MenuBar->insertItem(i18n("&Settings"), options); KHelpMenu *help = new KHelpMenu( this, kapp->aboutData() ); MenuBar->insertItem( KStdGuiItem::help().text(), help->menu() ); m_kga = new KGlobalAccel(this, "globalAccess"); m_kga->insert("New Server", i18n("New Server"), i18n("This action allows you to open a new server more easily " "when in docked mode, since you don't need to click on the " "dock icon."), ALT+CTRL+Key_C, KKey::QtWIN+CTRL+Key_C, this, SLOT(new_connection())); open_toplevels = 0; pic_server = UserIcon("server"); pic_gf = UserIcon("ksirc_a"); pic_run = UserIcon("mini-run"); pic_ppl = UserIcon("channels"); pic_icon = UserIcon("ksirc_b"); setCaption( i18n("Server Control") ); KWin::setIcons(winId(), pic_icon, pic_server); resize( 450,200 ); dockWidget = new dockServerController(this, 0x0, "servercontroller_dock"); KWin::setSystemTrayWindowFor( dockWidget->winId(), winId() ); m_kga->readSettings(); m_kga->updateConnections(); checkDocking(); }