summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_ins.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/mix_ins.c')
-rw-r--r--mixlib/mix_ins.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/mixlib/mix_ins.c b/mixlib/mix_ins.c
index c5fcaf7..90ca15d 100644
--- a/mixlib/mix_ins.c
+++ b/mixlib/mix_ins.c
@@ -246,6 +246,32 @@ mix_ins_to_string(const mix_ins_t *ins)
return result;
}
+extern void
+mix_ins_to_string_in_buffer (const mix_ins_t *ins, gchar *buf, guint len)
+{
+ gboolean needs_f;
+ mix_ins_id_t id;
+
+ g_return_if_fail (ins != NULL);
+ g_return_if_fail (buf != NULL);
+ id = mix_ins_id_from_ins(*ins);
+ needs_f = ins->fspec != id_to_desc_[id].def_fspec;
+ if ( needs_f )
+ g_snprintf (buf, len, "%s\t%s%d,%d(%d:%d)",
+ mix_get_string_from_id(id),
+ mix_short_is_negative(ins->address)?"-":"",
+ mix_short_magnitude(ins->address), ins->index,
+ mix_fspec_left(ins->fspec),
+ mix_fspec_right(ins->fspec));
+ else
+ g_snprintf(buf, len, "%s\t%s%d,%d",
+ mix_get_string_from_id(id),
+ mix_short_is_negative(ins->address)?"-":"",
+ mix_short_magnitude(ins->address), ins->index);
+}
+
+
+
void
mix_ins_print(const mix_ins_t *ins)
{