diff options
author | markm <markm@FreeBSD.org> | 1997-09-07 07:02:53 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 1997-09-07 07:02:53 +0000 |
commit | cd2a6be22c3f5c010eb7ec63c77cd0699a832567 (patch) | |
tree | 316b7a514809054240510520a7e779098c17795e /crypto/telnet/telnetd/slc.c | |
parent | 2075d422d2e14fa0f55c71e4790fd46d0979a7a1 (diff) | |
download | FreeBSD-src-cd2a6be22c3f5c010eb7ec63c77cd0699a832567.zip FreeBSD-src-cd2a6be22c3f5c010eb7ec63c77cd0699a832567.tar.gz |
Bring the FreeBSD changes to the virgin sources.
Diffstat (limited to 'crypto/telnet/telnetd/slc.c')
-rw-r--r-- | crypto/telnet/telnetd/slc.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/crypto/telnet/telnetd/slc.c b/crypto/telnet/telnetd/slc.c index 6cbb7ab..9579d0d 100644 --- a/crypto/telnet/telnetd/slc.c +++ b/crypto/telnet/telnetd/slc.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)slc.c 8.2 (Berkeley) 5/30/95"; +static const char sccsid[] = "@(#)slc.c 8.2 (Berkeley) 5/30/95"; #endif /* not lint */ #include "telnetd.h" @@ -288,15 +288,15 @@ change_slc(func, flag, val) register int hislevel, mylevel; hislevel = flag & SLC_LEVELBITS; - mylevel = slctab[func].defset.flag & SLC_LEVELBITS; + mylevel = slctab[(int)func].defset.flag & SLC_LEVELBITS; /* * If client is setting a function to NOSUPPORT * or DEFAULT, then we can easily and directly * accomodate the request. */ if (hislevel == SLC_NOSUPPORT) { - slctab[func].current.flag = flag; - slctab[func].current.val = (cc_t)_POSIX_VDISABLE; + slctab[(int)func].current.flag = flag; + slctab[(int)func].current.val = (cc_t)_POSIX_VDISABLE; flag |= SLC_ACK; add_slc(func, flag, val); return; @@ -309,13 +309,13 @@ change_slc(func, flag, val) * default level of DEFAULT. */ if (mylevel == SLC_DEFAULT) { - slctab[func].current.flag = SLC_NOSUPPORT; + slctab[(int)func].current.flag = SLC_NOSUPPORT; } else { - slctab[func].current.flag = slctab[func].defset.flag; + slctab[(int)func].current.flag = slctab[(int)func].defset.flag; } - slctab[func].current.val = slctab[func].defset.val; - add_slc(func, slctab[func].current.flag, - slctab[func].current.val); + slctab[(int)func].current.val = slctab[(int)func].defset.val; + add_slc(func, slctab[(int)func].current.flag, + slctab[(int)func].current.val); return; } @@ -329,13 +329,13 @@ change_slc(func, flag, val) * the place to put the new value, so change it, * otherwise, continue the negotiation. */ - if (slctab[func].sptr) { + if (slctab[(int)func].sptr) { /* * We can change this one. */ - slctab[func].current.val = val; - *(slctab[func].sptr) = val; - slctab[func].current.flag = flag; + slctab[(int)func].current.val = val; + *(slctab[(int)func].sptr) = val; + slctab[(int)func].current.flag = flag; flag |= SLC_ACK; slcchange = 1; add_slc(func, flag, val); @@ -355,22 +355,22 @@ change_slc(func, flag, val) * our value as well. */ if (mylevel == SLC_DEFAULT) { - slctab[func].current.flag = flag; - slctab[func].current.val = val; + slctab[(int)func].current.flag = flag; + slctab[(int)func].current.val = val; flag |= SLC_ACK; } else if (hislevel == SLC_CANTCHANGE && mylevel == SLC_CANTCHANGE) { flag &= ~SLC_LEVELBITS; flag |= SLC_NOSUPPORT; - slctab[func].current.flag = flag; + slctab[(int)func].current.flag = flag; } else { flag &= ~SLC_LEVELBITS; flag |= mylevel; - slctab[func].current.flag = flag; + slctab[(int)func].current.flag = flag; if (mylevel == SLC_CANTCHANGE) { - slctab[func].current.val = - slctab[func].defset.val; - val = slctab[func].current.val; + slctab[(int)func].current.val = + slctab[(int)func].defset.val; + val = slctab[(int)func].current.val; } } add_slc(func, flag, val); |