MCPcopy Create free account
hub / github.com/NetHack/NetHack / strbuf_empty

Function strbuf_empty

src/strutil.c:48–54  ·  view source on GitHub ↗

strbuf_empty() frees allocated memory and set strbuf to initial state */

Source from the content-addressed store, hash-verified

46
47/* strbuf_empty() frees allocated memory and set strbuf to initial state */
48void
49strbuf_empty(strbuf_t *strbuf)
50{
51 if (strbuf->str != NULL && strbuf->str != strbuf->buf)
52 free((genericptr_t) strbuf->str);
53 strbuf_init(strbuf);
54}
55
56/* strbuf_nl_to_crlf() converts all occurrences of \n to \r\n */
57void

Callers 3

mswin_raw_print_flushFunction · 0.85
do_write_config_fileFunction · 0.85

Calls 1

strbuf_initFunction · 0.85

Tested by

no test coverage detected