⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 output.h

📁 seed格式数据解压程序,地震分析人员必备
💻 H
字号:
/*===========================================================================*//* DMC Interim out |            output.h                   |     header file *//*===========================================================================*//*	Name:			Purpose:		Usage:			Input:			Output:			Externals:		Warnings:		Errors:			Fatals:	Called by:		Calls to:		Algorithm:		Notes:		to be included in all project routines	Problems:		Debug:	References:		Language:		Revisions:	*/                   /*=====================================*//*=================|                                       |=================*/                   /*=====================================*//* If this header is already included, don't include it again */#ifndef OUTPUT_INCLUDED                  /*=======================================*//*================|    Inclusion of other include files     |================*/                  /*=======================================*//* Standard include files are surrounded by conditionals to prevent   multiple inclusion; locally-written include files should do that for   themselves. */#ifndef STDIO_INCLUDED#include <stdio.h>#define STDIO_INCLUDED 1#endif#ifndef STRING_INCLUDED#include <string.h>#define STRING_INCLUDED 1#endif#ifndef MATH_INCLUDED#include <math.h>#define MATH_INCLUDED 1#endif#include "constants.h"#include "macros.h"#include "structures.h"#include "DMC.h"#define	STN_NOT_FOUND_WARNING 0xFFFF	/* an effort to make it unique */                   /*=======================================*//*================|       Globally-available variables      |================*/                  /*=======================================*/#ifndef GLOBALS_DEFINED	extern int Precl;							/* physical record length */	extern int Lrecl;							/* logical record length */	extern int Debug;							/* debug flag from envrnmnt */	extern int SEED_Version;					/* what version we write */	extern char Organization[60+1];				/* who is writing */	extern char Header_path[PATHLENGTH+1];		/* name of Headers dir *//* * ends of the singly linked list which drives the output phase * and which is constructed during input phase. There is one node * for each time chunk in the output volume. */	extern struct lvol	*Lvol_head;	extern struct lvol	*Lvol_tail;/* * ends of the singly linked list which drives the output phase * and which is constructed during input phase. There is one node * for each time span in the output volume. * them as well. */	extern struct tspan_list	*Tspan_head;	extern struct tspan_list	*Tspan_tail;/* * ends of the single linked list which contains pointers to all headers * (vas, t) constructed internally for this logical volume. */	extern struct logrec_list	*Headers_head;	extern struct logrec_list	*Headers_tail;/* * head of a circularly linked list which contains pointers to all of the * directory names which could contain time series data. The circular list * is to allow "cacheing" of names; channels from a given station will * probably be found in the same directory most of the time. This list * tends to prevent looking in the wrong places (we hope). */	extern struct	path_list	*Data_path;                  /*=======================================*//*================|  End of external variable definitions   |================*/                  /*=======================================*/#endif											/* to ifndef GLOBALS_DEFINED */                  /*=======================================*//*================|           process definitions           |================*/                  /*=======================================*//* Main */void usage();									/* print usage */int init_once();								/* one time program setup */int init_volume();								/* per volume setup */int is_a_new_volume();							/* TRUE if new volume */int is_a_new_tspan();							/* TRUE if new span *//* Scan_phase */int find_data();								/* list data in log. volume */int find_segment();								/* find a time seg in a file*/int find_name();								/* get absolute data filename */int fexist();									/* test a file for existence */void get_scaninfo();							/* get data record hdr info */int put_lvol();									/* write a new lvol node *//* Header_phase */int build_abbrev_path();						/* filename of abbrev hdr */int build_chnl_path();						/* filename of channel hdr */int build_stn_path();							/* filename of station hdr */int creat_A();									/* make abbrev logical recs */int creat_S();									/* make station logical recs */int creat_T();									/* make tspan logical recs */int	creat_V();									/* make volume log recs */int get_abbrev_hdr();							/* get abbrev blockettes */int	get_chnl_hdr();								/* get channel blockettes */int get_stn_hdr();								/* get station blockettes */int load_data();								/* get blockettes from file */int	make_control_headers();						/* make all control log recs */int	make_lrec();								/* log recs from blockettes *//* Utilities */struct input_time add_time();					/* add delta (e-04 s) to time */struct input_time add_longtime();				/* add long delta (s) to time */struct input_time add_inputtime();				/* add two times */void make_room();								/* allocate contiguous bufs */int cmp_time();									/* compare times to precision */int cmp_longtime();								/* compare times */struct input_time asc_to_input_time();			/* get a SEED time */void close_DMC_request();						/* close a request file */int error_handler ();							/* handle error conditions */struct path_list *get_data_path();				/* get DATA_PATH from env */struct DMC_request *get_current_request();		/* gets the structure */int get_DMC_request();							/* get a DMC request line */int get_debug_level();							/* get DEBUG from environment */char *get_header_path();						/* get HEADER_PATH from env */int get_SEED_version();							/* get SEED_VERSION from env */char *input_time_to_asc();						/* print a seed time w/ ~ */struct logrec_list *make_logrec();				/* make a logrec_list node */struct lvol *make_lvol();						/* make a new lvol node */void print_time();								/* print a struct input_time */struct station_list *make_station();			/* make a new station node */struct tspan_list *make_tspan();				/* make a new tspan node */void opmsg ();									/* msgs to operator */int open_DMC_request();							/* open a request file */char *get_creator();							/* get CREATOR from env *//* Output_phase */int flush_output_volume();						/* write output volume */int output_data();								/* write a time span of data */struct logrec_list *output_tspan();				/* output a tspan's headers */struct logrec_list *output_vas();				/* output init control hdrs *//* Output_phase/Logrec */void init_logrec();int set_logrec();struct io_buf open_logrec();struct io_buf put_logrec();                  /*=======================================*//*================|           end of header file            |================*/                  /*=======================================*//* the following two lines should be the last lines of the header file */#define OUTPUT_INCLUDED 1#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -