Lines Matching refs:off
2224 off_t off = (off_t) luaL_optinteger(L, -1, 0); in magnet_respbody_add() local
2235 if (off > sce->st.st_size) in magnet_respbody_add()
2236 off = sce->st.st_size; in magnet_respbody_add()
2237 else if (off < 0) { in magnet_respbody_add()
2238 off = sce->st.st_size - off; in magnet_respbody_add()
2239 if (off < 0) off = 0; in magnet_respbody_add()
2241 if (len < 0 || sce->st.st_size - off < len) in magnet_respbody_add()
2242 len = sce->st.st_size - off; in magnet_respbody_add()
2244 http_chunk_append_file_ref_range(r, sce, off, len); in magnet_respbody_add()
2548 off_t off = lua_isnil(L, -1) ? 0 : (off_t) lua_tointegerx(L, -1, &isnum); in magnet_attach_content() local
2550 off = 0; in magnet_attach_content()
2562 if (off < 0) { in magnet_attach_content()
2566 } else if (len >= off) { in magnet_attach_content()
2567 len -= off; in magnet_attach_content()
2581 if (len == -1 || sce->st.st_size - off < len) in magnet_attach_content()
2582 len = sce->st.st_size - off; in magnet_attach_content()
2584 http_chunk_append_file_ref_range(r, sce, off, len); in magnet_attach_content()
2588 lua_tostring(L, -3), (long long)off); in magnet_attach_content()