void show_version (void) { size_t i; printf (_("GNU Midnight Commander %s\n"), VERSION); printf (_("Built with GLib %d.%d.%d\n"), GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); for (i = 0; features[i] != NULL; i++) printf ("%s", _(features[i])); #ifdef ENABLE_VFS printf (_("Virtual File Systems:")); for (i = 0; vfs_supported[i] != NULL; i++) printf ("%s %s", i == 0 ? "" : ",", _(vfs_supported[i])); printf ("\n"); #endif /* ENABLE_VFS */ (void) printf (_("Data types:")); #define TYPE_INFO(T) \ (void)printf(" %s: %d;", #T, (int) (CHAR_BIT * sizeof(T))) TYPE_INFO (char); TYPE_INFO (int); TYPE_INFO (long); TYPE_INFO (void *); TYPE_INFO (size_t); TYPE_INFO (off_t); #undef TYPE_INFO (void) printf ("\n"); }
void GvPath::GetCumulativeTransform(Transform3 *T) { T->Identity(); int i; for (i=0; i<mAncestryLength; ++i) { Geom *g = mAncestry[i]; if (g->IsInstanceOf(TYPE_INFO(GeomWrapped))) { Transform3 *M = ((GeomWrapped*)g)->GetTransform(); // Explanation of the order of multiplication: Our // transform libarary treats data points as row vectors; // transforms act on them by right multiplication, i.e. // [point] * [matrix] = [new point]. Transforms lower in // the heirarchy are closer to the data points (the one // just above the leaf node Geom being the one that acts // on it first), so the order in which the product of // transformations act on a point is: // [point] * [transf n] * ... * [transf 1] * [transf 0] // = [new point] // At this point, we've accumulated the product // [transf i-1] ... [transf 0] // in T, and we're about to multiply it by [transf i] // (which is in M), so the order should be M * T. T->Concat(M, T); } } }
Transform3 *GvPath::GetLocalTransform() { if (mAncestryLength <= 1) { return &Transform3::IDENTITY; } Geom *parent = mAncestry[mAncestryLength-2]; if (!parent->IsInstanceOf(TYPE_INFO(GeomWrapped))) { return NULL; } return ((GeomWrapped*)parent)->GetTransform(); }
void show_version (int verbose) { int i; printf (_("GNU Midnight Commander %s\n"), VERSION); if (!verbose) return; #ifdef USE_VFS printf (_("Virtual File System:")); for (i = 0; vfs_supported[i]; i++) { if (i == 0) printf (" "); else printf (", "); printf ("%s", _(vfs_supported[i])); } printf ("\n"); #endif /* USE_VFS */ for (i = 0; features[i]; i++) printf ("%s", _(features[i])); (void)printf("Data types:"); #define TYPE_INFO(T) \ (void)printf(" %s %d", #T, (int) (CHAR_BIT * sizeof(T))) TYPE_INFO(char); TYPE_INFO(int); TYPE_INFO(long); TYPE_INFO(void *); TYPE_INFO(off_t); TYPE_INFO(ecs_char); #undef TYPE_INFO (void)printf("\n"); }
void TreeDlg::InsertGeomSubTree(Geom *g, HTREEITEM hParent) { GetDlgItems(); if (g != NULL) { HTREEITEM hItem = mpTreeCtrl->InsertItem(g->GetType()->mpName, hParent); if (g->IsInstanceOf(TYPE_INFO(GeomParent))) { GeomParent *p = (GeomParent*)g; int childCount = p->GetChildCount(); for (int i=0; i<childCount; ++i) { InsertGeomSubTree(p->GetChild(i), hItem); } } } }
int GvPath::FindStack(UtLStack<Geom *> *stack, Geom *geom) { Geom *g = *(stack->Top()); if ( g == geom ) { return 1; } if (g->IsInstanceOf(TYPE_INFO(GeomParent))) { GeomParent *p = (GeomParent*)g; int nchildren = p->GetChildCount(); for (int i=0; i<nchildren; ++i) { (*(stack->Push())) = p->GetChild(i); if (FindStack(stack, geom)) { return 1; } stack->Pop(); } } return 0; }
/* XXX should break btree overhead out into its own _s include file */ #include "page.h" #include "btree_p.h" #endif #define TYPE_INFO(type) { #type , sizeof(type) } #define SIZE_INFO(size) { #size, size } struct smsh_type_info_t { const char *type; size_t size; }; static const smsh_type_info_t smsh_type_info[] = { TYPE_INFO(rid_t), TYPE_INFO(stid_t), TYPE_INFO(sdesc_t), TYPE_INFO(vec_t), TYPE_INFO(cvec_t), TYPE_INFO(vid_t), TYPE_INFO(lvid_t), TYPE_INFO(smthread_t), TYPE_INFO(sthread_t), // TYPE_INFO(store_property_t), TYPE_INFO(key_info_t), TYPE_INFO(sort_keys_t), TYPE_INFO(smsize_t), // TYPE_INFO(smksize_t), TYPE_INFO(sm_du_stats_t), TYPE_INFO(SmVolumeMetaStats),
RTTItypeid ossimObject::getType()const { return TYPE_INFO(this); }