From 0888d4998dfd4812195dcd9adac74fe4c005daaf Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Thu, 10 Jun 2004 20:49:51 +0000 Subject: (mix_parser_compile): correctly set the loc pointer. --- mixlib/mix_parser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mixlib/mix_parser.c b/mixlib/mix_parser.c index 897ef7b..c99e971 100644 --- a/mixlib/mix_parser.c +++ b/mixlib/mix_parser.c @@ -99,7 +99,7 @@ mix_parser_src_file_extension (const mix_parser_t *parser) static gint compare_shorts_ (gconstpointer s1, gconstpointer s2) { - mix_short_t a = (mix_short_t)GPOINTER_TO_UINT(s1); + mix_short_t a = (mix_short_t)GPOINTER_TO_UINT (s1); mix_short_t b = (mix_short_t)GPOINTER_TO_UINT (s2); if ( mix_short_sign (a) == mix_short_sign (b) ) return mix_short_magnitude (a) - mix_short_magnitude (b); @@ -138,6 +138,8 @@ mix_parser_new (const gchar *in_file) } result->in_file = f; result->loc_count = MIX_SHORT_ZERO; + result->start = MIX_SHORT_ZERO; + result->end = MIX_SHORT_ZERO; result->status = MIX_PERR_NOCOMP; result->err_line = 0; result->err_count = 0; @@ -265,10 +267,10 @@ mix_parser_compile (mix_parser_t *parser) if ( parser->status == MIX_PERR_OK ) { + parser->loc_count = parser->end; mix_symbol_table_foreach (parser->ls_table, update_ls_, (gpointer)parser); if ( g_hash_table_size (parser->future_refs) > 0) { - parser->loc_count--; g_hash_table_foreach_remove (parser->future_refs, undef_warning_, (gpointer)parser); } -- cgit v1.2.3