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

Function checkcontrol

third-party/lua-5.4.6/src/lauxlib.c:1066–1076  ·  view source on GitHub ↗

** Check whether message is a control message. If so, execute the ** control or ignore it if unknown. */

Source from the content-addressed store, hash-verified

1064** control or ignore it if unknown.
1065*/
1066static int checkcontrol (lua_State *L, const char *message, int tocont) {
1067 if (tocont || *(message++) != '@') /* not a control message? */
1068 return 0;
1069 else {
1070 if (strcmp(message, "off") == 0)
1071 lua_setwarnf(L, warnfoff, L); /* turn warnings off */
1072 else if (strcmp(message, "on") == 0)
1073 lua_setwarnf(L, warnfon, L); /* turn warnings on */
1074 return 1; /* it was a control message */
1075 }
1076}
1077
1078
1079static void warnfoff (void *ud, const char *message, int tocont) {

Callers 2

warnfoffFunction · 0.70
warnfonFunction · 0.70

Calls 1

lua_setwarnfFunction · 0.70

Tested by

no test coverage detected