/***************************************************************************/
/*  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_PARAMS 10

typedef enum { CND_NONE,CND_LT,CND_LE,CND_GT,CND_GE,CND_EQ,CND_NE } condition_t;

typedef enum { C_NONE, C_AMB, C_QUIT, C_FIND, C_LONG, C_BRIEF,
               C_HELP, C_LOG, C_READ, C_APPEND, NUM_CMD } type_t;

typedef struct {
  char    *cmd;
  type_t   type;
} command_t;

extern int my_strncasecmp PROTO((char *s1,char *s2,unsigned n));
extern condition_t get_condition PROTO((char *s));
extern int find_number PROTO((char *s));
extern int my_compare PROTO((char *s,char *k));
extern void list_matches PROTO((list_ptr l,game_ptr k,FILE *fp,print_fn fn));
extern void prompt PROTO((char *p,char *s,FILE *fp));
extern game_ptr get_search_key PROTO((FILE *fp));
extern void split_string PROTO((char *s,int *argc,char *argv[MAX_PARAMS]));
extern type_t check_commands PROTO((char *cmd,int *margc,char *margv[MAX_PARAMS]));
extern int main PROTO((int argc,char *argv[]));
