tomwalters@0: tomwalters@0: #define HEADER_STRING "header_bytes=000000\n" tomwalters@0: #define HEADER_START "header_bytes=" tomwalters@0: #define STRSIZE( _string ) ( sizeof ( _string ) - 1 ) tomwalters@0: tomwalters@0: #define ApplicStr( header ) ( gen_applics[ Applic( header ) ] ) tomwalters@0: tomwalters@0: tomwalters@0: /* gen applications list */ tomwalters@0: tomwalters@0: static char *gen_applics[] = { tomwalters@0: "wav" , /* 0 */ /* WAV format */ tomwalters@0: tomwalters@0: "fbm" , /* 1 */ /* NAP format */ tomwalters@0: "bmm" , /* 2 */ tomwalters@0: "fbr" , /* 3 */ tomwalters@0: "fbc" , /* 4 */ tomwalters@0: "fbt" , /* 5 */ tomwalters@0: "fbd" , /* 6 */ tomwalters@0: "nap" , /* 7 */ tomwalters@0: tomwalters@0: "sgm" , /* 8 */ /* SGM format */ tomwalters@0: "cgm" , /* 9 */ tomwalters@0: "sas" , /* 10 */ tomwalters@0: tomwalters@0: "asa" , /* 11 */ /* EPN format */ tomwalters@0: "epn" , /* 12 */ tomwalters@0: "sep" , /* 13 */ tomwalters@0: tomwalters@0: "sai" , /* 14 */ /* SAI format */ tomwalters@0: "spl" , /* 15 */ tomwalters@0: ( char * ) 0 } ; tomwalters@0: tomwalters@0: tomwalters@0: /* gen formats list */ tomwalters@0: tomwalters@0: #define WAV 0 tomwalters@0: #define NAP 1 tomwalters@0: #define SGM 2 tomwalters@0: #define EPN 3 tomwalters@0: #define SAI 4 tomwalters@0: tomwalters@0: static char *gen_formats[] = { tomwalters@0: "wav" , /* 0 */ tomwalters@0: "nap" , /* 1 */ tomwalters@0: "sgm" , /* 2 */ tomwalters@0: "epn" , /* 3 */ tomwalters@0: "sai" , /* 4 */ tomwalters@0: ( char * ) 0 } ; tomwalters@0: tomwalters@0: tomwalters@0: extern char *ReadHeader() ; tomwalters@0: extern char *HeaderString() ; tomwalters@0: extern char *HeaderStringOnly() ; tomwalters@0: extern char *HeaderStrings() ; tomwalters@0: extern char *HeaderValueString() ; tomwalters@0: extern char *HeaderNameString() ; tomwalters@0: extern char *ApplicString() ; tomwalters@0: extern double HeaderDouble() ; tomwalters@0: extern int HeaderInt() ; tomwalters@0: extern int HeaderSamplerate() ; tomwalters@0: extern int Applic() ; tomwalters@0: extern int Format() ; tomwalters@0: extern void FreeHeader() ;