-/* $NetBSD: struct.h,v 1.5 2003/08/07 09:36:54 agc Exp $ */
+/* $NetBSD: struct.h,v 1.10 2014/03/22 22:58:56 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
* 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 */
int width, height;
int update_secs;
int newplane_time;
- int num_exits;
- int num_lines;
- int num_beacons;
- int num_airports;
+ unsigned num_exits;
+ unsigned num_lines;
+ unsigned num_beacons;
+ unsigned num_airports;
EXIT *exit;
LINE *line;
BEACON *beacon;
AIRPORT *airport;
} C_SCREEN;
+enum places {
+ T_NODEST = 0,
+ T_BEACON = 1,
+ T_EXIT = 2,
+ T_AIRPORT = 3
+};
+
typedef struct plane {
struct plane *next, *prev;
int status;
int plane_no;
int plane_type;
- int orig_no;
- int orig_type;
- int dest_no;
- int dest_type;
+ unsigned orig_no;
+ enum places orig_type;
+ unsigned dest_no;
+ enum places dest_type;
int altitude;
int new_altitude;
int dir;
int fuel;
int xpos;
int ypos;
- int delayd;
- int delayd_no;
+ bool delayd;
+ unsigned delayd_no;
} PLANE;
typedef struct {
} LIST;
typedef struct {
- char name[10];
+ char name[33];
char host[256];
char game[256];
int planes;
} SCORE;
#define SCORE_SCANF_FMT "%9s %255s %255s %d %d %d"
+#define SCORE_NAME_LEN 33
+#define SCORE_GAME_LEN 256
typedef struct displacement {
int dx;