telnetd/UGStub.cpp
/*--- function ug_next_field  -----------------------------------
 *
 *  Move the current position to the first char of the next field.
 * 
 *  Entry:  conn_index  is the connection index.
 *          j           is the character position (0=top left)
 *                      from which to start.
 *
 *  Exit:   Returns the new current position.
 */
function ug_next_field
Move the current position to the first char of the next field.

conn_index  is the connection index.
j           is the character position (0=top left)
from which to start.

Returns the new current position.
function ug_next_field Move the current position to the first char of the next field . conn_index is the connection index . j is the character position ( 0 = top left ) from which to start . Returns the new current position .
short ug_next_field (int conn_index,
                  int j)
{
    boolean beep;
    boolean done;
    int16   col;
    int16   line;
    int16   start_pos;
   UG_LOAD_TEL_SCREEN
    done = FALSE;
    beep = FALSE;
    start_pos = j;
    if(IsUnisysTerm(conn_index)) {
    while (!done)
    {
        if ( (tel_screen->buffer[j] == US) &&
             !emf_check_for_end(tel_screen,j+1) )
        {
            j++;
            line = j / 80;
            col = j % 80;
            tel_screen->scr_pos = j;
            done = TRUE;
            tel_screen->term_mode = TELTERM_LEFT_JUST;
        }
        else if ( (tel_screen->buffer[j] == GS) &&
                  !emf_check_for_end(tel_screen,j+1) )
        {
            j++;
            while ( (j < SCRSIZE) &&
                    !emf_check_for_end(tel_screen,j) )
                j++;
            j--;
            line = j / 80;
            col = j % 80;
            tel_screen->scr_pos = j;
            done = TRUE;
            tel_screen->term_mode = TELTERM_RIGHT_JUST;
        }
        else
        {
            j++;
            if (j >= SCRSIZE)
            {
                j = 0;
                beep = TRUE;
            }
            if (j == start_pos)
                done = TRUE;
        }
    }
    } else {
      int fieldpos = ibm_next_unprot_field_with_wrap(tel_screen,j);
      tel_screen->scr_pos = fieldpos+1;
    }
    return(tel_screen->scr_pos);
}
short ug_next_field ( int conn_index , int j ) { boolean beep ; boolean done ; int16 col ; int16 line ; int16 start_pos ; UG_LOAD_TEL_SCREEN done = FALSE ; beep = FALSE ; start_pos = j ; if ( IsUnisysTerm ( conn_index ) ) { while ( ! done ) { if ( ( tel_screen -> buffer [ j ] == US ) && ! emf_check_for_end ( tel_screen , j + 1 ) ) { j ++ ; line = j / 80 ; col = j % 80 ; tel_screen -> scr_pos = j ; done = TRUE ; tel_screen -> term_mode = TELTERM_LEFT_JUST ; } else if ( ( tel_screen -> buffer [ j ] == GS ) && ! emf_check_for_end ( tel_screen , j + 1 ) ) { j ++ ; while ( ( j < SCRSIZE ) && ! emf_check_for_end ( tel_screen , j ) ) j ++ ; j -- ; line = j / 80 ; col = j % 80 ; tel_screen -> scr_pos = j ; done = TRUE ; tel_screen -> term_mode = TELTERM_RIGHT_JUST ; } else { j ++ ; if ( j >= SCRSIZE ) { j = 0 ; beep = TRUE ; } if ( j == start_pos ) done = TRUE ; } } } else { int fieldpos = ibm_next_unprot_field_with_wrap ( tel_screen , j ) ; tel_screen -> scr_pos = fieldpos + 1 ; } return ( tel_screen -> scr_pos ) ; }
function ug_next_field
  Move the current position to the first char of the next field.
function ug_next_field Move the current position to the first char of the next field .
/*
=  DESCRIPTION:     
=
=  RETURNS:  NONE
=
=  SEE ALSO:
=
=  FILES:
=
=  BUGS/NOTES:
=
= $ENDDOC
========================================================================== */ //vt100_scr_pos(line + 1, col + 1, tcb_id); //vt100_scr_pos(line + 1, col + 1, tcb_id); /* So that we don't get hung up
                DAE 8/2/93    found at GM*/ // IBM terminal