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

📄 log.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
#ifndef lint#ifdef SunB1static	char		mls_sccsid[] = "@(#)log.c 1.1 92/07/30 SMI; SunOS MLS";#elsestatic	char		sccsid[] = "@(#)log.c 1.1 92/07/30 SMI";#endif /* SunB1 */#endif lint/* *	Copyright (c) 1989 Sun Microsystems, Inc. *//* *	Name:		log.c * *	Description:	This file contains routine to implement message *		logging. */#include <errno.h>#include <stdio.h>#include <varargs.h>#include "install.h"/* *	Name:		_log() * *	Description:	Print a message to stdout and the LOGFILE.  This *		routine is included to provide a varargs interface. */void_log(fmt, ap)        char *		fmt;	va_list		ap;{	FILE *		fp;			/* ptr to LOGFILE */	        (void) vfprintf(stdout, fmt, ap);	fp = fopen(LOGFILE, "a");	if (fp == NULL)                (void) fprintf(stderr,"%s: %s: %s", progname, LOGFILE,			       err_mesg(errno));	else {		(void) vfprintf(fp, fmt, ap);		(void) fclose(fp);	}} /* end _log() *//* *	Name:		log() * *	Description:	Print a message to stdout and the LOGFILE.  This *		routine calls _log() to do the work. *//*VARARGS1*/voidlog(fmt, va_alist)	char *		fmt;	va_dcl{	va_list		ap;			/* ptr to args */	va_start(ap);				/* init varargs stuff */	_log(fmt, ap);} /* end log() */

⌨️ 快捷键说明

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