name = g_string_new("");
oidname = oid_resolved_from_string(object_identifier_id);
- g_string_sprintf(name, "Decrypted %s", oidname ? oidname : object_identifier_id);
+ g_string_printf(name, "Decrypted %s", oidname ? oidname : object_identifier_id);
/* add it as a new source */
add_new_data_source(actx->pinfo, clear_tvb, name->str);
{
g_string_append_printf(str, "with ");
#ifdef HAVE_PCAP_LIB_VERSION
- g_string_sprintfa(str, pcap_lib_version());
+ g_string_append_printf(str, pcap_lib_version());
#else
g_string_append(str, "libpcap (version unknown)");
#endif
if (args) {
while (*parts) {
- g_string_sprintfa(text,"%s%s",
- args[*(arg_pos_p++)],
- *(parts++));
+ g_string_append_printf(text,"%s%s",
+ args[*(arg_pos_p++)],
+ *(parts++));
}
}
%syntax_error {
if (!TOKEN)
- g_string_sprintfa(bd->error,"syntax error at end of file");
+ g_string_append_printf(bd->error,"syntax error at end of file");
else
- g_string_sprintfa(bd->error,"syntax error in %s at or before '%s': \n", TOKEN->location,TOKEN->text);
+ g_string_append_printf(bd->error,"syntax error in %s at or before '%s': \n", TOKEN->location,TOKEN->text);
}
%parse_failure {
- g_string_sprintfa(bd->error,"DTD parsing failure\n");
+ g_string_append_printf(bd->error,"DTD parsing failure\n");
}
%token_prefix TOKEN_
<GET_ATTR_QUOTE>{get_attr_quote} { BEGIN GET_ATTR_VAL; }
<GET_ATTR_QUOTE>. {
- g_string_sprintfa(build_data->error,
+ g_string_append_printf(build_data->error,
"error in wireshark:protocol xmpli at %s : could not find attribute value!",
location);
yyterminate();
}
if (! got_it) {
- g_string_sprintfa(build_data->error,
+ g_string_append_printf(build_data->error,
"error in wireshark:protocol xmpli at %s : no such parameter %s!",
location, attr_name);
g_free(attr_name);
%%
-{entity} if (current) g_string_sprintfa(current,"%s\n%s\n",replace_entity(yytext),location());
+{entity} if (current) g_string_append_printf(current,"%s\n%s\n",replace_entity(yytext),location());
{whitespace} if (current) g_string_append(current," ");
{newline} {
linenum++;
- if (current) g_string_sprintfa(current,"%s\n",location());
+ if (current) g_string_append_printf(current,"%s\n",location());
}
<IN_QUOTE>{non_quote} |
<IN_QUOTE>{escaped_quote} g_string_append(current,yytext);
<NAMED_ENTITY>{system} {
- g_string_sprintfa(error,"at %s:%u: file inclusion is not supported!", filename, linenum);
+ g_string_append_printf(error,"at %s:%u: file inclusion is not supported!", filename, linenum);
yyterminate();
}
<ENTITY_DONE>{special_stop} { current = output; g_string_append(current,"\n"); BEGIN OUTSIDE; }
if (replacement) {
return replacement->str;
} else {
- g_string_sprintfa(error,"dtd_preparse: in file '%s': entity %s does not exists\n", filename, entity);
+ g_string_append_printf(error,"dtd_preparse: in file '%s': entity %s does not exists\n", filename, entity);
return "";
}
if (!yyin) {
if (err)
- g_string_sprintfa(err, "Could not open file: '%s', error: %s",fullname,strerror(errno));
+ g_string_append_printf(err, "Could not open file: '%s', error: %s",fullname,strerror(errno));
return NULL;
}
<INCLUDE>[^[:blank:]\n]+ {
if ( include_stack_ptr >= MAX_INCLUDE_DEPTH ) {
- g_string_sprintfa(error, "$INCLUDE files nested to deeply\n");
+ g_string_append_printf(error, "$INCLUDE files nested to deeply\n");
yyterminate();
}
if (!yyin) {
if (errno) {
- g_string_sprintfa(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], strerror(errno) );
+ g_string_append_printf(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], strerror(errno) );
yyterminate();
}
} else {
v = g_hash_table_lookup(dict->vendors_by_name,vendor_name);
if (! v) {
- g_string_sprintfa(error, "Vendor: '%s', does not exist in %s:%i \n", vendor_name, fullpaths[include_stack_ptr], linenums[include_stack_ptr] );
+ g_string_append_printf(error, "Vendor: '%s', does not exist in %s:%i \n", vendor_name, fullpaths[include_stack_ptr], linenums[include_stack_ptr] );
BEGIN JUNK;
return;
} else {
yyin = eth_fopen(fullpaths[include_stack_ptr],"r");
if (!yyin) {
- g_string_sprintfa(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], strerror(errno) );
+ g_string_append_printf(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], strerror(errno) );
g_free(fullpaths[include_stack_ptr]);
*err_str = error->str;
g_string_free(error,FALSE);
g_free(name);
- g_string_sprintfa(fake_tap_filter," || %s",(*f)->abbrev);
+ g_string_append_printf(fake_tap_filter," || %s",(*f)->abbrev);
fake_tap = TRUE;
}
switch(type) {
case FT_STRING:
{
- g_string_sprintfa(s,"%s String:\n",dt->name);
+ g_string_append_printf(s,"%s String:\n",dt->name);
break;
}
case FT_UINT8:
case FT_UINT32:
{
int base = get_dissector_table_base(dt->name);
- g_string_sprintfa(s,"%s Integer(%i):\n",dt->name,base);
+ g_string_append_printf(s,"%s Integer(%i):\n",dt->name,base);
break;
}
default:
/* reduce the screen estate by showing fractions only where required */
int_value = (int)float_value;
if(float_value == (float)int_value) {
- g_string_sprintfa(Rates, "%.0f", float_value);
+ g_string_append_printf(Rates, "%.0f", float_value);
} else {
- g_string_sprintfa(Rates, "%.1f", float_value);
+ g_string_append_printf(Rates, "%.1f", float_value);
}
}
i++;
current_frame = g_ptr_array_index(mc->config_stack,(guint)i);
- g_string_sprintfa(mc->config_error,"%s%s at line %u",incl, current_frame->filename, current_frame->linenum);
+ g_string_append_printf(mc->config_error,"%s%s at line %u",incl, current_frame->filename, current_frame->linenum);
}
- g_string_sprintfa(mc->config_error,": %s\n",error_buffer);
+ g_string_append_printf(mc->config_error,": %s\n",error_buffer);
THROW(MateConfigError);
configuration_error(mc,"bad token %s",s);
}
- g_string_sprintfa(str,":%.2X",v);
+ g_string_append_printf(str,":%.2X",v);
}
g_strfreev(vec);
cfg->discard = DistcardPduData;
cfg->drop_unassigned = DropUnassigned;
- g_string_sprintfa(mc->protos_filter,"||%s",Field->abbrev);
+ g_string_append_printf(mc->protos_filter,"||%s",Field->abbrev);
/* flip the transport_stack */
for (i = Stack->len - 1; Stack->len; i--) {
proto_stack(A) ::= proto_stack(B) SLASH field(C). {
int* hfidp = g_malloc(sizeof(int));
- g_string_sprintfa(mc->fields_filter,"||%s",C->abbrev);
+ g_string_append_printf(mc->fields_filter,"||%s",C->abbrev);
*hfidp = C->id;
g_ptr_array_add(B,hfidp);
int* hfidp = g_malloc(sizeof(int));
*hfidp = B->id;
- g_string_sprintfa(mc->fields_filter,"||%s",B->abbrev);
+ g_string_append_printf(mc->fields_filter,"||%s",B->abbrev);
A = g_ptr_array_new();
g_ptr_array_add(A,hfidp);
yy_switch_to_buffer(include_stack[--include_stack_ptr] );
if (errno)
- g_string_sprintfa(mc->config_error, "Mate parser: Could not open file: '%s': %s", yytext, strerror(errno) );
+ g_string_append_printf(mc->config_error, "Mate parser: Could not open file: '%s': %s", yytext, strerror(errno) );
} else {
yyin = eth_fopen(filename,"r");
if (!yyin) {
- g_string_sprintfa(mc->config_error,"Mate parser: Could not open file: '%s', error: %s", filename, strerror(errno) );
+ g_string_append_printf(mc->config_error,"Mate parser: Could not open file: '%s', error: %s", filename, strerror(errno) );
return FALSE;
}
state = FALSE;
} CATCH_ALL {
state = FALSE;
- g_string_sprintfa(mc->config_error,"An unexpected error occurred");
+ g_string_append_printf(mc->config_error,"An unexpected error occurred");
}
ENDTRY;
hfidp = g_malloc(sizeof(int));
*hfidp = hfi->id;
g_ptr_array_add(range_ptr_arr,(gpointer)hfidp);
- g_string_sprintfa(matecfg->fields_filter, "||%s",ranges[i]);
+ g_string_append_printf(matecfg->fields_filter, "||%s",ranges[i]);
} else {
g_strfreev(ranges);
return g_strdup_printf("no such proto: '%s'",ranges[i]);;
mate_cfg_pdu* cfg = p;
new_attr_hfri(cfg->name,cfg->my_hfids,(gchar*) v);
- g_string_sprintfa(matecfg->fields_filter,"||%s",my_protoname(*(int*)k));
+ g_string_append_printf(matecfg->fields_filter,"||%s",my_protoname(*(int*)k));
}
static void analyze_transform_hfrs(gchar* name, GPtrArray* transforms, GHashTable* hfids) {
for(c=avpl->null.next; c->avp; c = c->next) {
avp_s = avp_to_str(c->avp);
- g_string_sprintfa(s," %s;",avp_s);
+ g_string_append_printf(s," %s;",avp_s);
g_free(avp_s);
}
for(c=avpl->null.next; c->avp; c = c->next) {
avp_s = avp_to_str(c->avp);
- g_string_sprintfa(s," .%s;",avp_s);
+ g_string_append_printf(s," .%s;",avp_s);
g_free(avp_s);
}