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

Function append_slash

sys/share/pcsys.c:131–144  ·  view source on GitHub ↗

* Add a backslash to any name not ending in /, \ or : There must * be room for the \ */

Source from the content-addressed store, hash-verified

129 * be room for the \
130 */
131void
132append_slash(char *name)
133{
134 char *ptr;
135
136 if (!*name)
137 return;
138 ptr = name + (strlen(name) - 1);
139 if (*ptr != '\\' && *ptr != '/' && *ptr != ':') {
140 *++ptr = '\\';
141 *++ptr = '\0';
142 }
143 return;
144}
145
146void
147getreturn(const char *str)

Callers 5

fopenpFunction · 0.70
pcmainFunction · 0.70
check_recordfileFunction · 0.50
adjust_prefixFunction · 0.50
cnf_line_SAVEDIRFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected