/***************************************************************************/ /* Killer List Of Video-games Database. */ /* Copyright (C) 1993 John Keay */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* */ /* For more details see 'COPYING' */ /* John Keay (keay@tiuk.ti.com) */ /***************************************************************************/ #define MAX_TOKEN_LEN 4096 #define MAX_LINE_LEN 4096 #define MAX_TEXT 4096 typedef enum {E_WARNING,E_FATAL } error_t; typedef struct { FILE *fp; FILE *err; char *filename; char *line; char *token; char *cptr; int eof; int token_pos; } parse_t,*parse_ptr; extern void parse_get_token PROTO((parse_ptr p)); extern parse_ptr parse_open PROTO((char *filename)); extern void parse_close PROTO((parse_ptr p)); extern int its PROTO((parse_ptr p,char *s)); extern int its_not PROTO((parse_ptr p,char *s)); extern void mustbe PROTO((parse_ptr p,char *s)); extern void *safe_malloc PROTO((unsigned size));