From 1dd0cf03f5bf173fa4ac3bb8279d12fff1b98eb7 Mon Sep 17 00:00:00 2001 From: Adrian Negreanu Date: Tue, 5 May 2015 18:50:02 +0300 Subject: [PATCH] drop #include Signed-off-by: Adrian Negreanu --- src/code.l | 4 ++-- src/commentcnv.l | 5 ++--- src/commentscan.l | 5 +++-- src/config.l | 3 ++- src/constexp.l | 4 ++-- src/declinfo.l | 3 ++- src/defargs.l | 4 ++-- src/doctokenizer.l | 4 ++-- src/doxygen.cpp | 1 - src/formula.cpp | 2 -- src/fortrancode.l | 4 ++-- src/fortranscanner.l | 5 ++--- src/pre.l | 6 +++--- src/pycode.l | 4 ++-- src/pyscanner.l | 5 ++--- src/scanner.l | 5 ++--- src/tclscanner.l | 4 ++-- src/vhdlcode.l | 4 ++-- 18 files changed, 34 insertions(+), 38 deletions(-) diff --git a/src/code.l b/src/code.l index d06fab64978..c906144e661 100644 --- a/src/code.l +++ b/src/code.l @@ -14,7 +14,7 @@ * input used in their production; they are not affected by this license. * */ - +%option never-interactive %{ /* @@ -46,7 +46,7 @@ //#define DBG_CTX(x) fprintf x #define DBG_CTX(x) do { } while(0) -#define YY_NEVER_INTERACTIVE 1 +#define YY_NO_UNISTD_H 1 #define CLASSBLOCK (int *)4 #define SCOPEBLOCK (int *)8 diff --git a/src/commentcnv.l b/src/commentcnv.l index 979e6eeddfb..8823b681747 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -14,11 +14,9 @@ * input used in their production; they are not affected by this license. * */ - +%option never-interactive %{ -#define YY_NEVER_INTERACTIVE 1 - #include #include @@ -39,6 +37,7 @@ #include #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 #define ADDCHAR(c) g_outBuf->addChar(c) #define ADDARRAY(a,s) g_outBuf->addArray(a,s) diff --git a/src/commentscan.l b/src/commentscan.l index 54adbd8d7ba..354627743da 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -12,7 +12,8 @@ * input used in their production; they are not affected by this license. * */ - + +%option never-interactive %{ /* @@ -26,7 +27,6 @@ #include #include #include -#include #include #include "scanner.h" @@ -49,6 +49,7 @@ #include "formula.h" #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 // forward declarations static bool handleBrief(const QCString &); diff --git a/src/config.l b/src/config.l index 2ed9973954d..1bbe320e12a 100644 --- a/src/config.l +++ b/src/config.l @@ -9,7 +9,7 @@ * See the GNU General Public License for more details. * */ - +%option never-interactive %{ /* @@ -45,6 +45,7 @@ #undef Config_getBool #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 // use in-class definitions #define Config_getString(val) getString(__FILE__,__LINE__,val) diff --git a/src/constexp.l b/src/constexp.l index f1f8cd47e47..e3ff3f1691c 100644 --- a/src/constexp.l +++ b/src/constexp.l @@ -15,7 +15,7 @@ * input used in their production; they are not affected by this license. * */ - +%option never-interactive %{ #include "constexp.h" @@ -23,8 +23,8 @@ #include "ce_parse.h" // generated header file #include "message.h" -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 QCString g_strToken; CPPValue g_resultValue; diff --git a/src/declinfo.l b/src/declinfo.l index b7689c7e819..0f24d9e97ea 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -14,7 +14,7 @@ * input used in their production; they are not affected by this license. * */ - +%option never-interactive %{ /* @@ -30,6 +30,7 @@ #include "message.h" #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 /* ----------------------------------------------------------------- * diff --git a/src/defargs.l b/src/defargs.l index 40a77fb444e..e0b30facc2c 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -39,7 +39,7 @@ * type, and the matchArgumentList in util.cpp is be used to * further determine the correct separation. */ - +%option never-interactive %{ /* @@ -57,8 +57,8 @@ #include "arguments.h" #include "message.h" -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 /* ----------------------------------------------------------------- * state variables diff --git a/src/doctokenizer.l b/src/doctokenizer.l index c642fc16f11..31d583c5237 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -16,7 +16,7 @@ * */ - +%option never-interactive %{ #include @@ -37,8 +37,8 @@ #include "doxygen.h" #include "portable.h" -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 //-------------------------------------------------------------------------- diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 20d12a83085..5c991cbee14 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/formula.cpp b/src/formula.cpp index 7b8d346d7a6..ad377821f2e 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -15,8 +15,6 @@ */ #include -#include - #include #include #include diff --git a/src/fortrancode.l b/src/fortrancode.l index bf50835a7a0..af1a82e66ef 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -23,7 +23,7 @@ - links to interface functions - references to variables **/ - +%option never-interactive %{ /* @@ -56,9 +56,9 @@ //#define DBG_CTX(x) fprintf x #define DBG_CTX(x) do { } while(0) -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_TOP_STATE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 /* * For fixed formatted code position 6 is of importance (continuation character). diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 094bfb13160..cbe13fda4a0 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -37,7 +37,7 @@ * * - Must track yyLineNr when using REJECT, unput() or similar commands. */ - +%option never-interactive %{ #include @@ -48,7 +48,6 @@ #include #include #include -#include #include #include @@ -69,8 +68,8 @@ //#define DBG_CTX(x) fprintf x #define DBG_CTX(x) do { } while(0) -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 enum ScanVar { V_IGNORE, V_VARIABLE, V_PARAMETER, V_RESULT}; enum InterfaceType { IF_NONE, IF_SPECIFIC, IF_GENERIC, IF_ABSTRACT }; diff --git a/src/pre.l b/src/pre.l index e56b8ab713d..86f9ebbb831 100644 --- a/src/pre.l +++ b/src/pre.l @@ -14,7 +14,7 @@ * input used in their production; they are not affected by this license. * */ - +%option never-interactive %{ /* @@ -54,12 +54,12 @@ #include "memberdef.h" #include "membername.h" +#define YY_NO_UNISTD_H 1 + // Toggle for some debugging info //#define DBG_CTX(x) fprintf x #define DBG_CTX(x) do { } while(0) -#define YY_NEVER_INTERACTIVE 1 - struct CondCtx { CondCtx(int line,QCString id,bool b) diff --git a/src/pycode.l b/src/pycode.l index 306acabbb2f..3c41a69ec5e 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -21,7 +21,7 @@ * taught by Peter H. Froehlich . */ - +%option never-interactive %{ #include @@ -48,8 +48,8 @@ //#define DBG_CTX(x) fprintf x #define DBG_CTX(x) do { } while(0) -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 static ClassSDict g_codeClassSDict(17); static QCString g_curClassName; diff --git a/src/pyscanner.l b/src/pyscanner.l index 775b0a4e13b..8332a362456 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -21,7 +21,7 @@ * taught by Peter H. Froehlich . */ - +%option never-interactive %{ /* @@ -35,7 +35,6 @@ #include #include #include -#include #include #include @@ -55,8 +54,8 @@ //#define DBG_CTX(x) fprintf x #define DBG_CTX(x) do { } while(0) -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 /* ----------------------------------------------------------------- * diff --git a/src/scanner.l b/src/scanner.l index 4f8cdd8a5c0..6fb46312b0e 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -14,7 +14,7 @@ * input used in their production; they are not affected by this license. * */ - +%option never-interactive %{ /* @@ -28,7 +28,6 @@ #include #include #include -#include #include #include "scanner.h" @@ -45,8 +44,8 @@ #include "clangparser.h" -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 /* ----------------------------------------------------------------- * diff --git a/src/tclscanner.l b/src/tclscanner.l index 7befd40a2ea..5e249a6cb02 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -14,12 +14,12 @@ * input used in their production; they are not affected by this license. * */ +%option never-interactive %{ #include #include #include #include -#include #include #include @@ -51,8 +51,8 @@ #include "namespacedef.h" #include "filedef.h" -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 #define MAX_INCLUDE_DEPTH 10 diff --git a/src/vhdlcode.l b/src/vhdlcode.l index 0de09666607..369ae4881b1 100644 --- a/src/vhdlcode.l +++ b/src/vhdlcode.l @@ -17,7 +17,7 @@ * written by M. Kreis * supports VHDL-87/93/2008 ******************************************************************************/ - +%option never-interactive %{ /* @@ -44,8 +44,8 @@ #include "filedef.h" #include "tooltip.h" -#define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 // Toggle for some debugging info //#define DBG_CTX(x) fprintf x