summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2002-03-18 07:50:28 +0000
committerJohn Millaway <john43@users.sourceforge.net>2002-03-18 07:50:28 +0000
commit0dab517d3354abafd3650390366b3b2fda067a66 (patch)
tree2680af5b9ddbf03dfcbb21704288eee45c74f1d2 /main.c
parent81599fd058758b3ad9dd40daf9b60a92b3dd8d91 (diff)
Removed CFront 1.2 -specific code from skeleton, because CFront now defines __cplusplus properly.
Removed TurboC-specific code from skeleton. Skeleton now includes proper C++ standard headers. Relocated "unistd.h" code after user section 1 to allow user to overrid it. New option "nounistd" to suppress unistd.h from being included.
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.c b/main.c
index 0ad0dc1..b679d4d 100644
--- a/main.c
+++ b/main.c
@@ -573,6 +573,7 @@ int exit_status;
fprintf(header_out,"#undef YY_NO_SET_LVAL\n");
fprintf(header_out,"#undef YY_NO_SET_OUT\n");
fprintf(header_out,"#undef YY_NO_TOP_STATE\n");
+ fprintf(header_out,"#undef YY_NO_UNISTD_H\n");
fprintf(header_out,"#undef YY_NO_UNPUT\n");
fprintf(header_out,"#undef YY_NULL\n");
fprintf(header_out,"#undef YY_NUM_RULES\n");
@@ -1100,7 +1101,11 @@ char **argv;
case OPT_STDOUT:
use_stdout = true;
break;
-
+
+ case OPT_NO_UNISTD_H:
+ buf_strdefine(&userdef_buf,"YY_NO_UNISTD_H", "1");
+ break;
+
case OPT_TRACE:
trace = true;
break;
@@ -1718,6 +1723,7 @@ _(
" -R, --reentrant generate a reentrant C scanner\n"
" -Rb, --reentrant-bison reentrant scanner for bison pure parser.\n"
" --stdinit initialize yyin/yyout to stdin/stdout\n"
+" --nounistd do not include <unistd.h>\n"
" --noFUNCTION do not generate a particular FUNCTION\n"
"\n"