Ejemplo n.º 1
0
void PrintfUsage( void )
{
    char        msg_buff[MAX_MESSAGE_SIZE];
    unsigned    count;
    char        page_text[MAX_MESSAGE_SIZE];
    int         first_ln;

    count = PrintBanner();
#ifdef __OSI__
    if( _Copyright != NULL ) {
        puts( _Copyright );
        count += 1;
    }
#endif
    first_ln = MSG_USAGE_BASE;
    MsgGet( first_ln++, page_text );
    for( ; ; first_ln++ ) {
        if( ++count >= 23 ) {
            if( Wait_for_return( page_text ) ) {
                break;
            }
            count = 0;
        }
        MsgGet( first_ln, msg_buff );
        if( ( msg_buff[ 0 ] == '.' ) && ( msg_buff[ 1 ] == 0 ) )
            break;
        puts( msg_buff );
    }
}
Ejemplo n.º 2
0
void PrintfUsage( int first_ln )
{
    char        msg_buff[128];
    unsigned    count;

    count = trademark();
#ifdef __OSI__
    if( _Copyright != NULL ) {
        puts( _Copyright );
        count += 1;
    }
#endif
    for( ;; first_ln++ ) {
#ifndef __UNIX__
        if( ++count >= 23 ) {
            Wait_for_return();
            count = 0;
        }
#endif
        MsgGet( first_ln, msg_buff );
        if( ( msg_buff[ 0 ] == '.' ) && ( msg_buff[ 1 ] == 0 ) )
            break;
        puts( msg_buff );
    }
}
Ejemplo n.º 3
0
void Usage( void )
/****************/
{
    char                buff[ MAX_ERROR_SIZE ];
    int                 str;
    int                 str_first;
    int                 str_last;
    IDEMsgInfo          msg_info;
    int                 count;
    if( ideCb != NULL ) {
        msg_info.severity = IDEMSGSEV_BANNER;
        count = 3;
        msg_info.flags = 0;
        msg_info.helpfile = NULL;
        msg_info.helpid = 0;
        msg_info.msg = buff;
        if( Options.ar ) {
            str_first = USAGE_AR_FIRST;
            str_last = USAGE_AR_LAST;
        } else {
            str_first = USAGE_WLIB_FIRST;
            str_last = USAGE_WLIB_LAST;
        }
        for( str = str_first; str <= str_last; ++str ) {
            MsgGet( str, buff );
            if( ideInfo && ideInfo->ver > 2 && ideInfo->console_output &&
                ( count > 20 && buff[ 0 ] == '\0' || count == 24 ) ) {
                msg_info.msg = "    (Press Return to continue)" ;
                ideCb->PrintWithInfo( ideHdl, &msg_info );
                if( Wait_for_return() )
                    break;
                count = 0;
                msg_info.msg = buff;
            }
            ++count;
            if( buff[ 0 ] == '\0' ) {
                continue;
            }
            ideCb->PrintWithInfo( ideHdl, &msg_info );
        }
    }
    longjmp( Env, 1 );
}
Ejemplo n.º 4
0
void CCusage( void )
{
    char const  *page_text;
    char const  *p;
    unsigned    count;

    count = 2;
#ifdef __OSI__
    if( _Copyright != NULL ) {
        ConsMsg( _Copyright );
        count = 1;
    }
#endif
    p = UsageText();
    page_text = p;
    while( *(p = nextUsage( p )) != '\0' ) {
        if( ++count > 21 ) {
            Wait_for_return( page_text );
            count = 0;
        }
        ConsMsg( p );
    }
}