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

📄 make_logrec.c

📁 seed格式数据解压程序,地震分析人员必备
💻 C
字号:
/*===========================================================================*//* UTIG DMC        |            make_logrec.c             |  Utility         *//*===========================================================================*//*	Name:		make_logrec.c	Purpose:	allocate and link a logrec_list node	Usage:		struct logrec *make_logrec( head, tail )	Input:		struct	logrec	**head				struct	logrec	**tail	Output:		pointer to created node	Externals:		Warnings:		Errors:			Fatals:		calloc returns no new space	Called by:		Calls to:	error_handler()	Algorithm:	If the list is empty, then both head and tail will be null.				(eg *head = NULL). If there are any nodes on the list, the				*head and *tail point to the ends; a node is linked in				in either case.	Notes:			Problems:		References:		Language:		Revisions:	03/10/89	mark wiederspahn	written*/#include "output.h"struct logrec_list *make_logrec( head, tail )struct	logrec_list **head;struct	logrec_list	**tail;{/* * if this is the first node, point both head and tail to new node * else add one onto the existing list at the end. */	if( *tail == NULL )	{		*head = *tail =			(struct logrec_list *)calloc( 1, sizeof(struct logrec_list) );		if( *tail == NULL ) error_handler( FATAL,"[make_logrec] no space");	}	else	{		(*tail)->next = 			(struct logrec_list *)calloc( 1, sizeof(struct logrec_list) );		if( *tail == NULL ) error_handler( FATAL,"[make_logrec] no space");		(*tail) = (*tail)->next;	}	return( *tail );}

⌨️ 快捷键说明

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