summaryrefslogtreecommitdiffhomepage
path: root/mixlib
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2004-08-01 23:26:58 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2004-08-01 23:26:58 +0000
commit2f1be2d60c6541f9859c98cdfb0a94530343efab (patch)
treee2b52f194b2683222867abd2f1764b81123fd5fe /mixlib
parent19375f048ad37eee997a2b2ea85976fb2ad2899f (diff)
downloadmdk-2f1be2d60c6541f9859c98cdfb0a94530343efab.tar.gz
mdk-2f1be2d60c6541f9859c98cdfb0a94530343efab.tar.bz2
g_tree_foreach instead of deprecated g_tree_traverse.
Diffstat (limited to 'mixlib')
-rw-r--r--mixlib/mix_parser.c8
-rw-r--r--mixlib/mix_vm.c4
2 files changed, 5 insertions, 7 deletions
diff --git a/mixlib/mix_parser.c b/mixlib/mix_parser.c
index 17ed49b..aca78f6 100644
--- a/mixlib/mix_parser.c
+++ b/mixlib/mix_parser.c
@@ -330,8 +330,7 @@ mix_parser_write_code (mix_parser_t *parser, const gchar *code_file,
g_free (source_path);
if (context.file == NULL) return MIX_PERR_NOOUT;
- g_tree_traverse (parser->ins_table, write_code_,
- G_IN_ORDER, (gpointer)&context);
+ g_tree_foreach (parser->ins_table, write_code_, (gpointer)&context);
mix_code_file_delete (context.file);
return parser->status;
}
@@ -411,8 +410,7 @@ mix_parser_write_listing (mix_parser_t *parser, const gchar *list_file)
fputs ( _("Src Address Compiled word Symbolic rep\n"),
context.file);
fputs (sep, context.file);
- g_tree_traverse (parser->ins_table, write_listing_,
- G_IN_ORDER, (gpointer)(&context));
+ g_tree_foreach (parser->ins_table, write_listing_, (gpointer)(&context));
fputs (sep, context.file);
fprintf (context.file, _("\n*** Start address:\t%d\n*** End address:\t%d\n"),
mix_short_magnitude (parser->start),
@@ -442,7 +440,7 @@ mix_parser_load_vm (const mix_parser_t *parser, mix_vm_t *vm)
g_return_val_if_fail (vm != NULL, MIX_PERR_INTERNAL);
g_return_val_if_fail (parser->status == MIX_PERR_OK, parser->status);
mix_vm_reset (vm);
- g_tree_traverse (parser->ins_table, load_vm_, G_IN_ORDER, (gpointer)vm);
+ g_tree_foreach (parser->ins_table, load_vm_, (gpointer)vm);
mix_vm_set_start_addr (vm, parser->start);
return parser->status;
}
diff --git a/mixlib/mix_vm.c b/mixlib/mix_vm.c
index 4d28e02..95f9f41 100644
--- a/mixlib/mix_vm.c
+++ b/mixlib/mix_vm.c
@@ -577,7 +577,7 @@ mix_vm_set_breakpoint (mix_vm_t *vm, guint lineno)
tr.lineno = lineno;
tr.vm = vm;
tr.result = MIX_VM_BP_INV_LINE;
- g_tree_traverse (vm->line_table, set_break_, G_IN_ORDER, (gpointer)&tr);
+ g_tree_foreach (vm->line_table, set_break_, (gpointer)&tr);
if (tr.result == MIX_VM_BP_OK)
return tr.lineno;
else
@@ -629,7 +629,7 @@ mix_vm_clear_breakpoint (mix_vm_t *vm, guint lineno)
tr.lineno = lineno;
tr.vm = vm;
tr.result = MIX_VM_BP_INV_LINE;
- g_tree_traverse (vm->line_table, clear_break_, G_IN_ORDER, (gpointer)&tr);
+ g_tree_foreach (vm->line_table, clear_break_, (gpointer)&tr);
return tr.result;
}