📄 sty_log.c
字号:
/* $Header: /usr/cvsroot/target/src/wrn/wm/demo/lib/sty_log.c,v 1.3 2003/01/15 14:04:37 josh Exp $ *//* * Copyright (C) 1999-2005 Wind River Systems, Inc. * All rights reserved. Provided under license only. * Distribution or other use of this software is only * permitted pursuant to the terms of a license agreement * from Wind River Systems (and is otherwise prohibited). * Refer to that license agreement for terms of use. *//**************************************************************************** * Copyright 1993-1997 Epilogue Technology Corporation. * Copyright 1998 Integrated Systems, Inc. * All rights reserved. ****************************************************************************//* * $Log: sty_log.c,v $ * Revision 1.3 2003/01/15 14:04:37 josh * directory structure shifting * * Revision 1.2 2001/11/08 15:56:28 tneale * Updated for newest file layout * * Revision 1.1.1.1 2001/11/05 17:48:43 tneale * Tornado shuffle * * Revision 2.11 2001/01/19 22:23:54 paul * Update copyright. * * Revision 2.10 2000/03/17 00:12:47 meister * Update copyright message * * Revision 2.9 1999/05/21 16:45:21 sra * vsnprintf() => VSNPRINTF(). * * Revision 2.8 1998/07/02 06:55:40 sra * Make Snark restartable under pSOS, and other minor cleanups. * * Revision 2.7 1998/02/25 04:57:43 sra * Update copyrights. * * Revision 2.6 1997/03/20 06:53:15 sra * DFARS-safe copyright text. Zap! * * Revision 2.5 1997/03/19 22:05:19 sra * Perhaps we should include install.h before testing install options? * * Revision 2.4 1997/03/19 20:19:26 sra * Remove gratuitous Attache dependencies. * * Revision 2.3 1997/03/19 04:47:35 sra * Get rid of some gratuitous historical dependencies on Attache. * * Revision 2.2 1997/02/25 10:58:16 sra * Update copyright notice, dust under the bed. * * Revision 2.1 1996/03/22 10:05:39 sra * Update copyrights prior to Attache 3.2 release. * * Revision 2.0 1995/05/10 22:38:15 sra * Attache release 3.0. * * Revision 1.2 1995/01/06 00:52:48 sra * Update copyright notice for 2.1 release. * * Revision 1.1 1993/07/05 21:53:30 sra * Initial revision * *//* [clearcase]modification history-------------------01a,19apr05,job update copyright notices*//* * Software terminal support for snark. * * This module implements the PRINTF() function used in Attache. * To avoid possible confusion by case-insensitive linkers, the function * we define here is called sty_log(). A #define of PRINTF to sty_log() * should be added to attache.h to use this feature. *//* ANSI C files. */#include <stdio.h>#include <stdarg.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <wrn/wm/common/install.h>#include <wrn/wm/demo/snarklib.h>static struct sty *log_sty;struct sty *sty_setlog(struct sty *newsty){ struct sty *oldsty = log_sty; log_sty = newsty; return oldsty;}void sty_log(char *fmt, ...){ va_list ap; int val; char buffer[2000]; va_start(ap, fmt); if (log_sty) { VSNPRINTF(buffer, sizeof(buffer), fmt, ap); sty_puts(log_sty, buffer); } va_end(ap);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -