Lines Matching refs:status

162 ** Check whether 'status' is not OK and, if so, prints the error
166 static int report (lua_State *L, int status) {
167 if (status != LUA_OK) {
172 return status;
199 int status;
205 status = lua_pcall(L, narg, nres, base);
208 return status;
239 static int dochunk (lua_State *L, int status) {
240 if (status == LUA_OK) status = docall(L, 0, 0);
241 return report(L, status);
260 int status;
263 status = docall(L, 1, 1); /* call 'require(name)' */
264 if (status == LUA_OK)
266 return report(L, status);
287 ** Check whether 'status' signals a syntax error and the error
291 static int incomplete (lua_State *L, int status) {
292 if (status == LUA_ERRSYNTAX) {
335 int status = luaL_loadbuffer(L, retline, strlen(retline), "=stdin");
336 if (status == LUA_OK) {
343 return status;
354 int status = luaL_loadbuffer(L, line, len, "=stdin"); /* try it */
355 if (!incomplete(L, status) || !pushline(L, 0)) {
357 return status; /* cannot or should not try to add continuation line */
369 ** the final status of load/call with the resulting function (if any)
373 int status;
377 if ((status = addreturn(L)) != LUA_OK) /* 'return ...' did not work? */
378 status = multiline(L); /* try as command, maybe with continuation lines */
381 return status;
406 int status;
409 while ((status = loadline(L)) != -1) {
410 if (status == LUA_OK)
411 status = docall(L, 0, LUA_MULTRET);
412 if (status == LUA_OK) l_print(L);
413 else report(L, status);
438 int status;
442 status = luaL_loadfile(L, fname);
443 if (status == LUA_OK) {
445 status = docall(L, n, LUA_MULTRET);
447 return report(L, status);
520 int status;
524 status = (option == 'e')
527 if (status != LUA_OK) return 0;
597 int status, result;
606 status = lua_pcall(L, 2, 1, 0); /* do the call */
608 report(L, status);
610 return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE;