X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam.h;fp=bam.h;h=2de5b091a6bcbc217b244284e1d9464214c6172d;hb=ea89c550a4ca078a462dc66dfcf77e65b09e1f2f;hp=87e3de326fea144e10323ad8229309b6b31136a4;hpb=ce2a057a1bd9803e7e838e9c81551533172bcabb;p=samtools.git diff --git a/bam.h b/bam.h index 87e3de3..2de5b09 100644 --- a/bam.h +++ b/bam.h @@ -746,4 +746,13 @@ static inline bam1_t *bam_dup1(const bam1_t *src) return b; } +static inline int bam_aux_type2size(int x) +{ + if (x == 'C' || x == 'c' || x == 'A') return 1; + else if (x == 'S' || x == 's') return 2; + else if (x == 'I' || x == 'i' || x == 'f') return 4; + else return 0; +} + + #endif