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; }
static int any_set_or_all_clr(BITS *bits, unsigned long masks) { return (bits->mask & MASK0(masks)) || (~bits->mask & MASK1(masks)) == MASK1(masks); }
static int all_clr_and_any_clr(BITS *bits, unsigned long masks) { return (~bits->mask & MASK1(masks)) && (~bits->mask & MASK0(masks)) == MASK0(masks); }
static int any_set_and_any_clr(BITS *bits, unsigned long masks) { return (bits->mask & MASK0(masks)) && (~bits->mask & MASK1(masks)); }
static int all_set_and_any_set(BITS *bits, unsigned long masks) { return (bits->mask & MASK1(masks)) && (bits->mask & MASK0(masks)) == MASK0(masks); }
static void set_clr_bits_mask(BITS *bits, unsigned long masks) { bits->mask = (bits->mask | MASK0(masks)) & ~MASK1(masks); }