MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / l_checkmode

Function l_checkmode

third-party/lua-5.5.0/src/liolib.c:39–43  ·  view source on GitHub ↗

Check whether 'mode' matches '[rwa]%+?[L_MODEEXT]*' */

Source from the content-addressed store, hash-verified

37
38/* Check whether 'mode' matches '[rwa]%+?[L_MODEEXT]*' */
39static int l_checkmode (const char *mode) {
40 return (*mode != '\0' && strchr("rwa", *(mode++)) != NULL &&
41 (*mode != '+' || ((void)(++mode), 1)) && /* skip if char is '+' */
42 (strspn(mode, L_MODEEXT) == strlen(mode))); /* check extensions */
43}
44
45#endif
46

Callers 1

io_openFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected