MCPcopy Create free account
hub / github.com/coreutils/coreutils / splitbuf_append_byte

Function splitbuf_append_byte

src/env.c:300–308  ·  view source on GitHub ↗

In SS, append C to the last string. */

Source from the content-addressed store, hash-verified

298
299/* In SS, append C to the last string. */
300static void
301splitbuf_append_byte (struct splitbuf *ss, char c)
302{
303 idx_t string_bytes = (intptr_t) ss->argv[ss->argc];
304 if (ss->half_alloc * sizeof *ss->argv <= string_bytes)
305 splitbuf_grow (ss);
306 ((char *) (ss->argv + ss->half_alloc))[string_bytes] = c;
307 ss->argv[ss->argc] = (char *) (intptr_t) (string_bytes + 1);
308}
309
310/* If SS's most recent character was a separator, finish off its
311 previous argument and start a new one. */

Callers 2

check_start_new_argFunction · 0.85
build_argvFunction · 0.85

Calls 1

splitbuf_growFunction · 0.85

Tested by

no test coverage detected