Remove depreciated functions g_string_sprint, g_string_sprintfa.

svn path=/trunk/; revision=25238
This commit is contained in:
Anders Broman 2008-05-05 19:52:59 +00:00
parent f51d73bb5d
commit 45b8ffd1ec
5 changed files with 20 additions and 20 deletions

View File

@ -212,7 +212,7 @@ static gint add_message(tvbuff_t * tvb, gint offset, proto_tree * tree,
proto_tree_add_item(msg_tree, hf_armagetronad_descriptor_id, tvb,
offset, 2, FALSE);
if (info)
g_string_sprintfa(info, "%s, ", descriptor);
g_string_append_printf(info, "%s, ", descriptor);
/* MessageID field */
proto_tree_add_item(msg_tree, hf_armagetronad_message_id, tvb,

View File

@ -1588,7 +1588,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
/* snarf each value in path */
for (j = 0; j < length; j++) {
g_string_sprintfa(as_path_gstr, "%u%s",
g_string_append_printf(as_path_gstr, "%u%s",
(asn_len == 2) ?
tvb_get_ntohs(tvb, q) : tvb_get_ntohl(tvb, q),
(type == AS_SET || type == AS_CONFED_SET) ?
@ -1616,7 +1616,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
/* check for empty AS_PATH */
if (tlen == 0)
g_string_sprintf(as_path_gstr, "empty");
g_string_printf(as_path_gstr, "empty");
ti = proto_tree_add_text(subtree, tvb, o + i, tlen + aoff,
"%s: %s (%u byte%s)",
@ -1703,7 +1703,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
else if (tvb_get_ntohl(tvb, q) == BGP_COMM_NO_EXPORT_SUBCONFED)
g_string_append(communities_gstr, "NO_EXPORT_SUBCONFED ");
else {
g_string_sprintfa(communities_gstr, "%u:%u ",
g_string_append_printf(communities_gstr, "%u:%u ",
tvb_get_ntohs(tvb, q),
tvb_get_ntohs(tvb, q + 2));
}
@ -1748,7 +1748,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
/* snarf each cluster list */
while (q < end) {
ipaddr = tvb_get_ipv4(tvb, q);
g_string_sprintfa(cluster_list_gstr, "%s ", ip_to_str((guint8 *)&ipaddr));
g_string_append_printf(cluster_list_gstr, "%s ", ip_to_str((guint8 *)&ipaddr));
q += 4;
}
/* cleanup end of string */
@ -1890,7 +1890,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
/* snarf each value in path */
for (j = 0; j < length; j++) {
g_string_sprintfa(as_path_gstr, "%u%s",
g_string_append_printf(as_path_gstr, "%u%s",
(asn_len == 2) ?
tvb_get_ntohs(tvb, q) : tvb_get_ntohl(tvb, q),
(type == AS_SET || type == AS_CONFED_SET) ? ", " : " ");

View File

@ -919,7 +919,7 @@ dissect_fix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
summary_label = g_string_new(msg_type);
} else {
summary_label = g_string_new("FIX Message");
g_string_sprintfa(summary_label, " (%s)", value);
g_string_append_printf(summary_label, " (%s)", value);
}
}
@ -1093,7 +1093,7 @@ dissect_fix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
enhance the value display for the MsgType field */
label = g_string_new(value);
msg_type = (char *)g_datalist_get_data(&msg_types, value);
if (NULL != msg_type) g_string_sprintfa(label, " (%s)", msg_type);
if (NULL != msg_type) g_string_append_printf(label, " (%s)", msg_type);
proto_tree_add_string(fix_tree, hf_fix_MsgType, tvb, offset, field_len, label->str);
g_string_free(label, TRUE);
break;
@ -3026,7 +3026,7 @@ dissect_fix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO)) {
if (msg_count > 1)
g_string_sprintfa(summary_label, " (%d)", msg_count);
g_string_append_printf(summary_label, " (%d)", msg_count);
col_add_str(pinfo->cinfo, COL_INFO, summary_label->str);
g_string_free(summary_label, TRUE);
}

View File

@ -10989,22 +10989,22 @@ proto_register_ieee80211 (void)
key_desc = g_string_new("");
wep_keystr[i] = NULL;
/* prefs_register_*_preference() expects unique strings, so
* we build them using g_string_sprintf and just leave them
* we build them using g_string_printf and just leave them
* allocated. */
#ifdef HAVE_AIRPDCAP
g_string_sprintf(key_name, "wep_key%d", i + 1);
g_string_sprintf(key_title, "Key #%d", i + 1);
g_string_printf(key_name, "wep_key%d", i + 1);
g_string_printf(key_title, "Key #%d", i + 1);
/* Davide Schiera (2006-11-26): modified keys input tooltip */
g_string_sprintf(key_desc,
g_string_printf(key_desc,
"Key #%d string can be:"
" <wep hexadecimal key>;"
" wep:<wep hexadecimal key>;"
" wpa-pwd:<passphrase>[:<ssid>];"
" wpa-psk:<wpa hexadecimal key>", i + 1);
#else
g_string_sprintf(key_name, "wep_key%d", i + 1);
g_string_sprintf(key_title, "WEP key #%d", i + 1);
g_string_sprintf(key_desc, "WEP key #%d can be:"
g_string_printf(key_name, "wep_key%d", i + 1);
g_string_printf(key_title, "WEP key #%d", i + 1);
g_string_printf(key_desc, "WEP key #%d can be:"
" <wep hexadecimal key>;"
" wep:<wep hexadecimal key>", i + 1);
#endif

View File

@ -774,7 +774,7 @@ static gchar* fully_qualified_name(GPtrArray* hier, gchar* name, gchar* proto_na
g_string_append(s,".");
for (i = 1; i < hier->len; i++) {
g_string_sprintfa(s, "%s.",(gchar*)g_ptr_array_index(hier,i));
g_string_append_printf(s, "%s.",(gchar*)g_ptr_array_index(hier,i));
}
g_string_append(s,name);
@ -806,7 +806,7 @@ static xml_ns_t* make_xml_hier(gchar* elem_name,
}
if (! ( orig = g_hash_table_lookup(elements,elem_name) )) {
g_string_sprintfa(error,"element '%s' is not defined\n", elem_name);
g_string_append_printf(error,"element '%s' is not defined\n", elem_name);
return NULL;
}
@ -905,7 +905,7 @@ static void register_dtd(dtd_build_data_t* dtd_data, GString* errors) {
element->elements = g_hash_table_new(g_str_hash,g_str_equal);
if( g_hash_table_lookup(elements,element->name) ) {
g_string_sprintfa(errors,"element %s defined more than once\n", element->name);
g_string_append_printf(errors,"element %s defined more than once\n", element->name);
free_elements(NULL,element,NULL);
} else {
g_hash_table_insert(elements,element->name,element);
@ -921,7 +921,7 @@ static void register_dtd(dtd_build_data_t* dtd_data, GString* errors) {
xml_ns_t* element = g_hash_table_lookup(elements,nl->name);
if (!element) {
g_string_sprintfa(errors,"element %s is not defined\n", nl->name);
g_string_append_printf(errors,"element %s is not defined\n", nl->name);
goto next_attribute;
}