$NetBSD: patch-ad,v 1.1 2006/06/25 13:46:37 wiz Exp $

Fixes gcc4 error:
error: invalid storage class for function 'non_greedy_parsing'

--- src/plugins/moz/moz_parse.lex.orig	2003-11-29 13:14:14.000000000 +0000
+++ src/plugins/moz/moz_parse.lex
@@ -41,6 +41,7 @@
 #undef YY_USES_REJECT
 
 int yylex (void);
+static char *non_greedy_parsing (pattern [], char []);
 
 %}
 
@@ -60,65 +61,6 @@ DOCTYPE		"<!DOCTYPE NETSCAPE-Bookmark-fi
 
 
 %{
-
-static char *non_greedy_parsing (pattern stop_pattern[], char yytext[])
-{
-	char_vector *text_cv  = char_vector_new (text_cv, 100);
-	char        *text_end = NULL;
-	char        *text;
-	int         in, i, which, chr_cnt = 0;
-
-	char_vector_add (text_cv, yytext[0]);
-
-	while ((text_end == NULL) && ((in = input ()) != EOF))
-	{
-		char_vector_add (text_cv, in);
-		chr_cnt++;
-
-		for (which = 0; stop_pattern[which].text != NULL; which++)
-		{
-			if (chr_cnt > stop_pattern[which].length)
-			{
-				stop_pattern[which].text_ptr++;
-			}
-		}
-
-		for (which = 0; stop_pattern[which].text != NULL; which++)
-		{
-			text_end = strstr ((text_cv->vector) + stop_pattern[which].text_ptr,
-						stop_pattern[which].text);
-			if (text_end != NULL)
-			{
-				break;
-			}
-		}
-	}
-
-	if (text_end != NULL)
-	{
-		*text_end = '\0';
-
-		for (i = strlen (stop_pattern[which].text) - 1; i >= 0; i--)
-		{
-			unput (stop_pattern[which].text[i]);
-		}
-	}
-	else
-	{
-		char_vector_del (text_cv);
-		return NULL;
-	}
-
-	text = strdup (text_cv->vector);
-	char_vector_del (text_cv);
-
-	return text;
-}
-
-%}
-
-
-%{
 /************************************************************************
  * doctype
  ************************************************************************/
@@ -303,6 +245,60 @@ static char *non_greedy_parsing (pattern
 
 %%
 
+static char *non_greedy_parsing (pattern stop_pattern[], char yytext[])
+{
+	char_vector *text_cv  = char_vector_new (text_cv, 100);
+	char        *text_end = NULL;
+	char        *text;
+	int         in, i, which, chr_cnt = 0;
+
+	char_vector_add (text_cv, yytext[0]);
+
+	while ((text_end == NULL) && ((in = input ()) != EOF))
+	{
+		char_vector_add (text_cv, in);
+		chr_cnt++;
+
+		for (which = 0; stop_pattern[which].text != NULL; which++)
+		{
+			if (chr_cnt > stop_pattern[which].length)
+			{
+				stop_pattern[which].text_ptr++;
+			}
+		}
+
+		for (which = 0; stop_pattern[which].text != NULL; which++)
+		{
+			text_end = strstr ((text_cv->vector) + stop_pattern[which].text_ptr,
+						stop_pattern[which].text);
+			if (text_end != NULL)
+			{
+				break;
+			}
+		}
+	}
+
+	if (text_end != NULL)
+	{
+		*text_end = '\0';
+
+		for (i = strlen (stop_pattern[which].text) - 1; i >= 0; i--)
+		{
+			unput (stop_pattern[which].text[i]);
+		}
+	}
+	else
+	{
+		char_vector_del (text_cv);
+		return NULL;
+	}
+
+	text = strdup (text_cv->vector);
+	char_vector_del (text_cv);
+
+	return text;
+}
+
 
 void yyerror (char *error_message)
 {
