aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>1997-12-08 07:46:53 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>1997-12-08 07:46:53 +0000
commit38de36c41cfe5489fec3161d405eea55e8be6f98 (patch)
treeec6bb6eec4f78db349a0efbd63249ecf86555c4c /libexec
parent0a52caf8e9a289c5b1660317c3f49840e7e794d6 (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/telnetd/slc.c44
-rw-r--r--libexec/telnetd/state.c6
-rw-r--r--libexec/telnetd/utility.c2
3 files changed, 25 insertions, 27 deletions
diff --git a/libexec/telnetd/slc.c b/libexec/telnetd/slc.c
index f0c9835ea44c..9578e52629ce 100644
--- a/libexec/telnetd/slc.c
+++ b/libexec/telnetd/slc.c
@@ -36,14 +36,14 @@
static char sccsid[] = "@(#)slc.c 8.1 (Berkeley) 6/4/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: slc.c,v 1.6 1997/12/03 07:15:58 charnier Exp $";
#endif /* not lint */
#include "telnetd.h"
#ifdef LINEMODE
/*
- * local varibles
+ * local variables
*/
static unsigned char *def_slcbuf = (unsigned char *)0;
static int def_slclen = 0;
@@ -292,15 +292,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;
@@ -313,13 +313,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;
}
@@ -333,13 +333,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);
@@ -359,24 +359,23 @@ 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);
}
@@ -427,7 +426,6 @@ check_slc()
slctab[i].current.val);
}
}
-
} /* check_slc */
/*
diff --git a/libexec/telnetd/state.c b/libexec/telnetd/state.c
index 6693077881a5..aeb64bbf7167 100644
--- a/libexec/telnetd/state.c
+++ b/libexec/telnetd/state.c
@@ -1450,7 +1450,7 @@ doclientstat()
clientstat(TELOPT_LINEMODE, WILL, 0);
}
-#define ADD(c) *ncp++ = c;
+#define ADD(c) *ncp++ = c
#define ADD_DATA(c) { *ncp++ = c; if (c == SE) *ncp++ = c; }
void
send_status()
@@ -1502,14 +1502,14 @@ send_status()
ADD(SE);
if (restartany >= 0) {
- ADD(SB)
+ ADD(SB);
ADD(TELOPT_LFLOW);
if (restartany) {
ADD(LFLOW_RESTART_ANY);
} else {
ADD(LFLOW_RESTART_XON);
}
- ADD(SE)
+ ADD(SE);
ADD(SB);
}
}
diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c
index 4735be3c6f72..4d1f6a1d21a2 100644
--- a/libexec/telnetd/utility.c
+++ b/libexec/telnetd/utility.c
@@ -343,7 +343,7 @@ fatalperror(f, msg)
{
char buf[BUFSIZ], *strerror();
- (void) sprintf(buf, "%s: %s\r\n", msg, strerror(errno));
+ (void) sprintf(buf, "%s: %s", msg, strerror(errno));
fatal(f, buf);
}