Added CVS tags.
[gedcom-parse.git] / gedcom.h
1 /*  This program is free software; you can redistribute it and/or modify  *
2  *  it under the terms of the GNU General Public License as published by  *
3  *  the Free Software Foundation; either version 2 of the License, or     *
4  *  (at your option) any later version.                                   *
5
6  (C) 2001 by The Genes Development Team
7  Original author: Peter Verthez (Peter.Verthez@advalvas.be)
8 */
9
10 /* $Id$ */
11 /* $Name$ */
12
13 #ifndef __GEDCOM_H
14 #define __GEDCOM_H
15 #include <stdarg.h>
16 #include <stdlib.h>
17 #include <stdio.h>
18 #include <string.h>
19 #include <errno.h>
20
21 #define MAXGEDCLEVEL 99
22 #define MAXGEDCLINELEN 256
23 #define MAXGEDCTAGLEN 31
24 #define MAXSTDTAGLENGTH 4
25 #define GEDCOMTAGOFFSET 257
26
27 /* Error handling mechanisms */
28 typedef enum _MECH {
29   IMMED_FAIL,
30   DEFER_FAIL,
31   IGNORE_ERRORS
32 } MECHANISM;
33
34
35 int        gedcom_error(char* s, ...);
36 int        gedcom_warning(char* s, ...);
37 int        gedcom_message(char* s, ...);
38 int        gedcom_debug_print(char* s, ...);
39 void       gedcom_set_debug_level(int level);
40 void       gedcom_set_error_handling(MECHANISM mechanism);
41 void       gedcom_set_compat_handling(int enable_compat);
42
43 int        gedcom_parse();
44
45 int        gedcom_lex();
46
47 extern int line_no;
48 #endif /* __GEDCOM_H */