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