void output_program(PROGRAM prog) { int i; if (!prog) { puts(_("No program - null pointer")); return; } puts(_("Program contents:")); printf(_("Filename: %s\n"), prog->filename); if ( output_source ) { puts(_("--------- begin source ------------")); puts(prog->source); puts(_("---------- end source -------------")); } if ( use_metric != 2) { printf(_("Number of lexical atoms: %d\n"), prog->num_lex_atoms); if(verbose_flag) for(i=0; i<prog->num_lex_atoms; i++) atom_info(prog->lex_atoms[i]); } if ( use_metric ) { printf(_("Metrics values (as they follow, for reference read metrics.h):\n")); for(i=0; i < sizeof(struct metrics) / sizeof(int); i++) printf("%d ", *((int*)&prog->theMetrics + i)); printf("\n"); } }
static void cmdedit( void ) { double pt[ 3 ], r[ 3 ], c[ 3 ], h, xrot, yrot, rot; int i, j, n, vi, snum; csSetLayer( layer1 ); csMergePoints( 0 ); if ( atom_type == ATYPE_SPHERE ) { mgMonitorBegin( "Sphere Atoms", NULL, seqlen ); csSetLayer( layer1 ); for ( j = 0; j < seqlen; j++ ) { n = atom_count( seq[ j ] ); for ( i = 0; i < n; i++ ) { atom_info( seq[ j ], i, &vi, &snum ); vert_coords( seq[ j ], vi, pt ); transform_point( j * 3.4, j * 36.0, pt ); r[ 0 ] = r[ 1 ] = r[ 2 ] = atom_radius[ snum ]; csSetDefaultSurface( surface_name( snum )); csMakeBall( r, atom_nsides, atom_nsegments, pt ); } if ( userabort = mgMonitorStep( 1 )) break; } mgMonitorDone(); } if ( bond_type == BTYPE_CYLINDER && !userabort ) { mgMonitorBegin( "Cylinder Bonds", NULL, seqlen ); for ( j = 0; j < seqlen; j++ ) { n = bond_count( seq[ j ] ); for ( i = 0; i < n; i++ ) { bond_coords( seq[ j ], i, pt, &h, &xrot, &yrot, &snum ); pt[ 1 ] += 3.4 * j; csSetLayer( layer2 ); csSetDefaultSurface( surface_name( snum )); r[ 0 ] = r[ 1 ] = r[ 2 ] = bond_radius; c[ 0 ] = c[ 2 ] = 0.0; c[ 1 ] = h / 2.0; csMakeDisc( r, h, 0, "Y", bond_nsides, bond_nsegments, c ); csRotate( xrot, "X", NULL ); csRotate( yrot, "Y", NULL ); csMove( pt ); rot = 36 * j; csRotate( rot, "Y", NULL ); csCut(); csSetLayer( layer1 ); csPaste(); } if ( userabort = mgMonitorStep( 1 )) break; } mgMonitorDone(); } }
void info(int to, void *to_arg) { erts_memory(&to, to_arg, NULL, THE_NON_VALUE); atom_info(to, to_arg); module_info(to, to_arg); export_info(to, to_arg); register_info(to, to_arg); erts_fun_info(to, to_arg); erts_node_table_info(to, to_arg); erts_dist_table_info(to, to_arg); erts_allocated_areas(&to, to_arg, NULL); erts_allocator_info(to, to_arg); }
static void meshedit( void ) { double pt[ 3 ]; LWPntID id[ 57 ], vid[ 2 ]; int i, j, k, n, v[ 9 ], snum; csMeshBegin( 0, 0, OPSEL_GLOBAL ); if ( bond_type == BTYPE_LINE ) { mgMonitorBegin( "Line Bonds", NULL, seqlen ); for ( j = 0; j < seqlen; j++ ) { n = point_count( seq[ j ] ); for ( i = 0; i < n; i++ ) { vert_coords( seq[ j ], i, pt ); transform_point( j * 3.4, j * 36.0, pt ); id[ i ] = meAddPoint( pt ); } n = bond_count( seq[ j ] ); for ( i = 0; i < n; i++ ) { bond_info( seq[ j ], i, &v[ 0 ], &v[ 1 ], &snum ); vid[ 0 ] = id[ v[ 0 ]]; vid[ 1 ] = id[ v[ 1 ]]; meAddPoly( LWPOLTYPE_FACE, NULL, surface_name( snum ), 2, vid ); } if ( userabort = mgMonitorStep( 1 )) break; } mgMonitorDone(); } if ( atom_type == ATYPE_POINT && !userabort ) { mgMonitorBegin( "Point Atoms", NULL, seqlen ); for ( j = 0; j < seqlen; j++ ) { n = atom_count( seq[ j ] ); for ( i = 0; i < n; i++ ) { atom_info( seq[ j ], i, &v[ 0 ], &snum ); vert_coords( seq[ j ], v[ 0 ], pt ); transform_point( j * 3.4, j * 36.0, pt ); id[ 0 ] = meAddPoint( pt ); meAddPoly( LWPOLTYPE_FACE, NULL, surface_name( snum ), 1, &id[ 0 ] ); } if ( userabort = mgMonitorStep( 1 )) break; } mgMonitorDone(); } else if ( atom_type == ATYPE_DODEC && !userabort ) { mgMonitorBegin( "Dodecahedron Atoms", NULL, seqlen ); for ( j = 0; j < seqlen; j++ ) { n = atom_count( seq[ j ] ); for ( i = 0; i < n; i++ ) { atom_info( seq[ j ], i, &v[ 0 ], &snum ); vert_coords( seq[ j ], v[ 0 ], pt ); transform_point( j * 3.4, j * 36.0, pt ); dodec( pt, atom_radius[ snum ], surface_name( snum )); } if ( userabort = mgMonitorStep( 1 )) break; } mgMonitorDone(); } if ( do_plates && !userabort ) { mgMonitorBegin( "Base Plates", NULL, seqlen ); for ( j = 0; j < seqlen; j++ ) { for ( i = 0; i < 2; i++ ) { plate_info( seq[ j ], i, &n, v, &snum ); for ( k = 0; k < n; k++ ) { vert_coords( seq[ j ], v[ k ], pt ); transform_point( j * 3.4, j * 36.0, pt ); id[ k ] = meAddPoint( pt ); } meAddPoly( LWPOLTYPE_FACE, NULL, surface_name( snum ), n, id ); } if ( userabort = mgMonitorStep( 1 )) break; } mgMonitorDone(); } csMeshDone( EDERR_NONE, 0 ); }