void    SendInt( intstar4 num ) {
//===============================

    char        num_buff[MAX_INT_SIZE+1];

    ltoa( num, num_buff, 10 );
    SendWSLStr( num_buff );
}
Exemple #2
0
static  void    NmlOut( void ) {
//========================

    byte        PGM *nml;
    byte        len;
    byte        info;
    PTYPE       typ;
    unsigned_32 num_elts;
    byte        PGM *data;
    string      scb;
    lg_adv      PGM *adv_ptr;

    nml = (byte PGM *)(IOCB->fmtptr);
    len = *nml; // get length of NAMELIST name
    ++nml;
    Drop( ' ' );
    Drop( '&' );
    SendStr( (char *)nml, len );
    nml += len;
    SendEOR();
    for(;;) {
        len = *nml;
        if( len == 0 ) break;
        ++nml;
        Drop( ' ' );
        SendStr( (char *)nml, len );
        nml += len;
        SendWSLStr( " = " );
        info = *nml;
        ++nml;
        typ = _GetNMLType( info );
        IOCB->typ = typ;
        if( _GetNMLSubScrs( info ) ) {
            if( info & NML_LG_ADV ) {
                adv_ptr = *(lg_adv PGM * PGM *)nml;
                num_elts = adv_ptr->num_elts;
                if( typ == PT_CHAR ) {
                    scb.len = adv_ptr->elt_size;
                    scb.strptr = (char PGM *)adv_ptr->origin;
                } else {
                    data = (byte PGM *)adv_ptr->origin;
                }
            } else {
                num_elts = *(unsigned_32 PGM *)nml;
                nml += sizeof( unsigned_32 ) + _GetNMLSubScrs( info ) *
                                   ( sizeof( unsigned_32 ) + sizeof( int ) );
                if( typ == PT_CHAR ) {
                    scb.len = *(uint PGM *)nml;
                    nml += sizeof( uint );
                    scb.strptr = *(char PGM * PGM *)nml;
                } else {
void    F_SendData( char *str, uint width ) {
//===========================================
    int         blanks;
    ftnfile     *fcb;

    fcb = IOCB->fileinfo;
    if( fcb->col + width > fcb->bufflen ) {
        SendEOR();
    }
    blanks = width - strlen( str );
    if( blanks < 0 ) {
        SendChar( '*', width );
    } else {
        SendChar( ' ', blanks );
        SendWSLStr( str );
    }
}
void    SendLine( char *str ) {
//=============================

    SendWSLStr( str );
    SendEOR();
}