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

📄 output_vas.c

📁 seed格式数据解压程序,地震分析人员必备
💻 C
字号:
/*===========================================================================*//* UTIG DMC        |           output_vas                  | Output_phase    *//*===========================================================================*//*	Name:		output_vas.c	Purpose:	to transmit the memory images of the volume, abbreviation,				station control headers to the output SEED logical volume.	Usage:		struct_logrec_list *output_vas( file, vas, err )	Input:						FILE		file	output file pointer, already open				struct logrec_list	*vas					list of logical records comprising the volume, abbreviation					 and station control headers to be output.	Output:						err					0 if no errors				function return		the next node in the list, or NULL.									This should point to the first 'T' logrec.	Externals:		Warnings:		Errors:			Fatals:	Called by:		Calls to:		Algorithm:	this version DOES NOT assume that the headers are sorted				in the order which they should be output in, only that				within each type, they are ordered.	Notes:			Problems:		References:		Language:	Sun OS 3.5 C	Revisions:	mm/dd/yy  pgmr name  change*/#include "output.h"/* this subroutine is invisible except to output_vas! */static struct logrec_list *look4();struct logrec_list *output_vas( file, vas, err )FILE	*file;					/* output file pointer, already open */struct logrec_list	*vas;		/* linked list of pointers to records */int		*err;					/* return status */{struct logrec_list *p;			/* link traversal */	if( Debug >= D_MIN ) fprintf( D_OUT,"[output_vas] start\n");/* * For all control headers, for each linked logical record, output it. * Stop when we get to the first time span header. Quit on any errors. * Always return the last pointer unused. */	p = look4( 'V', file, vas, err );		/* volume control header */	if( *err ) return( p );	p = look4( 'A', file, vas, err );		/* abbreviation control header */	if( *err ) return( p );	p = look4( 'S', file, vas, err );		/* station control header */	if( *err ) return( p );/* * find the first time span header */	p = vas;	while( p != NULL &&		( (struct hdr_logrec *)p->record )->type != 'T' )			p = p->next;	if( Debug >= D_MIN ) fprintf( D_OUT,"[output_vas] end\n");	return( p );}static struct logrec_list *look4( type, file, p, err )char	type;					/* type of logical record to output */FILE	*file;					/* output file pointer, already open */struct	logrec_list *p;			/* list head */int		*err;					/* return status */{	while( p != NULL )	{		if( ( (struct hdr_logrec *)p->record )->type == type )		{			if( Debug >= D_SOME )				fprintf( D_OUT,"[output_vas] hdr %c%c\n",				( (struct hdr_logrec *)p->record )->type,				( (struct hdr_logrec *)p->record )->cont );			( void )put_logrec( file, p->record, Lrecl, 0, err );			if( *err )				if( (*err=error_handler( FATAL,"[output_vas] hdr put_logrec")) )					return( p );		}		p = p->next;	}	return( p );}

⌨️ 快捷键说明

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