X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fdfa.h;h=a0bb90f3be39c5818131684e364a9e0ae0705a92;hb=b017c9ebfe65bb69d6d6dc17f29a4c331952b8cd;hp=b609433a7949d48e4b6a7128988d793079382040;hpb=65615b66e805376b23f24a51e7d048f4f58e6525;p=idzebra-moved-to-github.git diff --git a/include/dfa.h b/include/dfa.h index b609433..a0bb90f 100644 --- a/include/dfa.h +++ b/include/dfa.h @@ -1,10 +1,23 @@ /* - * Copyright (C) 1994, Index Data I/S + * Copyright (C) 1994-1999, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: dfa.h,v $ - * Revision 1.5 1996-01-08 09:09:48 adam + * Revision 1.9 1999-02-02 14:50:31 adam + * Updated WIN32 code specific sections. Changed header. + * + * Revision 1.8 1997/09/18 08:59:18 adam + * Extra generic handle for the character mapping routines. + * + * Revision 1.7 1997/09/05 15:29:59 adam + * Changed prototype for chr_map_input - added const. + * Added support for C++, headers uses extern "C" for public definitions. + * + * Revision 1.6 1996/06/04 10:20:10 adam + * Added support for character mapping. + * + * Revision 1.5 1996/01/08 09:09:48 adam * Function dfa_parse got 'const' string argument. * * Revision 1.4 1995/01/25 11:31:04 adam @@ -28,6 +41,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + struct DFA_tran { unsigned char ch[2]; /* transition on ch[0] <= c <= ch[1] to */ unsigned short to; /* this state */ @@ -59,6 +76,8 @@ struct DFA { }; struct DFA *dfa_init (void); +void dfa_set_cmap (struct DFA *dfa, void *vp, + const char **(*cmap)(void *vp, const char **from, int len)); int dfa_parse (struct DFA *, const char **); void dfa_mkstate (struct DFA *); void dfa_delete (struct DFA **); @@ -94,4 +113,9 @@ extern unsigned short #define DFA_ERR_SYNTAX 1 #define DFA_ERR_LP 2 #define DFA_ERR_RP 3 + +#ifdef __cplusplus +} +#endif + #endif