/* Prints (calling the Lua 'print' function) any values on the stack  */
static void l_print(lua_State *L)
/* Prints (calling the Lua 'print' function) any values on the stack  */
static void l_print(lua_State *L)
{
    luaL_checkstack(L, LUA_MINSTACK, "too many results to print");
    lua_getglobal(L, "print");
    lua_insert(L, 1);
    if (lua_pcall(L, n, 0, 0) != LUA_OK)
      l_message(progname, lua_pushfstring(L, "error calling 'print' (%s)",
                                             lua_tostring(L, -1)));
  }
}