extern void WPInit( void ) /************************/ { char *rover; bint do_report; char buff[256]; #ifdef TRMEM TRMemOpen(); TRMemRedirect( STDOUT_FILENO ); #endif SamplePath[0] = 0; InitPaths(); rover = getenv( "WPROF" ); if( rover != NULL ) { procCmd( rover ); } getcmd( buff ); do_report = procCmd( buff ); WndInit( "Open Watcom Profiler" ); WPWndInitDone = P_TRUE; InitMADInfo(); WPDipInit(); if( do_report ) { if( GetSampleInfo() ) { ReportSampleInfo(); } exit( 0 ); } }
bool WndProcMacro( a_window wnd, gui_key key ) /********************************************/ { #if 0 int menu; menu=menu; #endif switch( key ) { case GUI_KEY_F3: WPFindDoPopUp( wnd, MENU_SAMP_ZOOM_IN ); return( true ); case GUI_KEY_F4: case GUI_KEY_BACKSPACE: WPFindDoPopUp( wnd, MENU_SAMP_BACK_OUT ); return( true ); case GUI_KEY_PERIOD: WPDoPopUp( wnd, NULL ); return( true ); #ifndef NDEBUG case GUI_KEY_CTRL_R: ReportSampleInfo(); return( true ); #endif default: return( false ); } /* for codes not handled by the pop-up */ #if 0 WndMainMenuProc( wnd, menu ); return( true ); #endif }