summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-09-22 18:39:25 +0000
committerGuy Harris <guy@alum.mit.edu>2005-09-22 18:39:25 +0000
commitd90a1a4ac60d4b0e54e821b28fc798656d119c54 (patch)
treefc2f346769c4e687b6b48f3cf3058e2f577a035e
parent35bd5bd8543bb80bca0a7585fe9ad6b585b7a009 (diff)
downloadwireshark-d90a1a4ac60d4b0e54e821b28fc798656d119c54.tar.gz
Make the private variables for various lexical analyzers static, so
that we don't have all the lexical analyzers in libethereal share them (note that they're already static in radius_dict.l, so they weren't sharing with any other lexical analyzer), and so that OS X 10.3.9's run-time linker doesn't get upset at finding them defined in libethereal and the MATE plugin. Fix up indentation. svn path=/trunk/; revision=15961
-rw-r--r--epan/dtd_parse.l24
-rw-r--r--epan/dtd_preparse.l4
-rw-r--r--plugins/mate/mate_parser.l10
3 files changed, 19 insertions, 19 deletions
diff --git a/epan/dtd_parse.l b/epan/dtd_parse.l
index c0b1abfae0..9f4bf2f8a6 100644
--- a/epan/dtd_parse.l
+++ b/epan/dtd_parse.l
@@ -45,12 +45,12 @@
void (*act)(gchar*);
};
- void* pParser;
- GString* input_string;
- guint offset;
- guint len;
- gchar* location;
- gchar* attr_name;
+ static void* pParser;
+ static GString* input_string;
+ static guint offset;
+ static guint len;
+ static gchar* location;
+ static gchar* attr_name;
static int my_yyinput(char* buff,guint size);
@@ -64,13 +64,13 @@
static void set_description (gchar* val) { if(build_data->description) g_free(build_data->description); build_data->description = g_strdup(val); }
static void set_recursive (gchar* val) { build_data->recursion = ( g_strcasecmp(val,"yes") == 0 ) ? TRUE : FALSE; }
- struct _proto_xmlpi_attr proto_attrs[] =
+ static struct _proto_xmlpi_attr proto_attrs[] =
{
{ "proto_name", set_proto_name },
{ "media", set_media_type },
{ "root", set_proto_root },
{ "description", set_description },
- { "hierarchy", set_recursive },
+ { "hierarchy", set_recursive },
{NULL,NULL}
};
@@ -187,7 +187,7 @@ squoted ['][^\']*[']
<PROTOCOL>{name} {
attr_name = g_strdup(yytext);
- g_strdown(attr_name);
+ g_strdown(attr_name);
BEGIN GET_ATTR_QUOTE;
}
@@ -308,7 +308,7 @@ extern dtd_build_data_t* dtd_parse(GString* s) {
pParser = DtdParseAlloc(g_malloc);
#ifdef DEBUG_DTD_PARSER
- DtdParseTrace(stderr, ">>");
+ DtdParseTrace(stderr, ">>");
#endif
build_data = g_malloc(sizeof(dtd_build_data_t));
@@ -325,7 +325,7 @@ extern dtd_build_data_t* dtd_parse(GString* s) {
build_data->location = NULL;
build_data->error = g_string_new("");
- location = NULL;
+ location = NULL;
BEGIN DTD;
@@ -335,7 +335,7 @@ extern dtd_build_data_t* dtd_parse(GString* s) {
yyrestart(NULL);
- location = NULL;
+ location = NULL;
DtdParseFree(pParser, g_free );
diff --git a/epan/dtd_preparse.l b/epan/dtd_preparse.l
index f6b21a66ea..594cce1a66 100644
--- a/epan/dtd_preparse.l
+++ b/epan/dtd_preparse.l
@@ -45,8 +45,8 @@
#include "dtd.h"
#define MAX_INCLUDE_DEPTH 10
-YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
-int include_stack_ptr = 0;
+static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+static int include_stack_ptr = 0;
#define ECHO g_string_append(current,yytext);
diff --git a/plugins/mate/mate_parser.l b/plugins/mate/mate_parser.l
index 2660b655c4..3aeb2235bb 100644
--- a/plugins/mate/mate_parser.l
+++ b/plugins/mate/mate_parser.l
@@ -40,13 +40,13 @@
void MateParseTrace(FILE*,char*);
#define MAX_INCLUDE_DEPTH 10
- YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
- int include_stack_ptr = 0;
+ static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+ static int include_stack_ptr = 0;
- void* pParser;
- mate_config_frame* current_frame;
+ static void* pParser;
+ static mate_config_frame* current_frame;
- mate_config* mc;
+ static mate_config* mc;
#define MATE_PARSE(token_type) MateParser(pParser, (token_type), g_strdup(yytext), mc );