/* * main program */ int main( int argc, char *argv[]) { int status; time_t t; /* * print start of test time time( &t); fprintf( stdout, "for bxm156 start time: %s", ctime( &t)); */ /* * initialize or constructor, init */ if(( status = java2cpp_init())) { fprintf( stderr, "Error: init: %d\n", status); return status; } /* * process the command line args */ while( --argc) java2cpp_process_flags( *++argv); /* * check if no files parsed */ if( ! IS_FLAGS_PARSE( data.flags)) { /* * so use stdin and call the parser */ if(( status = yyparse())) { fprintf( stderr, "Error: yyparse %d\n", status); } } /* * deinitialize or destructor, exit */ if(( status = java2cpp_exit())) { fprintf( stderr, "Error: exit: %d\n", status); } return status; }
/******************************************************************************* * main program ******************************************************************************/ int main( int argc, char *argv[]) { int status; time_t t; /* * print start of test time */ time( &t); fprintf( stdout, "for djz24 start time: %s", ctime( &t)); /* * initialize or constructor, init */ if(( status = main_init())) { fprintf( stderr, "Error: init: %d\n", status); return status; } /* * check command line */ while( --argc) main_process_flags( *++argv); /* * check if no files parsed */ if( ! IS_FLAGS_PARSE( data.flags)) { /* * so use stdin and call the parser */ printf( "Enter calculator expression and $ to exit\n"); if(( status = yyparse())) { fprintf( stderr, "Error: yyparse %d\n", status); } } /* * deinitialize or destructor, exit */ if(( status = main_exit())) { fprintf( stderr, "Error: exit: %d\n", status); } return status; }