📄 llog.c
字号:
/* $Header: /home/harrison/c/tcgmsg/ipcv4.0/RCS/llog.c,v 1.1 91/12/06 17:26:40 harrison Exp Locker: harrison $ */#include <stdio.h>#include <sys/types.h>#include <sys/time.h>#include "sndrcv.h"#if defined(SUN)extern char *sprintf();#endif#ifndef SGIextern time_t time();#endifextern void Error();void LLOG_()/* close and open stdin and stdout to append to a local logfile with the name log.<process#> in the current directory*/{ char name[12]; time_t t; (void) sprintf(name, "log.%03ld",NODEID_()); (void) fflush(stdout); (void) fflush(stderr); if (freopen(name, "A", stdout) == (FILE *) NULL) Error("LLOG_: error re-opening stdout", (long) -1); if (freopen(name, "A", stderr) == (FILE *) NULL) Error("LLOG_: error re-opening stderr", (long) -1); (void) time(&t); (void) printf("\n\nLog file opened : %s\n\n",ctime(&t)); (void) fflush(stdout);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -