summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-13 16:11:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-13 14:54:14 +0000
commit2cdc693c56c266e149473241e6b3cb54fb2a2a03 (patch)
tree0c4dc65cfd85858ef1a12db9217830d708e67336 /hwpfilter
parent80f9ad9011843dbc9d166147402366438bcfe29a (diff)
Remove __cplusplus-checks from apparently-C++-only files
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6 Reviewed-on: https://gerrit.libreoffice.org/27187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/grammar.cxx12
-rw-r--r--hwpfilter/source/lexer.cxx31
2 files changed, 1 insertions, 42 deletions
diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx
index 14751da6fbf7..80d2d175a6e9 100644
--- a/hwpfilter/source/grammar.cxx
+++ b/hwpfilter/source/grammar.cxx
@@ -58,13 +58,6 @@ typedef union {
} YYSTYPE;
#include <stdio.h>
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
#define YYFINAL 102
#define YYFLAG -32768
#define YYNTBASE 43
@@ -438,13 +431,8 @@ int yydebug; /* nonzero means print parse trace */
to the proper pointer type. */
#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index 76ba0ba770e8..0c52851d26dc 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -36,17 +36,6 @@
#include <stdio.h>
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
#include <stdlib.h>
#ifndef _WIN32
#include <unistd.h>
@@ -61,16 +50,6 @@
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
#ifdef YY_USE_CONST
#define yyconst const
#else
@@ -966,14 +945,10 @@ char *yytext;
#define isatty _isatty
#endif
-#ifdef __cplusplus
extern "C" {
-#endif
#include "grammar.h"
int yywrap();
-#ifdef __cplusplus
}
-#endif
#ifdef _WIN32
extern YYSTYPE yylval;
@@ -1023,11 +998,7 @@ static int yy_top_state YY_PROTO(( void ));
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
-#if defined __STDC__ && __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
+#if !(defined __STDC__ && __STDC__)
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).