aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--dfa.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a98401ce..c25bab82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-18 Dave Pitts <dpitts@cozx.com>
+
+ * dfa.c: Move some decls to the top of their functions for
+ C90 compilers.
+
2011-10-18 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_strftime): Add check for negative / overflowed
diff --git a/dfa.c b/dfa.c
index aecbbd76..19bbaa31 100644
--- a/dfa.c
+++ b/dfa.c
@@ -805,6 +805,7 @@ parse_bracket_exp (void)
int invert;
int c, c1, c2;
charclass ccl;
+ wint_t wc1 = 0;
/* Used to warn about [:space:].
Bit 0 = first character is a colon.
@@ -849,7 +850,6 @@ parse_bracket_exp (void)
else
invert = 0;
- wint_t wc1 = 0;
colon_warning_state = (c == ':');
do
{
@@ -3429,10 +3429,11 @@ dfainit (struct dfa *d)
static void
dfaoptimize (struct dfa *d)
{
+ unsigned int i;
+
if (!MBS_SUPPORT || !using_utf8())
return;
- unsigned int i;
for (i = 0; i < d->tindex; ++i)
{
switch(d->tokens[i])