Copied from old documentation. Removed all Gedcom_val details.
[gedcom-parse.git] / gedcom / gedcom_internal.h
index 5a199dd65c62e78853f79785919a0103006e4363..804959a66915500691d8b4d0bf982fb9718e6e91 100644 (file)
 #include <config.h>
 #endif
 #include <libintl.h>
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
 
-#define _(string) gettext(string)
+#define _(string) dgettext(PACKAGE, string)
 #define N_(string) (string)
 
 #define MAXGEDCLEVEL    99
 #define MAXSTDTAGLEN    4
 #define MAXGEDCPTRLEN   22
 #define GEDCOMTAGOFFSET 257
-#define INTERNAL_ENCODING "UTF8"
+#define INTERNAL_ENCODING "UTF-8"
 
 #define GEDCOM_INTERNAL 1
 
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+
 struct tag_struct {
   char *string;
   int value;
 };
 
-int        gedcom_parse();
-int        gedcom_lex();
+typedef enum _PARSE_STATE {
+  STATE_NORMAL,
+  STATE_INITIAL,
+  STATE_EXPECT_TAG
+} ParseState;
+
+int  gedcom_parse();
+int  gedcom_lex();
+int  gedcom_check_token(const char* str, ParseState state, int check_token);
 
-void       gedcom_mem_error(char *filename, int line);
+void gedcom_mem_error(const char *filename, int line);
 
 #define MEMORY_ERROR gedcom_mem_error(__FILE__, __LINE__)
+#define VALUE_IF_MISSING "-" 
 
 extern int line_no;
+extern int init_called;
 #endif /* __GEDCOM_INTERNAL_H */