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

Function append_slash

sys/unix/unixmain.c:680–693  ·  view source on GitHub ↗

* Add a slash to any name not ending in /. There must * be room for the / */

Source from the content-addressed store, hash-verified

678 * be room for the /
679 */
680void
681append_slash(char *name)
682{
683 char *ptr;
684
685 if (!*name)
686 return;
687 ptr = name + (strlen(name) - 1);
688 if (*ptr != '/') {
689 *++ptr = '/';
690 *++ptr = '\0';
691 }
692 return;
693}
694
695boolean
696check_user_string(const char *optstr)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected