From 2b1b33dbf5144e2190a0dc9963afa23ce93aa7af Mon Sep 17 00:00:00 2001 From: dholland Date: Sat, 22 Mar 2014 22:58:56 +0000 Subject: Make the list of place types an enumeration. Use unsigned values for place numbers. --- atc/struct.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'atc/struct.h') diff --git a/atc/struct.h b/atc/struct.h index ad5361dd..52ba1dcf 100644 --- a/atc/struct.h +++ b/atc/struct.h @@ -1,4 +1,4 @@ -/* $NetBSD: struct.h,v 1.9 2014/03/22 22:45:05 dholland Exp $ */ +/* $NetBSD: struct.h,v 1.10 2014/03/22 22:58:56 dholland Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -72,15 +72,22 @@ typedef struct { 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; -- cgit v1.2.3