summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-09-12 19:32:35 +0000
committerGuy Harris <guy@alum.mit.edu>2005-09-12 19:32:35 +0000
commit019ed9005f9ca0e450750eb303ef13511c945c39 (patch)
tree7657eae71a21f58ef2441f33bfe4c061b462e2e0 /epan
parent3db317ca2bb2e2bbd1e8e4a394ff4635ebcedc5a (diff)
downloadwireshark-019ed9005f9ca0e450750eb303ef13511c945c39.tar.gz
Add a header file to declare routines defined in lexer and used in
parser, or vice versa. svn path=/trunk/; revision=15769
Diffstat (limited to 'epan')
-rw-r--r--epan/Makefile.common3
-rw-r--r--epan/dtd_grammar.lemon5
-rw-r--r--epan/dtd_parse.h33
-rw-r--r--epan/dtd_parse.l7
4 files changed, 40 insertions, 8 deletions
diff --git a/epan/Makefile.common b/epan/Makefile.common
index 339d516345..65762fa9a0 100644
--- a/epan/Makefile.common
+++ b/epan/Makefile.common
@@ -110,7 +110,8 @@ LIBETHEREAL_INCLUDES = \
crypt-md5.h \
crypt-rc4.h \
dtd.h \
- dtd_grammar.h \
+ dtd_grammar.h \
+ dtd_parse.h \
emem.h \
epan.h \
epan_dissect.h \
diff --git a/epan/dtd_grammar.lemon b/epan/dtd_grammar.lemon
index d5f0f0281d..153f320efb 100644
--- a/epan/dtd_grammar.lemon
+++ b/epan/dtd_grammar.lemon
@@ -6,7 +6,7 @@
*
* Copyright 2005, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
*
-* $Id $
+* $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,9 +27,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include <stdio.h>
#include <glib.h>
#include "dtd.h"
-
+#include "dtd_parse.h"
static dtd_named_list_t* dtd_named_list_new(gchar* name, GPtrArray* list) {
dtd_named_list_t* nl = g_malloc(sizeof(dtd_named_list_t));
diff --git a/epan/dtd_parse.h b/epan/dtd_parse.h
new file mode 100644
index 0000000000..2e937fefe5
--- /dev/null
+++ b/epan/dtd_parse.h
@@ -0,0 +1,33 @@
+/* dtd_parse.h
+* an XML dissector for ethereal
+* header file to declare functions defined in lexer and used in parser,
+* or vice versa
+*
+* Copyright 2004, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
+*
+* $Id$
+*
+* Ethereal - Network traffic analyzer
+* By Gerald Combs <gerald@ethereal.com>
+* Copyright 1998 Gerald Combs
+*
+* This program 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
+* of the License, or (at your option) any later version.
+*
+* This program 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 this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+extern void DtdParse(void*,int,dtd_token_data_t*,dtd_build_data_t*);
+extern void *DtdParseAlloc(void *(*)(gulong));
+extern void DtdParseFree( void*, void(*)(void*) );
+extern void DtdParseTrace(FILE *TraceFILE, char *zTracePrompt);
+extern int Dtd_Parse_lex(void);
diff --git a/epan/dtd_parse.l b/epan/dtd_parse.l
index 8c33ee26e6..249681c9b2 100644
--- a/epan/dtd_parse.l
+++ b/epan/dtd_parse.l
@@ -6,7 +6,7 @@
%{
- /* dtd_lexer.l
+ /* dtd_parse.l
* an XML dissector for ethereal
* lexical analyzer for DTDs
*
@@ -38,16 +38,13 @@
#include "dtd.h"
#include "dtd_grammar.h"
+#include "dtd_parse.h"
struct _proto_xmlpi_attr {
gchar* name;
void (*act)(gchar*);
};
- void DtdParse(void*,int,dtd_token_data_t*,dtd_build_data_t*);
- void *DtdParseAlloc(void *(*)(gulong));
- void DtdParseFree( void*, void(*)(void*) );
- void DtdParseTrace(FILE *TraceFILE, char *zTracePrompt);
void* pParser;
GString* input_string;
guint offset;