From 6e8149e3af6b81a9b31a866b9de6f321bf307c49 Mon Sep 17 00:00:00 2001 From: Jeroen Ruigrok/asmodai Date: Sun, 20 Feb 2005 17:34:11 +0000 Subject: [PATCH] Get rid off conditionals for hpux, AIX, THINKC, TURBOC, MS_DOS, VMS. --- usr.bin/lex/flex.skl | 11 +---------- usr.bin/lex/flexdef.h | 26 +------------------------- usr.bin/lex/initscan.c | 11 +---------- usr.bin/lex/main.c | 21 +-------------------- usr.bin/lex/parse.y | 16 +--------------- 5 files changed, 5 insertions(+), 80 deletions(-) diff --git a/usr.bin/lex/flex.skl b/usr.bin/lex/flex.skl index 2810b20602..9c303de1d7 100644 --- a/usr.bin/lex/flex.skl +++ b/usr.bin/lex/flex.skl @@ -3,7 +3,7 @@ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $ - * $DragonFly: src/usr.bin/lex/flex.skl,v 1.2 2003/06/17 04:29:27 dillon Exp $ + * $DragonFly: src/usr.bin/lex/flex.skl,v 1.3 2005/02/20 17:34:11 asmodai Exp $ */ #define FLEX_SCANNER @@ -47,15 +47,6 @@ class istream; #endif /* __STDC__ */ #endif /* ! __cplusplus */ -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - #ifdef YY_USE_CONST #define yyconst const #else diff --git a/usr.bin/lex/flexdef.h b/usr.bin/lex/flexdef.h index a4b71de087..cdf81e7238 100644 --- a/usr.bin/lex/flexdef.h +++ b/usr.bin/lex/flexdef.h @@ -28,27 +28,13 @@ /* @(#) $Header: /home/daffy/u0/vern/flex/RCS/flexdef.h,v 2.53 95/04/20 11:17:36 vern Exp $ (LBL) */ /* $FreeBSD: src/usr.bin/lex/flexdef.h,v 1.5 1999/10/27 07:56:44 obrien Exp $ */ -/* $DragonFly: src/usr.bin/lex/flexdef.h,v 1.2 2003/06/17 04:29:27 dillon Exp $ */ +/* $DragonFly: src/usr.bin/lex/flexdef.h,v 1.3 2005/02/20 17:34:11 asmodai Exp $ */ #include #include #include "config.h" -#ifdef __TURBOC__ -#define HAVE_STRING_H 1 -#define MS_DOS 1 -#ifndef __STDC__ -#define __STDC__ 1 -#endif - #pragma warn -pro - #pragma warn -rch - #pragma warn -use - #pragma warn -aus - #pragma warn -par - #pragma warn -pia -#endif - #ifdef HAVE_STRING_H #include #else @@ -89,16 +75,6 @@ #endif #endif -#ifdef VMS -#ifndef __VMS_POSIX -#define unlink remove -#define SHORT_FILE_NAMES -#endif -#endif - -#ifdef MS_DOS -#define SHORT_FILE_NAMES -#endif /* Maximum line length we'll have to deal with. */ diff --git a/usr.bin/lex/initscan.c b/usr.bin/lex/initscan.c index da3cff248d..27b01ffb7f 100644 --- a/usr.bin/lex/initscan.c +++ b/usr.bin/lex/initscan.c @@ -4,7 +4,7 @@ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ * $FreeBSD: src/usr.bin/lex/initscan.c,v 1.6 1999/10/27 07:56:45 obrien Exp $ - * $DragonFly: src/usr.bin/lex/initscan.c,v 1.3 2003/10/04 20:36:47 hmp Exp $ + * $DragonFly: src/usr.bin/lex/initscan.c,v 1.4 2005/02/20 17:34:11 asmodai Exp $ */ #define FLEX_SCANNER @@ -43,15 +43,6 @@ #endif /* __STDC__ */ #endif /* ! __cplusplus */ -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - #ifdef YY_USE_CONST #define yyconst const #else diff --git a/usr.bin/lex/main.c b/usr.bin/lex/main.c index b7d54d4409..ab41f59e68 100644 --- a/usr.bin/lex/main.c +++ b/usr.bin/lex/main.c @@ -31,7 +31,7 @@ /* $Header: /home/daffy/u0/vern/flex/RCS/main.c,v 2.64 96/05/25 20:42:42 vern Exp $ */ /* $FreeBSD: src/usr.bin/lex/main.c,v 1.7 1999/10/27 07:56:45 obrien Exp $ */ -/* $DragonFly: src/usr.bin/lex/main.c,v 1.3 2003/10/04 20:36:47 hmp Exp $ */ +/* $DragonFly: src/usr.bin/lex/main.c,v 1.4 2005/02/20 17:34:11 asmodai Exp $ */ #include "flexdef.h" @@ -115,14 +115,6 @@ static char *outfile_template = "lex%s.%s"; static char *backing_name = "lex.bck"; #endif -#ifdef THINK_C -#include -#endif - -#ifdef MS_DOS -extern unsigned _stklen = 16384; -#endif - static char outfile_path[MAXLINE]; static int outfile_created = 0; static char *skelname = NULL; @@ -132,9 +124,6 @@ int main(int argc, char **argv) { int i; -#ifdef THINK_C - argc = ccommand( &argv ); -#endif #ifdef NEED_ARGV_FIXUP argv_fixup( &argc, &argv ); #endif @@ -965,15 +954,7 @@ _( "Variable trailing context rules entail a large performance penalty\n" ) ); { if ( do_stdinit ) { - outn( "#ifdef VMS" ); - outn( "#ifndef __VMS_POSIX" ); - outn( yy_nostdinit ); - outn( "#else" ); - outn( yy_stdinit ); - outn( "#endif" ); - outn( "#else" ); outn( yy_stdinit ); - outn( "#endif" ); } else diff --git a/usr.bin/lex/parse.y b/usr.bin/lex/parse.y index 61265a070c..522449810f 100644 --- a/usr.bin/lex/parse.y +++ b/usr.bin/lex/parse.y @@ -35,19 +35,13 @@ /* $Header: /home/daffy/u0/vern/flex/RCS/parse.y,v 2.28 95/04/21 11:51:51 vern Exp $ */ /* $FreeBSD: src/usr.bin/lex/parse.y,v 1.3 1999/10/27 07:56:46 obrien Exp $ */ -/* $DragonFly: src/usr.bin/lex/parse.y,v 1.2 2003/06/17 04:29:28 dillon Exp $ */ +/* $DragonFly: src/usr.bin/lex/parse.y,v 1.3 2005/02/20 17:34:11 asmodai Exp $ */ /* Some versions of bison are broken in that they use alloca() but don't * declare it properly. The following is the patented (just kidding!) * #ifdef chud to fix the problem, courtesy of Francois Pinard. */ -#ifdef YYBISON -/* AIX requires this to be the first thing in the file. What a piece. */ -# ifdef _AIX - #pragma alloca -# endif -#endif #include "flexdef.h" @@ -63,15 +57,7 @@ # if HAVE_ALLOCA_H # include # else -# ifdef __hpux -void *alloca (); -# else -# ifdef __TURBOC__ -# include -# else char *alloca (); -# endif -# endif # endif # endif #endif -- 2.41.0