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

Function nt_regularize

util/sfctool.c:857–866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855 */
856
857void nt_regularize(char* s) /* normalize file name */
858{
859 unsigned char *lp;
860
861 for (lp = (unsigned char *) s; *lp; lp++)
862 if (*lp == '?' || *lp == '"' || *lp == '\\' || *lp == '/'
863 || *lp == '>' || *lp == '<' || *lp == '*' || *lp == '|'
864 || *lp == ':' || (*lp > 127))
865 *lp = '_';
866}
867#endif /* WIN32 */
868
869/* duplicated code from options.c */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected