Lines Matching refs:opt
109 static size_t optsize (lua_State *L, char opt, const char **fmt) { in optsize() argument
110 switch (opt) { in optsize()
135 static int gettoalign (size_t len, Header *h, int opt, size_t size) { in gettoalign() argument
136 if (size == 0 || opt == 'c') return 0; in gettoalign()
146 static void controloptions (lua_State *L, int opt, const char **fmt, in controloptions() argument
148 switch (opt) { in controloptions()
160 const char *msg = lua_pushfstring(L, "invalid format option '%c'", opt); in controloptions()
216 int opt = *fmt++; in b_pack() local
217 size_t size = optsize(L, opt, &fmt); in b_pack()
218 int toalign = gettoalign(totalsize, &h, opt, size); in b_pack()
221 switch (opt) { in b_pack()
249 if (opt == 's') { in b_pack()
255 default: controloptions(L, opt, &fmt, &h); in b_pack()
303 int opt = *fmt++; in b_unpack() local
304 size_t size = optsize(L, opt, &fmt); in b_unpack()
305 pos += gettoalign(pos, &h, opt, size); in b_unpack()
310 switch (opt) { in b_unpack()
313 int issigned = islower(opt); in b_unpack()
355 default: controloptions(L, opt, &fmt, &h); in b_unpack()
370 int opt = *fmt++; in b_size() local
371 size_t size = optsize(L, opt, &fmt); in b_size()
372 pos += gettoalign(pos, &h, opt, size); in b_size()
373 if (opt == 's') in b_size()
375 else if (opt == 'c' && size == 0) in b_size()
377 if (!isalnum(opt)) in b_size()
378 controloptions(L, opt, &fmt, &h); in b_size()