Added the external header.
[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 #ifdef DMALLOC
21 #include <dmalloc.h>
22 #endif
23
24 #define MAXGEDCLEVEL    99
25 #define MAXGEDCLINELEN  255
26 #define MAXGEDCTAGLEN   31
27 #define MAXSTDTAGLEN    4
28 #define MAXGEDCPTRLEN   22
29 #define GEDCOMTAGOFFSET 257
30
31 /* Error handling mechanisms */
32 typedef enum _MECH {
33   IMMED_FAIL,
34   DEFER_FAIL,
35   IGNORE_ERRORS
36 } MECHANISM;
37
38
39 int        gedcom_error(char* s, ...);
40 int        gedcom_warning(char* s, ...);
41 int        gedcom_message(char* s, ...);
42 int        gedcom_debug_print(char* s, ...);
43 void       gedcom_set_debug_level(int level);
44 void       gedcom_set_error_handling(MECHANISM mechanism);
45 void       gedcom_set_compat_handling(int enable_compat);
46
47 int        gedcom_parse();
48
49 int        gedcom_lex();
50
51 extern int line_no;
52 #endif /* __GEDCOM_H */