Lines Matching refs:kstr
150 kstring_t kstr = {0}; in cram_index_load() local
194 if (kputsn(buf, len, &kstr) < 0) in cram_index_load()
198 if (len < 0 || kstr.l < 2) in cram_index_load()
205 if (kstr.s[0] == 31 && (uc)kstr.s[1] == 139) { in cram_index_load()
207 char *s = zlib_mem_inflate(kstr.s, kstr.l, &l); in cram_index_load()
211 free(kstr.s); in cram_index_load()
212 kstr.s = s; in cram_index_load()
213 kstr.l = l; in cram_index_load()
214 kstr.m = l; // conservative estimate of the size allocated in cram_index_load()
215 if (kputsn("", 0, &kstr) < 0) // ensure kstr.s is NUL-terminated in cram_index_load()
221 while (pos < kstr.l) { in cram_index_load()
223 if (kget_int32(&kstr, &pos, &e.refid) == -1) in cram_index_load()
226 if (kget_int32(&kstr, &pos, &e.start) == -1) in cram_index_load()
229 if (kget_int32(&kstr, &pos, &e.end) == -1) in cram_index_load()
232 if (kget_int64(&kstr, &pos, &e.offset) == -1) in cram_index_load()
235 if (kget_int32(&kstr, &pos, &e.slice) == -1) in cram_index_load()
238 if (kget_int32(&kstr, &pos, &e.len) == -1) in cram_index_load()
302 while (pos < kstr.l && kstr.s[pos] != '\n') in cram_index_load()
308 free(kstr.s); in cram_index_load()
316 free(kstr.s); in cram_index_load()