extern void CGTrash( n *nd ) { /********************************/ Action( "CGTrash( %t )%n%n", nd ); VerNode( nd ); DumpT( nd ); }
/* verification */ extern void CGDone( n *nd ) { /*******************************/ // CGError( "OOPS!" ); Action( "CGDone( %t )%n%n", nd ); VerNode( nd ); DumpTree( nd ); NoDanglers(); }
extern void PutFmt( int out, const char *str, va_list list ) { char *str2; char buff[80]; char c; while( *str ) { if( *str == '%' ) { ++str; switch( *str ) { case '%': FPut( out, str, 1 ); break; case 'd': str2 = DoIToS( buff, 79, va_arg( list, int ) ); while( *str2 ) { FPut( out, str2++, 1 ); } break; case 'l': str2 = DoIToS( buff, 79, va_arg( list, signed_32 ) ); while( *str2 ) { FPut( out, str2++, 1 ); } break; case 'p': case 'h': str2 = DoIToHS( buff, 79, va_arg( list, int ) ); while( *str2 ) { FPut( out, str2++, 1 ); } break; case 'c': c = va_arg( list, char ); FPut( out, &c, 1 ); break; case 's': str2 = va_arg( list, char * ); while( *str2 ) { FPut( out, str2++, 1 ); } break; case 'n': FPut( out, "\n", 1 ); break; case 't': { n *nd; nd = va_arg( list, n * ); if( nd != NULL ) { VerNode( nd ); } str2 = nd != NULL ? DoIToS( buff, 79, nd->id ) : "NULL"; FPut( out, "c", 1 ); FPut( out, "g", 1 ); FPut( out, "(", 1 ); while( *str2 ) { FPut( out, str2++, 1 ); } FPut( out, ")", 1 ); break; } default: FPut( out, "ZOIKS", 5 ); } ++str; } else {