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

Function append_slash

sys/windows/windsys.c:1097–1110  ·  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

1095 * be room for the \
1096 */
1097void
1098append_slash(char *name)
1099{
1100 char *ptr;
1101
1102 if (!*name)
1103 return;
1104 ptr = name + (strlen(name) - 1);
1105 if (*ptr != '\\' && *ptr != '/' && *ptr != ':') {
1106 *++ptr = '\\';
1107 *++ptr = '\0';
1108 }
1109 return;
1110}
1111
1112void set_default_prefix_locations(const char *programPath);
1113boolean

Callers 2

build_environment_pathFunction · 0.70
windsys.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected