Exemple #1
0
bool GetSampleInfo( void )
/************************/
{
    if( !initCurrSIO() ) {
        return( false );
    }
    if( !verifyHeader() ) {
        ClearSample( CurrSIOData );
        return( false );
    }
    if( !readSampleFile() ) {
        ClearSample( CurrSIOData );
        return( false );
    }
    /* there must be at least one address map for the first module, or */
    /* we cannot resolve overlays and do mapping.  Should generate an error*/
    if( !LoadImageOverlays() ) {
        ClearSample( CurrSIOData );
        return( false );
    }
    close( CurrSIOData->fh );
    /* do the SIOData sets near the end to make it easier to de-link */
    /* the new data if we have an error */
    if( SIOData == NULL ) {
        CurrSIOData->next = CurrSIOData;
    } else {
        CurrSIOData->next = SIOData->next;
        SIOData->next = CurrSIOData;
    }
    SIOData = CurrSIOData;
    SetSampleInfo( CurrSIOData );
    SamplePath[0] = 0;
    return( true );
}
Exemple #2
0
STATIC bool sampleEventProc( a_window *wnd, gui_event gui_ev, void *parm )
/************************************************************************/
{
    sio_data        *curr_sio;

    parm=parm;
    switch( gui_ev ) {
    case GUI_INIT_WINDOW:
        return( true );
    case GUI_FONT_CHANGED:
        WPSetRowHeight( wnd );
        return( true );
    case GUI_RESIZE:
        WPAdjustRowHeight( wnd, false );
        return( true );
    case GUI_NOW_ACTIVE:
        curr_sio = WndExtra( wnd );
        curr_sio->curr_proc_row = -WND_MAX_ROW;
        curr_sio->curr_display_row = -WND_MAX_ROW;
        WPDipSetProc( curr_sio->dip_process );
        SetCurrentMAD( curr_sio->config.mad );
        CurrSIOData = curr_sio;
        return( true );
    case WND_CURRENT_CHANGED:
        sampFixDirtyCurr( wnd );
        return( true );
    case GUI_DESTROY:
        curr_sio = WndExtra( wnd );
        if( curr_sio != NULL ) {
            ClearSample( curr_sio );
        }
        return( false );
    }
    return( false );
}