0001 #include "print.h" 0002 0003 /****************************************************************************************** 0004 * 0005 ******************************************************************************************/ 0006 void UniPrint::p ( int e ) { printf ( " %04d", e ); } 0007 void UniPrint::p ( float e ) { printf ( " %4.3f", e ); } 0008 void UniPrint::p ( double e ) { printf ( " %4.3f", e ); } 0009 void UniPrint::p ( char e ) { printf ( " %c", ( 31 < e ) && ( e < 128 ) ? e : '$' ); } 0010 void UniPrint::p ( VStatus e ) { 0011 switch ( e ) { 0012 case UNDISCOVERED: printf ( "U" ); break; 0013 case DISCOVERED: printf ( "D" ); break; 0014 case VISITED: printf ( "V" ); break; 0015 default: printf ( "X" ); break; 0016 } 0017 } 0018 void UniPrint::p ( EType e ) { 0019 switch ( e ) { 0020 case UNDETERMINED: printf ( "U" ); break; 0021 case TREE: printf ( "T" ); break; 0022 case CROSS: printf ( "C" ); break; 0023 case BACKWARD: printf ( "B" ); break; 0024 case FORWARD: printf ( "F" ); break; 0025 default: printf ( "X" ); break; 0026 } 0027 }