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

📄 size_logrec.c

📁 seed格式数据解压程序,地震分析人员必备
💻 C
字号:
/*===========================================================================*//* DMC interim out |       size_logrec.c                   |  Utility        *//*===========================================================================*//*	Name:		size_logrec.c	Purpose:	determine size of blockettes when padded to logical records	Usage:			Input:			Output:		number of bytes, number of records	Externals:		Warnings:		Errors:			Fatals:	Called by:		Calls to:		Algorithm:		Notes:			Problems:		References:		Language:		Revisions:	mm/dd/yy  pgmr name  change*/#include "output.h"int size_logrec( blockette_size, lrecl, padded_size )int		blockette_size;			/* current blockette size */int		lrecl;					/* logical record size */int		*padded_size;			/* total size of padded blockettes */{/* * blockettes will be copied into this chunk size: the size of the data area */	int	user_data = lrecl-sizeof(struct hdr_logrec);	/* seed header stuff *//* * if the current total size is within ENDPAD of a logical record boundary, * then we must round up the "currect padded size" to the next record boundary * and in any case, then add the new data size itself. */	if( user_data - (*padded_size % user_data) <= ENDPAD )	{		*padded_size = ( (*padded_size+user_data-1) / user_data) * user_data;	}	*padded_size += blockette_size;	return( (*padded_size+user_data-1) / user_data );}

⌨️ 快捷键说明

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