/* GameID.h
 * Data structures for the !GameID utility
 */

#ifndef gameid_h
#define gameid_h

typedef struct gid_node
{
	int				size;		/* story_size */
	int				release;	/* h_release */
	char			serial[6];	/* h_serial */
	struct gid_node	*next;		/* ->next ID in the list */
} game_id_node;


typedef struct gam_node
{
	char			s[9];		/* the short name */
	char			*l;			/* the long name */
	game_id_node	*ids;		/* the IDs for this node */
	struct gam_node	*next;		/* ->next game in the list */
} game_node;


typedef game_node* gamelist;


gamelist add_game( gamelist gl, char *s, char *l, char *i );
gamelist add_game_id( gamelist gl, char *s, char *l, game_id_node *i );
char *ids_to_text( game_id_node *head, char *dest );
game_id_node *text_to_ids( char *ids );
void delete_list( gamelist gl );
game_node *identify_game( gamelist gl, game_id_node *id );



#endif
