signon.c

来自「its about compiler for LL1 and LR」· C语言 代码 · 共 29 行

C
29
字号
/*@A (C) 1992 Allen I. Holub                                                */
#include <stdio.h>
#include <tools/debug.h>
#include <tools/hash.h>
#include <tools/set.h>
#include "parser.h"
#include "../version.h"

#if ( 0 UNIX(+1) )
#include "date.h"	/* Otherwise use ANSI __DATE__ */
#endif

PUBLIC void signon()
{
    /* Print the sign-on message. Note that since the console is opened
     * explicitly, the message is printed even if both stdout and stderr are
     * redirected.
     */

    FILE *screen;
    if( !(screen = fopen( UNIX("/dev/tty") MS("con:"), "w")) )
	  screen = stderr;

    fprintf(screen,"%s %s (c) %s, Allen I. Holub. All rights reserved.\n",
				LL("LLAMA") OX("OCCS"), VERSION, __DATE__);
    if( screen != stderr )
	fclose(screen);
}

⌨️ 快捷键说明

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