Index: functions.c
===================================================================
--- functions.c	(revision d4927a70549407fe7f56b4ae1d3949663a370205)
+++ functions.c	(revision 3472845ecdabe9cd1549dd2b2355ca745059ea36)
@@ -96,11 +96,11 @@
   owl_fmtext *fm = user_data;
   owl_timer *timer = data;
-  char *str = owl_sprintf("- %s: in %d seconds",
-                          timer->name ? timer->name : "(unnamed)",
-                          (int)(timer->time - time(NULL)));
+  char *str = g_strdup_printf("- %s: in %d seconds",
+                              timer->name ? timer->name : "(unnamed)",
+                              (int)(timer->time - time(NULL)));
   owl_fmtext_append_normal(fm, str);
   g_free(str);
   if (timer->interval) {
-    str = owl_sprintf(", repeat every %d seconds", timer->interval);
+    str = g_strdup_printf(", repeat every %d seconds", timer->interval);
     owl_fmtext_append_normal(fm, str);
     g_free(str);
@@ -133,7 +133,7 @@
     desc = "???";
   }
-  s = owl_sprintf("%-20s - %s%s", name, 
-		  0==owl_style_validate(style)?"":"[INVALID] ",
-		  desc);
+  s = g_strdup_printf("%-20s - %s%s", name,
+		      0 == owl_style_validate(style) ? "" : "[INVALID] ",
+		      desc);
   return s;
 }
@@ -216,5 +216,5 @@
         char *perlquickstart = owl_perlconfig_execute("BarnOwl::Hooks::_get_quickstart()");
         if (perlquickstart) {
-            char *result = owl_sprintf("%s%s", message, perlquickstart);
+            char *result = g_strdup_printf("%s%s", message, perlquickstart);
             owl_function_adminmsg("BarnOwl Quickstart", result);
             g_free(result);
@@ -311,5 +311,5 @@
                                    owl_global_get_msg_history(&g));
   owl_editwin_set_dotsend(e);
-  s = owl_sprintf("----> %s\n", line);
+  s = g_strdup_printf("----> %s\n", line);
   owl_editwin_set_locktext(e, s);
   g_free(s);
@@ -354,5 +354,5 @@
   /* TODO: We probably actually want an owl_aimwrite object like
    * owl_zwrite. */
-  char *line = owl_sprintf("aimwrite %s", to);
+  char *line = g_strdup_printf("aimwrite %s", to);
   owl_function_write_setup("message");
   owl_function_start_edit_win(line,
@@ -438,5 +438,5 @@
   old_msg = g_strdup(owl_zwrite_get_message(z));
 
-  zcrypt = owl_sprintf("%s/zcrypt", owl_get_bindir());
+  zcrypt = g_strdup_printf("%s/zcrypt", owl_get_bindir());
   argv[0] = "zcrypt";
   argv[1] = "-E";
@@ -1991,5 +1991,5 @@
 
   buff = skiptokens(buff, 1);
-  newbuff = owl_sprintf("%s%s", buff, redirect);
+  newbuff = g_strdup_printf("%s%s", buff, redirect);
 
   if (type == OWL_OUTPUT_POPUP) {
@@ -2193,5 +2193,5 @@
     newname=g_strdup(filtername+4);
   } else {
-    newname=owl_sprintf("not-%s", filtername);
+    newname=g_strdup_printf("not-%s", filtername);
   }
 
@@ -2245,5 +2245,5 @@
   }
   tmp = owl_filter_print(f);
-  buff = owl_sprintf("%s: %s", owl_filter_get_name(f), tmp);
+  buff = g_strdup_printf("%s: %s", owl_filter_get_name(f), tmp);
   owl_function_popless_text(buff);
   g_free(buff);
@@ -2305,7 +2305,7 @@
   /* name for the filter */
   if (!instance) {
-    filtname = owl_sprintf("%sclass-%s", related ? "related-" : "", class);
-  } else {
-    filtname = owl_sprintf("%sclass-%s-instance-%s", related ? "related-" : "", class, instance);
+    filtname = g_strdup_printf("%sclass-%s", related ? "related-" : "", class);
+  } else {
+    filtname = g_strdup_printf("%sclass-%s-instance-%s", related ? "related-" : "", class, instance);
   }
   /* downcase it */
@@ -2379,5 +2379,5 @@
   /* name for the filter */
   shortuser = short_zuser(longuser);
-  filtname = owl_sprintf("user-%s", shortuser);
+  filtname = g_strdup_printf("user-%s", shortuser);
   g_free(shortuser);
 
@@ -2425,5 +2425,5 @@
 
   /* name for the filter */
-  filtname=owl_sprintf("aimuser-%s", user);
+  filtname=g_strdup_printf("aimuser-%s", user);
 
   /* if it already exists then go with it.  This lets users override */
@@ -2435,5 +2435,5 @@
   escuser = owl_text_quote(user, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
 
-  argbuff = owl_sprintf(
+  argbuff = g_strdup_printf(
       "( type ^aim$ and ( ( sender ^%1$s$ and recipient ^%2$s$ ) or "
       "( sender ^%2$s$ and recipient ^%1$s$ ) ) )",
@@ -2462,5 +2462,5 @@
 
   /* name for the filter */
-  filtname=owl_sprintf("type-%s", type);
+  filtname=g_strdup_printf("type-%s", type);
 
   /* if it already exists then go with it.  This lets users override */
@@ -2521,5 +2521,5 @@
   ccs = owl_message_get_attribute_value(m, "zephyr_ccs");
 
-  filtname = owl_sprintf("conversation-%s", ccs);
+  filtname = g_strdup_printf("conversation-%s", ccs);
   owl_text_tr(filtname, ' ', '-');
 
@@ -2763,6 +2763,6 @@
 
   for(i = 8; i < COLORS; ++i) {
-    char* str1 = owl_sprintf("%4i:     ",i);
-    char* str2 = owl_sprintf("%i\n",i);
+    char* str1 = g_strdup_printf("%4i:     ",i);
+    char* str2 = g_strdup_printf("%i\n",i);
     owl_fmtext_append_normal(&fm,str1);
     owl_fmtext_append_normal_color(&fm, str2, i, OWL_COLOR_DEFAULT);
@@ -3392,5 +3392,5 @@
   date[strlen(date)-1]='\0';
 
-  buff = owl_sprintf("%s %s", date, string);
+  buff = g_strdup_printf("%s %s", date, string);
 
   owl_errqueue_append_err(owl_global_get_errqueue(&g), buff);
