1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#ifndef PAF_PAF_H
#define PAF_PAF_H
#include <stdint.h>
#include <sys/types.h>
#ifndef KSTRING_T
#define KSTRING_T kstring_t
typedef struct __kstring_t {
size_t l, m;
char *s;
} kstring_t;
#endif
typedef struct {
void *fp;
kstring_t buf;
} paf_file_t;
typedef struct {
const char *qn, *tn; // these point to the input string; NOT allocated
uint32_t ql, qs, qe, tl, ts, te;
uint32_t ml:31, rev:1, bl;
} paf_rec_t;
#ifdef __cplusplus
extern "C" {
#endif
paf_file_t *paf_open(const char *fn);
int paf_close(paf_file_t *pf);
int paf_read(paf_file_t *pf, paf_rec_t *r);
#ifdef __cplusplus
}
#endif
#endif
|