fgethdr.c
来自「seismic software,very useful」· C语言 代码 · 共 31 行
C
31 行
#include "su.h"#include "segy.h"#include "header.h"/* fgethdr - get segy tape identification headers from * the program or from the file by file pointer * * input: * fp file pointer * output: * chdr 3200 bytes of segy character header * bhdr 400 bytes of segy binary header * zhiming li and j. dulac , */void fgethdr(FILE *fp, segychdr *chdr, segybhdr *bhdr){ extern char SU_chdr[]; extern char SU_bhdr[]; if (strncmp(SU_chdr, "C 1 CLIENT",10)==0 ) { memcpy((char*)chdr,SU_chdr,EBCBYTES); memcpy((char*)bhdr,SU_bhdr,BNYBYTES); } else { efread(chdr, 1, EBCBYTES, fp); efread(bhdr, 1, BNYBYTES, fp); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?