X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Fgedcom_internal.h;h=9807ecb759f22678807ada7d9f364fe8f0d410d7;hb=133000dc1075930c51adae600c732ee1ab9ffab0;hp=cb5f067b3de78db2a3f5efd257e704c3a3bddf20;hpb=537c2324ac868ae6a992cb5037870e6882f03fa4;p=gedcom-parse.git diff --git a/gedcom/gedcom_internal.h b/gedcom/gedcom_internal.h index cb5f067..9807ecb 100644 --- a/gedcom/gedcom_internal.h +++ b/gedcom/gedcom_internal.h @@ -1,5 +1,5 @@ /* General header for the Gedcom parser. - Copyright (C) 2001 The Genes Development Team + Copyright (C) 2001, 2002 The Genes Development Team This file is part of the Gedcom parser library. Contributed by Peter Verthez , 2001. @@ -28,10 +28,16 @@ #include #include #include +#ifdef HAVE_CONFIG_H +#include +#endif +#include #ifdef WITH_DMALLOC #include #endif -#include "config.h" + +#define _(string) gettext(string) +#define N_(string) (string) #define MAXGEDCLEVEL 99 #define MAXGEDCLINELEN 255 @@ -39,14 +45,35 @@ #define MAXSTDTAGLEN 4 #define MAXGEDCPTRLEN 22 #define GEDCOMTAGOFFSET 257 +#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; +}; + +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); -int gedcom_error(char* s, ...); -int gedcom_warning(char* s, ...); -int gedcom_message(char* s, ...); -int gedcom_debug_print(char* s, ...); +void gedcom_mem_error(const char *filename, int line); -int gedcom_parse(); -int gedcom_lex(); +#define MEMORY_ERROR gedcom_mem_error(__FILE__, __LINE__) extern int line_no; +extern int init_called; #endif /* __GEDCOM_INTERNAL_H */