MCPcopy Create free account
hub / github.com/Entware/Entware / str_append

Function str_append

scripts/config/util.c:52–63  ·  view source on GitHub ↗

Append to growable string */

Source from the content-addressed store, hash-verified

50
51/* Append to growable string */
52void str_append(struct gstr *gs, const char *s)
53{
54 size_t l;
55 if (s) {
56 l = strlen(gs->s) + strlen(s) + 1;
57 if (l > gs->len) {
58 gs->s = xrealloc(gs->s, l);
59 gs->len = l;
60 }
61 strcat(gs->s, s);
62 }
63}
64
65/* Append printf formatted string to growable string */
66void str_printf(struct gstr *gs, const char *fmt, ...)

Callers 7

expr_print_gstr_helperFunction · 0.85
str_printfFunction · 0.85
get_dep_strFunction · 0.85
get_prompt_strFunction · 0.85
get_symbol_props_strFunction · 0.85
get_symbol_strFunction · 0.85
get_relations_strFunction · 0.85

Calls 1

xreallocFunction · 0.85

Tested by

no test coverage detected