char -> unsigned char
<fcntl.h> instead of <sys/file.h> compensate for different types in th_stuff
This commit is contained in:
parent
719b192026
commit
e42e202cfb
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.9 1997/10/20 00:46:37 lukem Exp $ */
|
||||
/* $NetBSD: main.c,v 1.10 1998/12/19 22:41:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.9 1997/10/20 00:46:37 lukem Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.10 1998/12/19 22:41:21 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -51,13 +51,13 @@ __RCSID("$NetBSD: main.c,v 1.9 1997/10/20 00:46:37 lukem Exp $");
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
@ -660,13 +660,13 @@ makeargv()
|
||||
|
||||
margc = 0;
|
||||
for (cp = line; *cp;) {
|
||||
while (isspace(*cp))
|
||||
while (isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
if (*cp == '\0')
|
||||
break;
|
||||
*argp++ = cp;
|
||||
margc += 1;
|
||||
while (*cp != '\0' && !isspace(*cp))
|
||||
while (*cp != '\0' && !isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
if (*cp == '\0')
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tftp.c,v 1.8 1998/07/26 15:26:18 mycroft Exp $ */
|
||||
/* $NetBSD: tftp.c,v 1.9 1998/12/19 22:41:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tftp.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: tftp.c,v 1.8 1998/07/26 15:26:18 mycroft Exp $");
|
||||
__RCSID("$NetBSD: tftp.c,v 1.9 1998/12/19 22:41:21 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -316,7 +316,11 @@ makerequest(request, name, tp, mode)
|
||||
char *cp;
|
||||
|
||||
tp->th_opcode = htons((u_short)request);
|
||||
#ifndef __SVR4
|
||||
cp = tp->th_stuff;
|
||||
#else
|
||||
cp = (void *)&tp->th_stuff;
|
||||
#endif
|
||||
strcpy(cp, name);
|
||||
cp += strlen(name);
|
||||
*cp++ = '\0';
|
||||
@ -395,7 +399,12 @@ tpacket(s, tp, n)
|
||||
case RRQ:
|
||||
case WRQ:
|
||||
n -= 2;
|
||||
file = cp = tp->th_stuff;
|
||||
#ifndef __SVR4
|
||||
cp = tp->th_stuff;
|
||||
#else
|
||||
cp = (void *) &tp->th_stuff;
|
||||
#endif
|
||||
file = cp;
|
||||
cp = strchr(cp, '\0');
|
||||
printf("<file=%s, mode=%s>\n", file, cp + 1);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user