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

📄 menu_log.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
#ifndef lintstatic	char	sccsid[] = "@(#)menu_log.c 1.1 92/07/30";#endif/* *	Name:		menu_log.c * *	Description:	Routines for managing the menu log file. */#include <sys/param.h>#include <curses.h>#include <varargs.h>#include "menu.h"/* *	Local variables: */static	char		LOGFILE[MAXPATHLEN];	/* path to the log file *//* *	External references: */extern	char *		strcpy();/* *	Name:		menu_log() * *	Description:	Add a message to the menu log, and print the message *		on the menu via menu_mesg(). * *	Call syntax:	menu_log(fmt, va_alist); * *	Parameters:	char *		fmt; *			va_dcl *//*VARARGS1*/voidmenu_log(fmt, va_alist)        char *		fmt;	va_dcl{	va_list		ap;			/* ptr to args */	FILE *		fp;			/* ptr to LOGFILE */	va_start(ap);				/* init varargs stuff */	if (LOGFILE[0]) {		fp = fopen(LOGFILE, "a");		if (fp == NULL)			menu_mesg("%s: cannot open file for append.", LOGFILE);		else {			(void) vfprintf(fp, fmt, ap);			(void) fputc('\n', fp);			(void) fclose(fp);		}	}	_menu_mesg(fmt, ap);} /* end menu_log() *//* *	Name:		set_menu_log() * *	Description:	Set the name of the menu log file. */voidset_menu_log(name)	char *		name;{	(void) strcpy(LOGFILE, name);} /* end set_menu_log() */

⌨️ 快捷键说明

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