libexec/telnetd/slc.c
/*
 * check_slc
 *
 * Check the special characters in use and notify the client if any have
 * changed.  Only those characters that are capable of being changed are
 * likely to have changed.  If a local change occurs, kick the support level
 * and flags up to the defaults.
 */
check_slc
Check the special characters in use and notify the client if any have
changed.  Only those characters that are capable of being changed are
likely to have changed.  If a local change occurs, kick the support level
and flags up to the defaults.
check_slc Check the special characters in use and notify the client if any have changed . Only those characters that are capable of being changed are likely to have changed . If a local change occurs kick the support level and flags up to the defaults .
void
check_slc()
{
	register int i;
	for (i = 1; i <= NSLC; i++) {
#if	defined(USE_TERMIO) && (VEOF == VMIN)
		if (i == SLC_EOF) {
			if (!tty_isediting())
				continue;
			else if (slctab[i].sptr)
				oldeofc = *(slctab[i].sptr);
		}
#endif	
		if (slctab[i].sptr &&
				(*(slctab[i].sptr) != slctab[i].current.val)) {
			slctab[i].current.val = *(slctab[i].sptr);
			if (*(slctab[i].sptr) == (cc_t)_POSIX_VDISABLE)
				slctab[i].current.flag = SLC_NOSUPPORT;
			else
				slctab[i].current.flag = slctab[i].defset.flag;
			add_slc((unsigned char)i, slctab[i].current.flag,
						slctab[i].current.val);
		}
	}
}
void check_slc ( ) { register int i ; for ( i = 1 ; i <= NSLC ; i ++ ) { #if defined ( USE_TERMIO ) && ( VEOF == VMIN ) if ( i == SLC_EOF ) { if ( ! tty_isediting ( ) ) continue ; else if ( slctab [ i ] . sptr ) oldeofc = * ( slctab [ i ] . sptr ) ; } #endif if ( slctab [ i ] . sptr && ( * ( slctab [ i ] . sptr ) != slctab [ i ] . current . val ) ) { slctab [ i ] . current . val = * ( slctab [ i ] . sptr ) ; if ( * ( slctab [ i ] . sptr ) == ( cc_t ) _POSIX_VDISABLE ) slctab [ i ] . current . flag = SLC_NOSUPPORT ; else slctab [ i ] . current . flag = slctab [ i ] . defset . flag ; add_slc ( ( unsigned char ) i , slctab [ i ] . current . flag , slctab [ i ] . current . val ) ; } } }
check_slc
 Check the special characters in use and notify the client if any have
 changed.
check_slc Check the special characters in use and notify the client if any have changed .
/*
		 * In a perfect world this would be a neat little
		 * function.  But in this world, we should not notify
		 * client of changes to the VEOF char when
		 * ICANON is off, because it is not representing
		 * a special character.
		 */ /* defined(USE_TERMIO) && defined(SYSV_TERMIO) */