Ejemplo n.º 1
0
Archivo: luac.c Proyecto: fiskercui/lua
int main(int argc, char* argv[])
{
	int a = NUM_OPCODES;
	int b = MASK1(2, 3);
	int c = MASK0(2,3);
	lua_State* L;
	struct Smain s;
	int i = doargs(argc, argv);
	argc -= i; argv += i;
	if (argc <= 0) usage("no input files given");
	L = lua_open();
	if (L == NULL) fatal("not enough memory for state");
	s.argc = argc;
	s.argv = argv;
	if (lua_cpcall(L, pmain, &s) != 0) fatal(lua_tostring(L, -1));
	lua_close(L);
	return EXIT_SUCCESS;
}
Ejemplo n.º 2
0
static int any_set_or_all_clr(BITS *bits, unsigned long masks)
{
	return (bits->mask & MASK0(masks)) || (~bits->mask & MASK1(masks)) == MASK1(masks);
}
Ejemplo n.º 3
0
static int all_clr_and_any_clr(BITS *bits, unsigned long masks)
{
	return (~bits->mask & MASK1(masks)) && (~bits->mask & MASK0(masks)) == MASK0(masks);
}
Ejemplo n.º 4
0
static int any_set_and_any_clr(BITS *bits, unsigned long masks)
{
	return (bits->mask & MASK0(masks)) && (~bits->mask & MASK1(masks));
}
Ejemplo n.º 5
0
static int all_set_and_any_set(BITS *bits, unsigned long masks)
{
	return (bits->mask & MASK1(masks)) && (bits->mask & MASK0(masks)) == MASK0(masks);
}
Ejemplo n.º 6
0
static void set_clr_bits_mask(BITS *bits, unsigned long masks)
{
	bits->mask =  (bits->mask | MASK0(masks)) & ~MASK1(masks);
}