diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-10 20:49:51 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-10 20:49:51 +0000 |
commit | 0888d4998dfd4812195dcd9adac74fe4c005daaf (patch) | |
tree | f65eb0cf893673711ec5f22be198df01164b54e0 | |
parent | 46e7332e60145594bffefa071a5ef27ddecc41a1 (diff) | |
download | mdk-0888d4998dfd4812195dcd9adac74fe4c005daaf.tar.gz mdk-0888d4998dfd4812195dcd9adac74fe4c005daaf.tar.bz2 |
(mix_parser_compile): correctly set the loc pointer.
-rw-r--r-- | mixlib/mix_parser.c | 6 |
1 files 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); } |