date_proc.c

来自「the source code from the book "UNIX Netw」· C语言 代码 · 共 38 行

C
38
字号
/* * dateproc.c - remote procedures; called by server stub. */#include	<rpc/rpc.h>	/* standard RPC include file */#include	"date.h"	/* this file is generated by rpcgen *//* * Return the binary date and time. */long *bin_date_1(){	static long	timeval;	/* must be static */	long		time();		/* Unix function */	timeval = time((long *) 0);	return(&timeval);}/* * Convert a binary time and return a human readable string. */char **str_date_1(bintime)long	*bintime;{	static char	*ptr;		/* must be static */	char		*ctime();	/* Unix function */	ptr = ctime(bintime);		/* convert to local time */	return(&ptr);		/* return the address of pointer */}

⌨️ 快捷键说明

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