summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_scanner.l
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2004-08-02 08:53:54 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2004-08-02 08:53:54 +0000
commit3e85147e26d0938d63473e362abb2cd0caaa37a3 (patch)
treed9340054d12ba771cafc4af695d566a78dc1e27e /mixlib/mix_scanner.l
parent720f9140a04718cc0f4d89cc3e2d8b49eda44464 (diff)
downloadmdk-3e85147e26d0938d63473e362abb2cd0caaa37a3.tar.gz
mdk-3e85147e26d0938d63473e362abb2cd0caaa37a3.tar.bz2
minor quibbles
Diffstat (limited to 'mixlib/mix_scanner.l')
-rw-r--r--mixlib/mix_scanner.l32
1 files changed, 15 insertions, 17 deletions
diff --git a/mixlib/mix_scanner.l b/mixlib/mix_scanner.l
index fcd6054..e85b6c8 100644
--- a/mixlib/mix_scanner.l
+++ b/mixlib/mix_scanner.l
@@ -106,29 +106,15 @@
} while (FALSE)
-static mix_word_t
-eval_binop_ (const gchar *op, mix_word_t x, mix_word_t y);
-
-static void yyunput(int, char*);
+static mix_word_t eval_binop_ (const gchar *op, mix_word_t x, mix_word_t y);
-static void
-unput_word_ (mix_word_t word)
- {
- gchar *value;
- gint k;
- value = g_strdup_printf ("%s%ld",
- mix_word_is_negative (word)? "-":"+",
- mix_word_magnitude (word));
- for (k = strlen (value) - 1; k >= 0; --k)
- unput (value[k]);
- g_free (value);
- }
+static void unput_word_ (mix_word_t word);
%}
%option nomain
%option caseless
-%option pointer
+%option array
%option stack
%option noyywrap
%option noyy_top_state
@@ -557,3 +543,15 @@ eval_binop_ (const gchar *op, mix_word_t x, mix_word_t y)
return result;
}
+static void
+unput_word_ (mix_word_t word)
+{
+ gchar *value;
+ gint k;
+ value = g_strdup_printf ("%s%ld",
+ mix_word_is_negative (word)? "-":"+",
+ mix_word_magnitude (word));
+ for (k = strlen (value) - 1; k >= 0; --k)
+ unput (value[k]);
+ g_free (value);
+}