diff options
Diffstat (limited to 'qidx.c')
-rw-r--r-- | qidx.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -670,7 +670,7 @@ qidx_err_t qidx_table_add(qidx_htable_t * tab, qidx_record_t const * rec) { return QIDX_OK; } -qidx_err_t qidx_table_get(qidx_htable_t const * tab, +static qidx_err_t qidx_table_get(qidx_htable_t const * tab, char const * qname, qidx_record_t ** rec) { qidx_bucket_t * bucket = _qidx_bucket(qname, tab); @@ -697,6 +697,24 @@ qidx_err_t qidx_table_get(qidx_htable_t const * tab, return QIDX_OK; } +qidx_err_t qidx_lookup_alnrec(qidx_fp_t * fp, + char const * qname, qidx_record_t ** rec) { + qidx_err_t err; + + if((err = qidx_table_get(fp->htab, qname, rec))) { + return err; + } + + return QIDX_OK; +} + +void qidx_free_alnrec(qidx_record_t * rec) { + free(rec->alns); + sdsfree(rec->qname); + free(rec); +} + + void qidx_record_print(FILE * file, qidx_record_t * rec) { fprintf(file, "qname: %s\n", rec->qname); for(size_t i = 0; i < rec->n_alns; i++) { |