General cleanup.
[gedcom-parse.git] / gedcom.h
1 /* $Id$ */
2 /* $Name$ */
3
4 #ifndef __GEDCOM_H
5 #define __GEDCOM_H
6 #include <stdarg.h>
7 #include <stdlib.h>
8 #include <stdio.h>
9 #include <string.h>
10 #include <errno.h>
11
12 #define MAXGEDCLEVEL 99
13 #define MAXGEDCLINELEN 256
14 #define MAXGEDCTAGLEN 31
15 #define MAXSTDTAGLENGTH 4
16 #define GEDCOMTAGOFFSET 257
17
18 /* Error handling mechanisms */
19 typedef enum _MECH {
20   IMMED_FAIL,
21   DEFER_FAIL,
22   IGNORE_ERRORS
23 } MECHANISM;
24
25
26 int        gedcom_error(char* s, ...);
27 int        gedcom_warning(char* s, ...);
28 int        gedcom_message(char* s, ...);
29 int        gedcom_debug_print(char* s, ...);
30 void       gedcom_set_debug_level(int level);
31 void       gedcom_set_error_handling(MECHANISM mechanism);
32 void       gedcom_set_compat_handling(int enable_compat);
33
34 int        gedcom_parse();
35
36 int        gedcom_lex();
37
38 extern int line_no;
39 #endif /* __GEDCOM_H */