NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / sys / vms / lev_lex.h
blob171535eec3a3d53646686d1ad12185de2f44f876
1 /* aNetHack 0.0.1 lev_lex.h $ANH-Date: 1432512790 2015/05/25 00:13:10 $ $ANH-Branch: master $:$ANH-Revision: 1.8 $ */
2 /* "vms/lev_lex.h" copied into "util/stdio.h" for use in *_lex.c only!
3 * This is an awful kludge to allow util/*_lex.c made by SunOS's `lex'
4 * to be compiled as is. (It isn't needed with `flex' or VMS POSIX
5 * `lex' and is benign when either of those configurations are used.)
6 * It works because the actual setup of yyin & yyout is performed in
7 * src/lev_main.c, where stdin & stdout are still correctly defined.
9 * The troublesome code is
10 * #include "stdio.h"
11 * ...
12 * FILE *yyin = stdin, *yyout = stdout;
13 * The file scope initializers with non-constant values require this
14 * hack, and the quotes instead of brackets makes it easy to do.
17 #include <stdio.h>
18 #ifdef stdin
19 #undef stdin
20 #endif
21 #define stdin 0
22 #ifdef stdout
23 #undef stdout
24 #endif
25 #define stdout 0