]> git.sesse.net Git - pgn-extract/blob - lists.h
Push through a computer/human flag to the binary output.
[pgn-extract] / lists.h
1 /*
2  *  Program: pgn-extract: a Portable Game Notation (PGN) extractor.
3  *  Copyright (C) 1994-2014 David Barnes
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 1, or (at your option)
7  *  any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  *
18  *  David Barnes may be contacted as D.J.Barnes@kent.ac.uk
19  *  http://www.cs.kent.ac.uk/people/staff/djb/
20  *
21  */
22
23         /* Define values for the amount of space to initially malloc
24          * and incrementally realloc in a list.
25          */
26 #define INIT_LIST_SPACE 10
27 #define MORE_LIST_SPACE 5
28
29         /* Tags to be sought may have an operator to specify the
30          * relationship between value in the tag list and that in
31          * the game. For instance, in order to find games before 1962
32          * use Date < "1962". The < turns into a LESS_THAN operator.
33          * Potentially any tag may have an operator, but not all make
34          * sense in all circumstances.
35          */
36 typedef enum {
37     NONE,
38     LESS_THAN, GREATER_THAN, EQUAL_TO, NOT_EQUAL_TO,
39     LESS_THAN_OR_EQUAL_TO, GREATER_THAN_OR_EQUAL_TO
40 } TagOperator;
41
42 void extract_tag_argument(const char *argstr);
43 void add_tag_to_list(int tag,const char *tagstr,TagOperator operator);
44 Boolean CheckTagDetailsNotECO(char *Details[],int num_details);
45 Boolean CheckECOTag(char *Details[]);
46 void init_tag_lists(void);