aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-05-10 13:39:17 -0700
committerGuy Harris <guy@alum.mit.edu>2017-05-10 20:42:06 +0000
commit559952b9030e6221dfccaf5ff2d1c85a24f2825f (patch)
tree535e1eb254b83af2d653f97d71a47a5169f98d40 /plugins/mate
parent12057373d750909cd2770ebab76111f6eb1fb5f6 (diff)
Clean up MateParser routine declarations.
Remove the declarations from mate_parser.l, and have mate_parser.h include mate.h at the beginning of the file, instead. Move the #if'ed version of the declaration of MateParserAlloc() to mate.h. Change-Id: I03ffdd5f093b179ffc0cb0e43eac093f7e4af65c Reviewed-on: https://code.wireshark.org/review/21587 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'plugins/mate')
-rw-r--r--plugins/mate/mate.h5
-rw-r--r--plugins/mate/mate_parser.l10
2 files changed, 6 insertions, 9 deletions
diff --git a/plugins/mate/mate.h b/plugins/mate/mate.h
index 191c6600fe..0dc0bcaff5 100644
--- a/plugins/mate/mate.h
+++ b/plugins/mate/mate.h
@@ -381,8 +381,11 @@ extern gchar* add_ranges(gchar* range, GPtrArray* range_ptr_arr);
extern gboolean mate_load_config(const gchar* filename, mate_config* mc);
/* Constructor/Destructor prototypes for Lemon Parser */
+#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 16))
void *MateParserAlloc(void* (*)(gsize));
-
+#else
+void *MateParserAlloc(void* (*)(gulong));
+#endif
void MateParserFree(void*, void (*)(void *));
void MateParser(void*, int, gchar*, mate_config*);
diff --git a/plugins/mate/mate_parser.l b/plugins/mate/mate_parser.l
index cf0e599de5..b266b4061a 100644
--- a/plugins/mate/mate_parser.l
+++ b/plugins/mate/mate_parser.l
@@ -1,6 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
+/* Include this before everything else, as it declares functions used here. */
+#include "mate.h"
}
/*
@@ -78,7 +80,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "mate.h"
#include "mate_grammar.h"
#include <wsutil/file_util.h>
@@ -89,13 +90,6 @@
#pragma warning (disable:4018)
#endif
- void MateParser(void*, int, gchar*, mate_config*);
-#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 16))
- void *MateParserAlloc(void *(*)(gsize));
-#else
- void *MateParserAlloc(void *(*)(gulong));
-#endif
- void MateParserFree( void*, void(*)(void*) );
void MateParseTrace(FILE*,char*);
#define MAX_INCLUDE_DEPTH 10