Lines Matching refs:h
107 #define defaultoptions(h) ((h)->endian = native.endian, (h)->align = 1) argument
137 static int gettoalign (size_t len, Header *h, int opt, size_t size) { in gettoalign() argument
139 if (size > (size_t)h->align) in gettoalign()
140 size = h->align; /* respect max. alignment */ in gettoalign()
149 Header *h) { in controloptions() argument
152 case '>': h->endian = BIG; return; in controloptions()
153 case '<': h->endian = LITTLE; return; in controloptions()
158 h->align = a; in controloptions()
211 Header h; in b_pack() local
214 defaultoptions(&h); in b_pack()
220 int toalign = gettoalign(totalsize, &h, opt, size); in b_pack()
226 putinteger(L, &b, arg++, h.endian, size); in b_pack()
235 correctbytes((char *)&f, size, h.endian); in b_pack()
241 correctbytes((char *)&d, size, h.endian); in b_pack()
257 default: controloptions(L, opt, &fmt, &h); in b_pack()
294 Header h; in b_unpack() local
299 defaultoptions(&h); in b_unpack()
304 pos += gettoalign(pos, &h, opt, size); in b_unpack()
311 lua_Number res = getinteger(data+pos, h.endian, issigned, size); in b_unpack()
321 correctbytes((char *)&f, sizeof(f), h.endian); in b_unpack()
328 correctbytes((char *)&d, sizeof(d), h.endian); in b_unpack()
351 default: controloptions(L, opt, &fmt, &h); in b_unpack()
361 Header h; in b_size() local
364 defaultoptions(&h); in b_size()
368 pos += gettoalign(pos, &h, opt, size); in b_size()
374 controloptions(L, opt, &fmt, &h); in b_size()