summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2002-04-09 23:55:20 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2002-04-09 23:55:20 +0000
commite364deb72122bbf902294bd0f8b1dc77fb9e1b7a (patch)
tree3ef87cd706b35cc201b3521e4897a587f76362c0
parentb009c5f79d39b64fbe81ddcfc4f74828c27986a2 (diff)
downloadmdk-e364deb72122bbf902294bd0f8b1dc77fb9e1b7a.tar.gz
mdk-e364deb72122bbf902294bd0f8b1dc77fb9e1b7a.tar.bz2
sprintf -> g_snprintf
-rw-r--r--mixgtk/mixgtk_mixal.c5
-rw-r--r--mixgtk/mixgtk_mixvm.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/mixgtk/mixgtk_mixal.c b/mixgtk/mixgtk_mixal.c
index 7c7c402..42a11ce 100644
--- a/mixgtk/mixgtk_mixal.c
+++ b/mixgtk/mixgtk_mixal.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixgtk_mixal.c :
* Implementation of the functions declared in mixgtk_mixal.h
* ------------------------------------------------------------------
- * $Id: mixgtk_mixal.c,v 1.14 2002/04/09 23:28:19 jao Exp $
+ * $Id: mixgtk_mixal.c,v 1.15 2002/04/09 23:55:20 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
*
@@ -271,7 +271,8 @@ mixgtk_mixal_load_file (void)
addr = mix_vm_get_lineno_address (vm_, k + 1);
if (addr != MIX_VM_CELL_NO)
{
- sprintf (ADDR, "%04d: ", mix_short_magnitude (addr));
+ g_snprintf (ADDR, ADDR_SIZE, "%04d: ",
+ mix_short_magnitude (addr));
mix_word_print_to_buffer (mix_vm_get_addr_contents (vm_, addr),
ADDR + strlen (ADDR));
}
diff --git a/mixgtk/mixgtk_mixvm.c b/mixgtk/mixgtk_mixvm.c
index 351b58e..637ee31 100644
--- a/mixgtk/mixgtk_mixvm.c
+++ b/mixgtk/mixgtk_mixvm.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixgtk_mixvm.c :
* Implementation of the functions declared in mixgtk_mixvm.h
* ------------------------------------------------------------------
- * $Id: mixgtk_mixvm.c,v 1.8 2002/04/09 23:28:19 jao Exp $
+ * $Id: mixgtk_mixvm.c,v 1.9 2002/04/09 23:55:20 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
*
@@ -160,7 +160,7 @@ mixgtk_mixvm_init (mix_vm_t *vm, mixgtk_dialog_id_t top)
for (k = 0; k< MIX_VM_CELL_NO; ++k)
{
gchar buffer[20];
- sprintf (buffer, "%04d", k);
+ g_snprintf (buffer, 20, "%04d", k);
text[0] = buffer;
gtk_clist_append (memory_, text);
}