-/* $OpenBSD: commands.c,v 1.59 2014/07/20 05:22:02 guenther Exp $ */
+/* $OpenBSD: commands.c,v 1.60 2014/07/20 06:39:41 guenther Exp $ */
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */
/*
#include <netinet/ip.h>
#include <arpa/inet.h>
+#include <ctype.h>
#include <err.h>
#include <pwd.h>
#include <stdarg.h>
+#include <unistd.h>
int tos = -1;
}
while ((c = *cp)) {
int inquote = 0;
- while (isspace(c))
+ while (isspace((unsigned char)c))
c = *++cp;
if (c == '\0')
break;
} else if (c == '\'') {
inquote = '\'';
continue;
- } else if (isspace(c))
+ } else if (isspace((unsigned char)c))
break;
}
*cp2++ = c;
if (line[0] == '#')
continue;
if (gotmachine) {
- if (!isspace(line[0]))
+ if (!isspace((unsigned char)line[0]))
gotmachine = 0;
}
if (gotmachine == 0) {
- if (isspace(line[0]))
+ if (isspace((unsigned char)line[0]))
continue;
if (strncasecmp(line, m1, l1) == 0)
strncpy(line, &line[l1], sizeof(line) - l1);
-/* $OpenBSD: genget.c,v 1.3 2014/07/19 23:50:38 guenther Exp $ */
+/* $OpenBSD: genget.c,v 1.4 2014/07/20 06:39:41 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
#include <ctype.h>
#include "telnet_locl.h"
-#define LOWER(x) (isupper((int)x) ? tolower((int)x) : (x))
/*
* The prefix function returns 0 if *s1 is not a prefix
* of *s2. If *s1 exactly matches *s2, the negative of
os1 = s1;
c1 = *s1;
c2 = *s2;
- while (LOWER(c1) == LOWER(c2)) {
+ while (tolower((unsigned char)c1) == tolower((unsigned char)c2)) {
if (c1 == '\0')
break;
c1 = *++s1;
-/* $OpenBSD: main.c,v 1.24 2014/07/20 05:22:02 guenther Exp $ */
+/* $OpenBSD: main.c,v 1.25 2014/07/20 06:39:41 guenther Exp $ */
/* $NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $ */
/*
#include "telnet_locl.h"
-/* These values need to be the same as defined in libtelnet/kerberos5.c */
-/* Either define them in both places, or put in some common header file. */
-#define OPTS_FORWARD_CREDS 0x00000002
-#define OPTS_FORWARDABLE_CREDS 0x00000001
+#include <unistd.h>
int family = AF_UNSPEC;
int rtableid = -1;
-/* $OpenBSD: sys_bsd.c,v 1.17 2014/07/20 05:22:02 guenther Exp $ */
+/* $OpenBSD: sys_bsd.c,v 1.18 2014/07/20 06:39:41 guenther Exp $ */
/* $NetBSD: sys_bsd.c,v 1.11 1996/02/28 21:04:10 thorpej Exp $ */
/*
*/
#include "telnet_locl.h"
+
#include <sys/ioctl.h>
#include <poll.h>
+#include <unistd.h>
/*
* The following routines try to encapsulate what is system dependent
-/* $OpenBSD: telnet.c,v 1.22 2014/07/20 03:00:31 deraadt Exp $ */
+/* $OpenBSD: telnet.c,v 1.23 2014/07/20 06:39:41 guenther Exp $ */
/* $NetBSD: telnet.c,v 1.7 1996/02/28 21:04:15 thorpej Exp $ */
/*
*/
#include "telnet_locl.h"
+
+#include <ctype.h>
#include <curses.h>
#include <term.h>
#define ISASCII(c) (!((c)&0x80))
if ((c == ' ') || !ISASCII(c))
n = 1;
- else if (islower(c))
- *cp = toupper(c);
+ else
+ *cp = toupper((unsigned char)c);
}
/*
-/* $OpenBSD: telnet_locl.h,v 1.6 2014/07/20 05:22:02 guenther Exp $ */
+/* $OpenBSD: telnet_locl.h,v 1.7 2014/07/20 06:39:41 guenther Exp $ */
/* $KTH: telnet_locl.h,v 1.13 1997/11/03 21:37:55 assar Exp $ */
/*
#include <sys/types.h>
#include <sys/socket.h>
-#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <string.h>
#include <termios.h>
#include <time.h>
-#include <unistd.h>
#include <arpa/telnet.h>
-/* $OpenBSD: utilities.c,v 1.13 2014/07/20 05:22:02 guenther Exp $ */
+/* $OpenBSD: utilities.c,v 1.14 2014/07/20 06:39:41 guenther Exp $ */
/* $NetBSD: utilities.c,v 1.5 1996/02/28 21:04:21 thorpej Exp $ */
/*
#define SLC_NAMES
#include "telnet_locl.h"
+
+#include <ctype.h>
#include <poll.h>
FILE *NetTrace = 0; /* Not in bss, since needs to stay */
* Upcase (in place) the argument.
*/
- void
-upcase(argument)
- char *argument;
+void
+upcase(char *argument)
{
- int c;
+ int c;
- while ((c = *argument) != 0) {
- if (islower(c)) {
- *argument = toupper(c);
- }
- argument++;
- }
+ while ((c = *argument) != '\0')
+ *argument++ = toupper((unsigned char)c);
}
/*
break;
default:
- if (isprint(pointer[i]) && pointer[i] != '"') {
+ if (isprint((unsigned char)pointer[i]) &&
+ pointer[i] != '"') {
if (noquote) {
putc('"', NetTrace);
noquote = 0;