Compatibility with Personal Ancestral File.
[gedcom-parse.git] / gedcom / compat.h
1 /* Header for compatibility handling for the GEDCOM parser.
2    Copyright (C) 2001, 2002 The Genes Development Team
3    This file is part of the Gedcom parser library.
4    Contributed by Peter Verthez <Peter.Verthez@advalvas.be>, 2001.
5
6    The Gedcom parser library is free software; you can redistribute it
7    and/or modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    The Gedcom parser library is distributed in the hope that it will be
12    useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public
17    License along with the Gedcom parser library; if not, write to the
18    Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19    02111-1307 USA.  */
20
21 /* $Id$ */
22 /* $Name$ */
23
24 #ifndef __COMPAT_H
25 #define __COMPAT_H
26
27 #include "buffer.h"
28 #include "gedcom.h"
29
30 typedef enum _COMPAT_RULES {
31   C_NO_SUBMITTER,
32   C_INDI_ADDR,
33   C_NOTE_NO_VALUE,
34   C_NO_GEDC,
35   C_NO_CHAR,
36   C_HEAD_TIME,
37   C_NO_DOUBLE_AT,
38   C_NO_REQUIRED_VALUES,
39   C_551_TAGS,
40   C_NO_SLGC_FAMC,
41   C_NR_OF_RULES
42 } Compat_rule;
43
44 void set_compatibility(const char* program);
45 int  compat_mode(Compat_rule rule); 
46 void compat_generate_submitter_link(Gedcom_ctxt parent);
47 void compat_generate_submitter();
48 void compat_generate_gedcom(Gedcom_ctxt parent);
49 int  compat_generate_char(Gedcom_ctxt parent);
50 Gedcom_ctxt compat_generate_resi_start(Gedcom_ctxt parent);
51 void compat_generate_resi_end(Gedcom_ctxt parent, Gedcom_ctxt self);
52 int  compat_check_551_tag(const char* tag, struct safe_buffer* b);
53 void compat_generate_slgc_famc_link(Gedcom_ctxt parent);
54 void compat_generate_slgc_famc_fam();
55
56 #endif /* __COMPAT_H */