Lines Matching refs:opt
111 static size_t optsize (lua_State *L, char opt, const char **fmt) { in optsize() argument
112 switch (opt) { in optsize()
137 static int gettoalign (size_t len, Header *h, int opt, size_t size) { in gettoalign() argument
138 if (size == 0 || opt == 'c') return 0; in gettoalign()
148 static void controloptions (lua_State *L, int opt, const char **fmt, in controloptions() argument
150 switch (opt) { in controloptions()
162 const char *msg = lua_pushfstring(L, "invalid format option '%c'", opt); in controloptions()
218 int opt = *fmt++; in b_pack() local
219 size_t size = optsize(L, opt, &fmt); in b_pack()
220 int toalign = gettoalign(totalsize, &h, opt, size); in b_pack()
223 switch (opt) { in b_pack()
251 if (opt == 's') { in b_pack()
257 default: controloptions(L, opt, &fmt, &h); in b_pack()
302 int opt = *fmt++; in b_unpack() local
303 size_t size = optsize(L, opt, &fmt); in b_unpack()
304 pos += gettoalign(pos, &h, opt, size); in b_unpack()
307 switch (opt) { in b_unpack()
310 int issigned = islower(opt); in b_unpack()
351 default: controloptions(L, opt, &fmt, &h); in b_unpack()
366 int opt = *fmt++; in b_size() local
367 size_t size = optsize(L, opt, &fmt); in b_size()
368 pos += gettoalign(pos, &h, opt, size); in b_size()
369 if (opt == 's') in b_size()
371 else if (opt == 'c' && size == 0) in b_size()
373 if (!isalnum(opt)) in b_size()
374 controloptions(L, opt, &fmt, &h); in b_size()