Go to the source code of this file.
Macros | |
#define | lbitlib_c |
#define | LUA_LIB |
#define | LUA_NBITS 32 |
#define | ALLONES (~(((~(lua_Unsigned)0) << (LUA_NBITS - 1)) << 1)) |
#define | trim(x) ((x) & ALLONES) |
#define | mask(n) (~((ALLONES << 1) << ((n) - 1))) |
Typedefs | |
typedef lua_Unsigned | b_uint |
Functions | |
static b_uint | andaux (lua_State *L) |
static int | b_and (lua_State *L) |
static int | b_test (lua_State *L) |
static int | b_or (lua_State *L) |
static int | b_xor (lua_State *L) |
static int | b_not (lua_State *L) |
static int | b_shift (lua_State *L, b_uint r, int i) |
static int | b_lshift (lua_State *L) |
static int | b_rshift (lua_State *L) |
static int | b_arshift (lua_State *L) |
static int | b_rot (lua_State *L, int i) |
static int | b_lrot (lua_State *L) |
static int | b_rrot (lua_State *L) |
static int | fieldargs (lua_State *L, int farg, int *width) |
static int | b_extract (lua_State *L) |
static int | b_replace (lua_State *L) |
LUAMOD_API int | luaopen_bit32 (lua_State *L) |
Variables | |
static const luaL_Reg | bitlib [] |
#define ALLONES (~(((~(lua_Unsigned)0) << (LUA_NBITS - 1)) << 1)) |
Definition at line 21 of file lbitlib.cpp.
Referenced by b_arshift().
#define lbitlib_c |
Definition at line 6 of file lbitlib.cpp.
#define LUA_LIB |
Definition at line 7 of file lbitlib.cpp.
#define LUA_NBITS 32 |
Definition at line 17 of file lbitlib.cpp.
Referenced by b_arshift(), b_rot(), b_shift(), and fieldargs().
Definition at line 28 of file lbitlib.cpp.
Referenced by cutter::add_sub_image(), AllocFormat(), editor::context_manager::apply_mask_dialog(), b_extract(), b_replace(), create_cursor(), db_sethook(), color_range::debug(), makemask(), and editor::editor_map::mask_to().
Definition at line 24 of file lbitlib.cpp.
Referenced by andaux(), b_arshift(), b_not(), b_or(), b_rot(), b_shift(), and b_xor().
typedef lua_Unsigned b_uint |
Definition at line 31 of file lbitlib.cpp.
Definition at line 35 of file lbitlib.cpp.
References i, lua_gettop(), luaL_checkunsigned(), and trim.
Definition at line 44 of file lbitlib.cpp.
References andaux(), and lua_pushunsigned().
Definition at line 112 of file lbitlib.cpp.
References ALLONES, b_shift(), i, LUA_NBITS, lua_pushunsigned(), luaL_checkint, luaL_checkunsigned(), and trim.
Definition at line 166 of file lbitlib.cpp.
References fieldargs(), lua_pushunsigned(), luaL_checkunsigned(), and mask.
Definition at line 138 of file lbitlib.cpp.
References b_rot(), and luaL_checkint.
Definition at line 102 of file lbitlib.cpp.
References b_shift(), luaL_checkint, and luaL_checkunsigned().
Definition at line 78 of file lbitlib.cpp.
References lua_pushunsigned(), luaL_checkunsigned(), and trim.
Definition at line 58 of file lbitlib.cpp.
References i, lua_gettop(), lua_pushunsigned(), luaL_checkunsigned(), and trim.
Definition at line 176 of file lbitlib.cpp.
References fieldargs(), lua_pushunsigned(), luaL_checkunsigned(), and mask.
Definition at line 127 of file lbitlib.cpp.
References i, LUA_NBITS, lua_pushunsigned(), luaL_checkunsigned(), and trim.
Definition at line 143 of file lbitlib.cpp.
References b_rot(), and luaL_checkint.
Definition at line 107 of file lbitlib.cpp.
References b_shift(), luaL_checkint, and luaL_checkunsigned().
Definition at line 85 of file lbitlib.cpp.
References i, LUA_NBITS, lua_pushunsigned(), and trim.
Referenced by b_arshift(), b_lshift(), and b_rshift().
Definition at line 51 of file lbitlib.cpp.
References andaux(), and lua_pushboolean().
Definition at line 68 of file lbitlib.cpp.
References i, lua_gettop(), lua_pushunsigned(), luaL_checkunsigned(), and trim.
Definition at line 154 of file lbitlib.cpp.
References LUA_NBITS, luaL_argcheck, luaL_checkint, luaL_error(), and luaL_optint.
Referenced by b_extract(), and b_replace().
LUAMOD_API int luaopen_bit32 | ( | lua_State * | L | ) |
Definition at line 207 of file lbitlib.cpp.
References luaL_newlib.
Referenced by lua_kernel_base::lua_kernel_base().
|
static |
Definition at line 189 of file lbitlib.cpp.