/* data.h declarations for data.c */ extern int num_cities; extern int num_roads; struct rentry; typedef struct centry { char *name; int index; float lon, lat; struct rentry *roads; struct centry *next; } city_record; typedef struct rentry { char *name; float length; city_record *end1, *end2; struct rentry *next; } road_record; extern road_record ***adjacency_matrix; extern city_record **city_list; /* these two constants are used as 2nd argument to read_road_file */ #define MAKE_ADJACENCY_MATRIX 1 #define MAKE_GRAPH 2 int read_road_file(char *name, int wanted); int read_city_file(char *name); char *direction(city_record *c1, city_record *c2); city_record *find_in_dictionary(char *name); city_record *read_city(FILE *f); void print_city_data(void); void print_adjacency_matrix(void); void read_data(void); void print_data(void);