use more suitable types
This commit is contained in:
parent
6b884adb36
commit
66a360a4e6
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: input.c,v 1.25 2014/03/22 22:24:21 dholland Exp $ */
|
||||
/* $NetBSD: input.c,v 1.26 2014/03/22 22:45:05 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -46,7 +46,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: input.c,v 1.25 2014/03/22 22:24:21 dholland Exp $");
|
||||
__RCSID("$NetBSD: input.c,v 1.26 2014/03/22 22:45:05 dholland Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -393,7 +393,7 @@ setplane(int c)
|
||||
if (pp == NULL)
|
||||
return ("Unknown Plane");
|
||||
(void)memcpy(&p, pp, sizeof (p));
|
||||
p.delayd = 0;
|
||||
p.delayd = false;
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -474,7 +474,7 @@ delayb(int ch)
|
||||
ydiff = SGN(ydiff);
|
||||
if (xdiff != displacement[p.dir].dx || ydiff != displacement[p.dir].dy)
|
||||
return ("Beacon is not in flight path");
|
||||
p.delayd = 1;
|
||||
p.delayd = true;
|
||||
p.delayd_no = bn;
|
||||
|
||||
if (dest_type != T_NODEST) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: struct.h,v 1.8 2014/03/22 22:33:35 dholland Exp $ */
|
||||
/* $NetBSD: struct.h,v 1.9 2014/03/22 22:45:05 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -43,6 +43,8 @@
|
||||
* For more info on this and all of my stuff, mail edjames@berkeley.edu.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
int x, y;
|
||||
int dir; /* used only sometimes */
|
||||
@ -86,8 +88,8 @@ typedef struct plane {
|
||||
int fuel;
|
||||
int xpos;
|
||||
int ypos;
|
||||
int delayd;
|
||||
int delayd_no;
|
||||
bool delayd;
|
||||
unsigned delayd_no;
|
||||
} PLANE;
|
||||
|
||||
typedef struct {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: update.c,v 1.23 2014/03/22 22:24:21 dholland Exp $ */
|
||||
/* $NetBSD: update.c,v 1.24 2014/03/22 22:45:05 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -46,7 +46,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: update.c,v 1.23 2014/03/22 22:24:21 dholland Exp $");
|
||||
__RCSID("$NetBSD: update.c,v 1.24 2014/03/22 22:45:05 dholland Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -124,7 +124,7 @@ update(int dummy __unused)
|
||||
|
||||
if (pp->delayd && pp->xpos == sp->beacon[pp->delayd_no].x &&
|
||||
pp->ypos == sp->beacon[pp->delayd_no].y) {
|
||||
pp->delayd = 0;
|
||||
pp->delayd = false;
|
||||
if (pp->status == S_UNMARKED)
|
||||
pp->status = S_MARKED;
|
||||
}
|
||||
@ -249,7 +249,7 @@ command(const PLANE *pp)
|
||||
bp = strchr(buf, '\0');
|
||||
bpsize = buf + sizeof(buf) - bp;
|
||||
if (pp->delayd)
|
||||
(void)snprintf(bp, bpsize, " @ B%d", pp->delayd_no);
|
||||
(void)snprintf(bp, bpsize, " @ B%u", pp->delayd_no);
|
||||
|
||||
bp = strchr(buf, '\0');
|
||||
bpsize = buf + sizeof(buf) - bp;
|
||||
|
Loading…
Reference in New Issue
Block a user