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

Function basenameFileFilter

outdated/sys/mac/mrecover.c:917–932  ·  view source on GitHub ↗

show only .0 files in get file dialog */

Source from the content-addressed store, hash-verified

915
916/* show only <pid-plname>.0 files in get file dialog */
917pascal Boolean
918basenameFileFilter(ParmBlkPtr pPB)
919{
920 unsigned char *pC;
921
922 if (!(pC = (unsigned char *) pPB->fileParam.ioNamePtr))
923 return true;
924
925 if ((*pC < 4) || (*pC > 28)) /* save/ 1name .0 */
926 return true;
927
928 if ((pC[*pC - 1] == '.') && (pC[*pC] == '0')) /* bingo! */
929 return false;
930
931 return true;
932}
933
934static void
935beginRecover()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected