Lines Matching refs:pos
296 size_t pos = luaL_optinteger(L, 3, 1); in b_unpack() local
297 luaL_argcheck(L, pos > 0, 3, "offset must be 1 or greater"); in b_unpack()
298 pos--; /* Lua indexes are 1-based, but here we want 0-based for C in b_unpack()
305 pos += gettoalign(pos, &h, opt, size); in b_unpack()
306 luaL_argcheck(L, size <= ld && pos <= ld - size, in b_unpack()
314 lua_Number res = getinteger(data+pos, h.endian, issigned, size); in b_unpack()
323 memcpy(&f, data+pos, size); in b_unpack()
330 memcpy(&d, data+pos, size); in b_unpack()
341 luaL_argcheck(L, size <= ld && pos <= ld - size, in b_unpack()
344 lua_pushlstring(L, data+pos, size); n++; in b_unpack()
348 const char *e = (const char *)memchr(data+pos, '\0', ld - pos); in b_unpack()
351 size = (e - (data+pos)) + 1; in b_unpack()
352 lua_pushlstring(L, data+pos, size - 1); n++; in b_unpack()
357 pos += size; in b_unpack()
359 lua_pushinteger(L, pos + 1); /* next position */ in b_unpack()
367 size_t pos = 0; in b_size() local
372 pos += gettoalign(pos, &h, opt, size); in b_size()
379 pos += size; in b_size()
381 lua_pushinteger(L, pos); in b_size()