Wed 01 Apr 2009 06:27:05 PM UTC, comment #2:
Had the same problem on OS-X and Ubuntu Server 8.04 on patchlevel 9.7m. To fix, I moved a few things around and declared prototyped in filters/sql-filt.l. Here's the patch from my Git repo:
Fixing SQL filter for compilation error
---
diff --git a/vile-9.7/filters/sql-filt.l b/vile-9.7/filters/sql-filt.l
index e4b5351..6c7989a 100644
--- a/vile-9.7/filters/sql-filt.l
+++ b/vile-9.7/filters/sql-filt.l
@@ -20,7 +20,6 @@ DefineOptFilter("sql", "d");
#define new_state(state) saved_state = began_state; set_state(state)
#define old_state() set_state(saved_state);
-
static char *Action_attr;
static char *Comment_attr;
static char *Error_attr;
@@ -33,31 +32,15 @@ static int next_line; /* state after one-line SQLPlus /
static int began_state;
static int saved_state;
-static void
-begin_oneliner(void)
-{
- new_state(ONE_LINE);
- next_line = LEAD;
- flt_bfr_begin(String_attr);
-}
+static void begin_oneliner(void);
+static void finish_oneliner(void);
+static int is_oneliner(char *name);
+static void init_filter(int before GCC_UNUSED);
+static void do_filter(FILE *inputs);
-static void
-finish_oneliner(void)
-{
- flt_bfr_finish();
- new_state(next_line);
- next_line = LEAD;
-}
-
-static int
-is_oneliner(char *name)
-{
- char *flags = ci_keyword_flag(name);
- int result = 0;
- if (flags != 0)
- result = (strchr(flags, '1') != 0);
- return result;
-}
+#if NO_LEAKS
+static void free_filter(void);
+#endif
/******************************************************************************/
@@ -227,6 +210,32 @@ HOSTVAR ":"{IDENT}
%%
static void
+begin_oneliner(void)
+{
+ new_state(ONE_LINE);
+ next_line = LEAD;
+ flt_bfr_begin(String_attr);
+}
+
+static void
+finish_oneliner(void)
+{
+ flt_bfr_finish();
+ new_state(next_line);
+ next_line = LEAD;
+}
+
+static int
+is_oneliner(char *name)
+{
+ char *flags = ci_keyword_flag(name);
+ int result = 0;
+ if (flags != 0)
+ result = (strchr(flags, '1') != 0);
+ return result;
+}
+
+static void
init_filter(int before GCC_UNUSED)
{
(void) before;
|