Index: functions.c
===================================================================
--- functions.c	(revision 2101a50abccf1b8aea7fb4a158a56c08358fe1d1)
+++ functions.c	(revision 57609b3f1199ff6617621004e3d4345b62d3bd37)
@@ -1433,5 +1433,4 @@
   owl_message *m;
   owl_fmtext fm, attrfm;
-  char buff[10000];
   owl_view *v;
 #ifdef HAVE_LIBZEPHYR
@@ -1449,8 +1448,5 @@
 
   owl_fmtext_append_bold(&fm, "General Information:\n");
-  owl_fmtext_append_normal(&fm, "  Msg Id    : ");
-  sprintf(buff, "%i", owl_message_get_id(m));
-  owl_fmtext_append_normal(&fm, buff);
-  owl_fmtext_append_normal(&fm, "\n");
+  owl_fmtext_appendf_normal(&fm, "  Msg Id    : %i\n", owl_message_get_id(m));
 
   owl_fmtext_append_normal(&fm, "  Type      : ");
@@ -1468,34 +1464,17 @@
   }
 
-  owl_fmtext_append_normal(&fm, "  Time      : ");
-  owl_fmtext_append_normal(&fm, owl_message_get_timestr(m));
-  owl_fmtext_append_normal(&fm, "\n");
+  owl_fmtext_appendf_normal(&fm, "  Time      : %s\n", owl_message_get_timestr(m));
 
   if (!owl_message_is_type_admin(m)) {
-    owl_fmtext_append_normal(&fm, "  Sender    : ");
-    owl_fmtext_append_normal(&fm, owl_message_get_sender(m));
-    owl_fmtext_append_normal(&fm, "\n");
-    
-    owl_fmtext_append_normal(&fm, "  Recipient : ");
-    owl_fmtext_append_normal(&fm, owl_message_get_recipient(m));
-    owl_fmtext_append_normal(&fm, "\n");
-  }
-    
+    owl_fmtext_appendf_normal(&fm, "  Sender    : %s\n", owl_message_get_sender(m));
+    owl_fmtext_appendf_normal(&fm, "  Recipient : %s\n", owl_message_get_recipient(m));
+  }
+
   if (owl_message_is_type_zephyr(m)) {
     owl_fmtext_append_bold(&fm, "\nZephyr Specific Information:\n");
     
-    owl_fmtext_append_normal(&fm, "  Class     : ");
-    owl_fmtext_append_normal(&fm, owl_message_get_class(m));
-    owl_fmtext_append_normal(&fm, "\n");
-    owl_fmtext_append_normal(&fm, "  Instance  : ");
-    owl_fmtext_append_normal(&fm, owl_message_get_instance(m));
-    owl_fmtext_append_normal(&fm, "\n");
-    owl_fmtext_append_normal(&fm, "  Opcode    : ");
-    owl_fmtext_append_normal(&fm, owl_message_get_opcode(m));
-    owl_fmtext_append_normal(&fm, "\n");
-    
-    owl_fmtext_append_normal(&fm, "  Time      : ");
-    owl_fmtext_append_normal(&fm, owl_message_get_timestr(m));
-    owl_fmtext_append_normal(&fm, "\n");
+    owl_fmtext_appendf_normal(&fm, "  Class     : %s\n", owl_message_get_class(m));
+    owl_fmtext_appendf_normal(&fm, "  Instance  : %s\n", owl_message_get_instance(m));
+    owl_fmtext_appendf_normal(&fm, "  Opcode    : %s\n", owl_message_get_opcode(m));
 #ifdef HAVE_LIBZEPHYR
     if (owl_message_is_direction_in(m)) {
@@ -1529,30 +1508,21 @@
 	}
       }
-      owl_fmtext_append_normal(&fm, "  Host      : ");
-      owl_fmtext_append_normal(&fm, owl_message_get_hostname(m));
+      owl_fmtext_appendf_normal(&fm, "  Host      : %s\n", owl_message_get_hostname(m));
 
       if (!owl_message_is_pseudo(m)) {
 	owl_fmtext_append_normal(&fm, "\n");
-	sprintf(buff, "  Port      : %i\n", ntohs(n->z_port));
-	owl_fmtext_append_normal(&fm, buff);
-
-	owl_fmtext_append_normal(&fm,    "  Auth      : ");
-	owl_fmtext_append_normal(&fm, owl_zephyr_get_authstr(n));
-	owl_fmtext_append_normal(&fm, "\n");
-	
-	/* fix this */
-	sprintf(buff, "  Checkd Ath: %i\n", n->z_checked_auth);
-	sprintf(buff + strlen(buff), "  Multi notc: %s\n", n->z_multinotice);
-	sprintf(buff + strlen(buff), "  Num other : %i\n", n->z_num_other_fields);
-	sprintf(buff + strlen(buff), "  Msg Len   : %i\n", n->z_message_len);
-	owl_fmtext_append_normal(&fm, buff);
-	
-	sprintf(buff, "  Fields    : %i\n", owl_zephyr_get_num_fields(n));
-	owl_fmtext_append_normal(&fm, buff);
-	
+	owl_fmtext_appendf_normal(&fm, "  Port      : %i\n", ntohs(n->z_port));
+	owl_fmtext_appendf_normal(&fm, "  Auth      : %s\n", owl_zephyr_get_authstr(n));
+
+	/* FIXME make these more descriptive */
+	owl_fmtext_appendf_normal(&fm, "  Checkd Ath: %i\n", n->z_checked_auth);
+	owl_fmtext_appendf_normal(&fm, "  Multi notc: %s\n", n->z_multinotice);
+	owl_fmtext_appendf_normal(&fm, "  Num other : %i\n", n->z_num_other_fields);
+	owl_fmtext_appendf_normal(&fm, "  Msg Len   : %i\n", n->z_message_len);
+
 	fields=owl_zephyr_get_num_fields(n);
+	owl_fmtext_appendf_normal(&fm, "  Fields    : %i\n", fields);
+
 	for (i=0; i<fields; i++) {
-	  sprintf(buff, "  Field %i   : ", i+1);
-	  
 	  ptr=owl_zephyr_get_field_as_utf8(n, i+1);
 	  len=strlen(ptr);
@@ -1566,20 +1536,17 @@
 	  }
 	  owl_free(ptr);
-	  
+
 	  for (j=0; j<strlen(tmpbuff); j++) {
 	    if (tmpbuff[j]=='\n') tmpbuff[j]='~';
 	    if (tmpbuff[j]=='\r') tmpbuff[j]='!';
 	  }
-	  
-	  strcat(buff, tmpbuff);
-	  strcat(buff, "\n");
-	  owl_fmtext_append_normal(&fm, buff);
+
+	  owl_fmtext_appendf_normal(&fm, "  Field %i   : %s\n", i+1, tmpbuff);
 	}
-	owl_fmtext_append_normal(&fm, "  Default Fm:");
-	owl_fmtext_append_normal(&fm, n->z_default_format);
+	owl_fmtext_appendf_normal(&fm, "  Default Fm: %s\n", n->z_default_format);
       }
-      
-    }
-#endif    
+
+    }
+#endif
   }
 
