Towards GPL
[idzebra-moved-to-github.git] / include / dfa.h
index b609433..5416c13 100644 (file)
@@ -1,26 +1,26 @@
-/*
- * Copyright (C) 1994, Index Data I/S 
- * All rights reserved.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: dfa.h,v $
- * 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
- * Simple error reporting when parsing regular expressions.
- *
- * Revision 1.3  1995/01/24  16:01:30  adam
- * Added -ansi to CFLAGS.
- * New functions and change of data structures.
- *
- * Revision 1.2  1994/09/26  16:31:23  adam
- * Minor changes. xmalloc declares xcalloc now.
- *
- * Revision 1.1  1994/09/26  10:17:43  adam
- * Dfa-module header files.
- *
- */
+/* $Id: dfa.h,v 1.10 2002-08-02 19:26:55 adam Exp $
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
+   Index Data Aps
+
+This file is part of the Zebra server.
+
+Zebra is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Zebra; see the file LICENSE.zebra.  If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+*/
+
+
 
 #ifndef DFA_H
 #define DFA_H
 #include <bset.h>
 #include <set.h>
 
+#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 +63,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 +100,9 @@ extern unsigned short
 #define DFA_ERR_SYNTAX 1
 #define DFA_ERR_LP     2
 #define DFA_ERR_RP     3
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif