modified: makefile
[GalaxyCodeBases.git] / tools / bioawk / addon.h
blobe86552ef0dd02410e42fd01b68a5afdbe096eea5
1 #ifndef ADDON_H
2 #define ADDON_H
4 /* do not change these values, as they are tied to col_def[][] in addon.c */
5 #define BIO_NULL -1
6 #define BIO_HDR 0
7 #define BIO_BED 1
8 #define BIO_SAM 2
9 #define BIO_VCF 3
10 #define BIO_GFF 4
11 #define BIO_FASTX 5
13 #define BIO_SHOW_HDR 0x1
15 extern int bio_fmt, bio_flag;
16 extern char *bio_hdr_chr;
18 int bio_get_fmt(const char *s);
19 int bio_skip_hdr(const char *r);
20 void bio_set_colnm(void);
22 int bio_getrec(char **pbuf, int *psize, int isrecord);
24 /* The following explains how to add a new function. 1) Add a function index
25 * (e.g. #define BIO_FFOO 102) in addon.h. The integer index must be larger than
26 * 14 in the current awk implementation (see also macros starting with "F"
27 * defined in awk.h). 2) Add the function name and the function index in the
28 * keywords array defined in lex.c. Remember to keep the array sorted. 3)
29 * Implement the actual function in bio_func(). */
31 #define BIO_FAND 101
32 #define BIO_FOR 102
33 #define BIO_FXOR 103
34 #define BIO_FLSHIFT 104 /* to add */
35 #define BIO_FRSHIFT 105 /* to add */
36 #define BIO_FCOMPL 106 /* to add */
38 #define BIO_FREVERSE 201
39 #define BIO_FREVCOMP 202
40 #define BIO_FGC 203
41 #define BIO_FMEANQUAL 204
42 #define BIO_FQUALCOUNT 205
43 #define BIO_FTRIMQ 206
46 struct Cell;
47 struct Node;
49 struct Cell *bio_func(int f, struct Cell *x, struct Node **a);
51 #endif