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

Function regularize

sys/share/pcunix.c:203–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201#endif /* PC_LOCKING */
202
203void
204regularize(char *s)
205/*
206 * normalize file name - we don't like .'s, /'s, spaces, and
207 * lots of other things
208 */
209{
210 char *lp;
211
212 for (lp = s; *lp; lp++)
213 if (*lp <= ' ' || *lp == '"' || (*lp >= '*' && *lp <= ',')
214 || *lp == '.' || *lp == '/' || (*lp >= ':' && *lp <= '?') ||
215#ifdef OS2
216 *lp == '&' || *lp == '(' || *lp == ')' ||
217#endif
218 *lp == '|' || *lp >= 127 || (*lp >= '[' && *lp <= ']'))
219 *lp = '_';
220}
221
222#ifdef __EMX__
223void

Callers 1

pcmainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected