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