HDRPKGE - routines to access the SEGY header via the hdr structure. gethval get a trace header word by index puthval put a trace header word by index getbhval get a binary header word by index putbhval put a binary header word by index gethdval get a trace header word by name puthdval put a trace header word by name hdtype get the data type of a trace header word by name getkey get the name of a trace header word from its index getindex get the index of a trace header word from the name swaphval swap the trace header words by index swapbhval swap the binary header words by index gettapehval get a tape trace header word by index puttapehval put a tape trace header word by index gettapebhval get a tape binary header word by index puttapebhval put a tape binary header word by index printheader display non-null header field values Function Prototypes: void gethval(const segy *tr, int index, Value *valp); void puthval(segy *tr, int index, Value *valp); void putbhval(bhed *bh, int index, Value *valp); void getbhval(const bhed *bh, int index, Value *valp); void gethdval(const segy *tr, char *key, Value *valp); void puthdval(segy *tr, char *key, Value *valp); char *hdtype(const char *key); char *getkey(const int index); int getindex(const char *key); void swaphval(segy *tr, int index); void swapbhval(bhed *bh, int index); void gettapehval(tapesegy *tapetr, int index, Value *valp); void puttapehval(tapesegy *tapetr, int index, Value *valp); void gettapebhval(tapebhed *tapetr, int index, Value *valp); void puttapebhval(tapebhed *tapetr, int index, Value *valp); void printheader(const segy *tp); Notes: This package includes only those routines that directly access the "hdr" or "bhdr" structures. It does not include routines such as printfval, printftype, printfhead that use the routines in this package to indirectly access these structures. Note that while gethdval and puthdval are more convenient to use than gethval and puthval, they incur an inefficiency in the common case of iterating code over a set of traces with a fixed key or keys. In such cases, it is advisable to set the index or indices outside the loop using getindex. swaphval: Byte-swapping is needed for converting SU data from big-endian to little- endian formats, and vice versa. The swap_.... subroutines are based on subroutines provided by Jens Hartmann of the Institut fur Geophysik in Hamburg. These are found in .../cwp/lib/swapbyte.c. Authors: SEP: Einar Kjartansson CWP: Jack Cohen, Shuki Ronen swaphval: CWP: John Stockwell