/* @(#)wfdiscio.h 1.1 4/4/96 */ #ifndef CSS_WFDISC28IO_H #define CSS_WFDISC28IO_H #ifndef TRIM #define TRIM(s,l) {int i;for(i=l-1;i>0,s[i-1]==' ';i--);s[i]='\0';} #endif #ifndef FPAD #define FPAD(s,l) {int i;for(i=strlen(s);idate,&(SP)->time,(SP)->sta,(SP)->chan,&(SP)->nsamp,\ &(SP)->smprat,&(SP)->calib,&(SP)->calper,(SP)->instyp,&(SP)->segtyp,\ (SP)->dattyp,&(SP)->clip,&(SP)->chid,&(SP)->wfid,(SP)->dir,\ (SP)->file,&(SP)->foff,&(SP)->adate,(SP)->remark #define WFDISC28_WCS \ "%8ld %15.3f %-6.6s %-2.2s %8ld %11.7f %9.6f %7.4f %-6.6s %c %-2.2s %c %8ld %8ld %-30.30s %-20.20s %10ld %8ld %-30.30s\n" #define WFDISC28_WVL(SP) \ (SP)->date,(SP)->time,(SP)->sta,(SP)->chan,\ (SP)->nsamp,(SP)->smprat,(SP)->calib,(SP)->calper,\ (SP)->instyp,(SP)->dattyp,(SP)->chid,\ (SP)->wfid,(SP)->dir,(SP)->file,(SP)->foff,\ (SP)->adate,(SP)->remark #define WFDISC28_TRM(SP) \ TRIM((SP)->sta,7); TRIM((SP)->chan,3); TRIM((SP)->instyp,7); \ TRIM((SP)->dattyp,3); \ TRIM((SP)->dir,31); TRIM((SP)->file,21); TRIM((SP)->remark,31) #define WFDISC28_FPD(SP) \ FPAD((SP)->sta,8); FPAD((SP)->chan,4); FPAD((SP)->instyp,8); \ FPAD((SP)->dattyp,4); \ FPAD((SP)->dir,32); FPAD((SP)->file,24); FPAD((SP)->remark,32) #define WFDISC28_BFL(SP) \ BFIL((SP)->sta,8); BFIL((SP)->chan,4); BFIL((SP)->instyp,8); \ BFIL((SP)->dattyp,4); \ BFIL((SP)->dir,32); BFIL((SP)->file,24); BFIL((SP)->remark,32) #endif /* CSS_WFDISC28IO_H */