--- epan/proto.h@rev=HEAD	2003-10-27 14:12:18.205921400 +0100
+++ epan/proto.h	2003-10-27 15:19:47.257865800 +0100
@@ -376,6 +376,10 @@
 	gint length, const char* value, const char *format, ...);
 #endif
 
+extern proto_item *
+proto_tree_append_string(proto_tree *tree, int hfindex, proto_item *pi,
+		const char *str);
+
 /* Add a FT_BOOLEAN to a proto_tree */
 extern proto_item *
 proto_tree_add_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
--- epan/proto.c@rev=HEAD	2003-10-27 14:06:09.116150100 +0100
+++ epan/proto.c	2003-10-27 16:26:29.883233900 +0100
@@ -1236,6 +1236,36 @@
 	return pi;
 }
 
+/* Appends string data to a FT_STRING or FT_STRINGZ, allowing progressive
+ * field info update instead of only updating the representation as does
+ * proto_item_append_text()
+ */
+proto_item *
+proto_tree_append_string(proto_tree *tree, int hfindex, proto_item *pi,
+		const char *str)
+{
+	header_field_info *hfinfo;
+	field_info *fi;
+	gchar *old_str, *new_str;
+
+	if (! tree)
+		return (NULL);
+	if (! pi)
+		return (NULL);
+	if (! str)
+		return pi;
+
+	hfinfo = proto_registrar_get_nth(hfindex);
+	g_assert(hfinfo->type == FT_STRING || hfinfo->type == FT_STRINGZ);
+	fi = PITEM_FINFO(pi);
+	old_str = fvalue_get(fi->value);
+	new_str = g_malloc (strlen(old_str)+strlen(str)+1);
+	sprintf(new_str, "%s%s", old_str, str);
+	fvalue_set(fi->value, new_str, TRUE);
+
+	return pi;
+}
+
 /* Set the FT_STRING value */
 static void
 proto_tree_set_string(field_info *fi, const char* value,
