diff options
Diffstat (limited to 'l10ntools/source')
-rw-r--r-- | l10ntools/source/cfglex.l | 23 | ||||
-rw-r--r-- | l10ntools/source/cfgmerge.cxx | 2 | ||||
-rw-r--r-- | l10ntools/source/export.cxx | 4 | ||||
-rw-r--r-- | l10ntools/source/filter/merge/makefile.mk | 79 | ||||
-rw-r--r-- | l10ntools/source/filter/utils/makefile.mk | 53 | ||||
-rw-r--r-- | l10ntools/source/help/HelpLinker.cxx | 99 | ||||
-rw-r--r-- | l10ntools/source/help/HelpLinker_main.cxx | 51 | ||||
-rw-r--r-- | l10ntools/source/help/helplinker.pmk | 31 | ||||
-rw-r--r-- | l10ntools/source/help/makefile.mk | 116 | ||||
-rw-r--r-- | l10ntools/source/makefile.mk | 141 | ||||
-rw-r--r-- | l10ntools/source/srclex.l | 28 | ||||
-rw-r--r-- | l10ntools/source/xrmlex.l | 38 | ||||
-rw-r--r-- | l10ntools/source/xrmmerge.cxx | 4 |
13 files changed, 114 insertions, 555 deletions
diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l index a8a01adb69a0..63860eea4fad 100644 --- a/l10ntools/source/cfglex.l +++ b/l10ntools/source/cfglex.l @@ -3,7 +3,7 @@ * lexer for parsing cfg source files * */ - +#define YY_NEVER_INTERACTIVE 1 /* enlarge token buffer to tokenize whole strings */ #undef YYLMAX @@ -25,7 +25,11 @@ #include "sal/main.h" #if defined __GNUC__ -#pragma GCC system_header +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#pragma GCC diagnostic ignored "-Wunused-function" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif #elif defined __SINPRO_CC #pragma disable_warn #elif defined _MSC_VER @@ -35,9 +39,9 @@ int yycolumn = 1; #define YY_USER_ACTION yycolumn += yyleng; -/* external functions (C++ code, declared as extren "C" */ -extern void workOnTokenSet( int, char* ); -extern FILE * init(int, char **); +/* external functions (C++ code, declared as extern "C" */ +extern "C" void workOnTokenSet( int, char* ); +extern "C" FILE * init(int, char **); int bText=0; %} @@ -76,7 +80,7 @@ int bText=0; \<\!\-\- { - char c1 = 0, c2 = 0, c3 = input(); + char c1 = 0, c2 = 0, c3 = yyinput(); char pChar[2]; pChar[1] = 0x00; pChar[0] = c3; @@ -91,7 +95,8 @@ int bText=0; break; c1 = c2; c2 = c3; - c3 = input(); + c3 = yyinput(); + pChar[0] = c3; workOnTokenSet( COMMEND, pChar ); } @@ -138,11 +143,7 @@ void YYWarning( const char *s ) } /*****************************************************************************/ -#ifdef GCC -void yyerror ( const char *s, ... ) -#else void yyerror ( const char *s ) -#endif /*****************************************************************************/ { /* write error to stderr */ diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx index b8f6c19c0d54..faaa6d52071c 100644 --- a/l10ntools/source/cfgmerge.cxx +++ b/l10ntools/source/cfgmerge.cxx @@ -41,7 +41,7 @@ #include "cfgmerge.hxx" #include "tokens.h" -extern "C" { int yyerror(char const *); } +void yyerror(char const *); namespace { diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index ed63e4ca5b8d..398083600334 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -41,8 +41,8 @@ #include <iostream> #include <rtl/strbuf.hxx> -extern "C" { int yyerror( const char * ); } -extern "C" { int YYWarning( const char * ); } +void yyerror( const char * ); +void YYWarning( const char * ); namespace { diff --git a/l10ntools/source/filter/merge/makefile.mk b/l10ntools/source/filter/merge/makefile.mk deleted file mode 100644 index 8ef73debd743..000000000000 --- a/l10ntools/source/filter/merge/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/..$/.. -TARGET = FCFGMerge -PRJNAME = l10ntools -PACKAGE = com$/sun$/star$/filter$/config$/tools$/merge - -# --- Settings ----------------------------------------------------- - -.INCLUDE: settings.mk - -#----- compile .java files ----------------------------------------- - -OWNCOPY = \ - $(MISC)$/$(TARGET)_copied.done - -CFGFILES = \ - FCFGMerge.cfg - -JAVACLASSFILES = \ - $(CLASSDIR)$/$(PACKAGE)$/Merger.class \ - $(CLASSDIR)$/$(PACKAGE)$/FCFGMerge.class - -CUSTOMMANIFESTFILE = \ - Manifest.mf - -MAXLINELENGTH = 100000 - -#----- make a jar from compiled files ------------------------------ - -JARCLASSDIRS = \ - com$/sun$/star$/filter$/config$/tools$/utils \ - com$/sun$/star$/filter$/config$/tools$/merge - -JARTARGET = $(TARGET).jar - -JARCOMPRESS = TRUE - -# --- targets ----------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(SOLAR_JAVA)" != "" -ALLTAR : $(OWNCOPY) - -.IF "$(JARTARGETN)" != "" -$(JARTARGETN) : $(OWNCOPY) -.ENDIF - -$(OWNCOPY) : $(CFGFILES) - -$(MKDIRHIER) $(CLASSDIR)$/$(PACKAGE) - $(COPY) $? $(CLASSDIR)$/$(PACKAGE) && $(TOUCH) $@ - -.ENDIF # "$(SOLAR_JAVA)" != "" diff --git a/l10ntools/source/filter/utils/makefile.mk b/l10ntools/source/filter/utils/makefile.mk deleted file mode 100644 index 43a28d57ee9e..000000000000 --- a/l10ntools/source/filter/utils/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/..$/.. -TARGET = FCFGUtils -PRJNAME = l10ntools -PACKAGE = com$/sun$/star$/filter$/config$/tools$/utils - -# --- Settings ----------------------------------------------------- - -.INCLUDE: settings.mk - -#----- compile .java files ----------------------------------------- - - -JAVACLASSFILES = \ - $(CLASSDIR)$/$(PACKAGE)$/AnalyzeStartupLog.class \ - $(CLASSDIR)$/$(PACKAGE)$/ConfigHelper.class \ - $(CLASSDIR)$/$(PACKAGE)$/Logger.class \ - $(CLASSDIR)$/$(PACKAGE)$/FileHelper.class \ - $(CLASSDIR)$/$(PACKAGE)$/MalformedCommandLineException.class \ - $(CLASSDIR)$/$(PACKAGE)$/Cache.class \ - $(CLASSDIR)$/$(PACKAGE)$/XMLHelper.class - -MAXLINELENGTH = 100000 - -# --- targets ----------------------------------------------------- - -.INCLUDE : target.mk diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx index 0103f43f8674..8c0d510ddb32 100644 --- a/l10ntools/source/help/HelpLinker.cxx +++ b/l10ntools/source/help/HelpLinker.cxx @@ -26,11 +26,8 @@ * ************************************************************************/ -#ifdef AIX -# undef _THREAD_SAFE -#endif - #include "HelpCompiler.hxx" +#include "l10ntools/HelpLinker.hxx" #include <map> @@ -38,7 +35,6 @@ #include <limits.h> #include <libxslt/xslt.h> -#include <libxslt/transform.h> #include <libxslt/xsltutils.h> #include <libxslt/functions.h> #include <libxslt/extensions.h> @@ -50,26 +46,17 @@ #include <expat.h> -#define DBHELP_ONLY - -class IndexerPreProcessor +namespace lucene { -private: - std::string m_aModuleName; - fs::path m_fsIndexBaseDir; - fs::path m_fsCaptionFilesDirName; - fs::path m_fsContentFilesDirName; - - xsltStylesheetPtr m_xsltStylesheetPtrCaption; - xsltStylesheetPtr m_xsltStylesheetPtrContent; - -public: - IndexerPreProcessor( const std::string& aModuleName, const fs::path& fsIndexBaseDir, - const fs::path& idxCaptionStylesheet, const fs::path& idxContentStylesheet ); - ~IndexerPreProcessor(); - - void processDocument( xmlDocPtr doc, const std::string& EncodedDocPath ); -}; +namespace document +{ +class Document; +} +namespace util +{ +class Reader; +} +} IndexerPreProcessor::IndexerPreProcessor ( const std::string& aModuleName, const fs::path& fsIndexBaseDir, @@ -97,7 +84,6 @@ IndexerPreProcessor::~IndexerPreProcessor() xsltFreeStylesheet( m_xsltStylesheetPtrContent ); } - std::string getEncodedPath( const std::string& Path ) { rtl::OString aOStr_Path( Path.c_str() ); @@ -260,51 +246,6 @@ public: } }; -class HelpLinker -{ -public: - void main(std::vector<std::string> &args, - std::string* pExtensionPath = NULL, - std::string* pDestination = NULL, - const rtl::OUString* pOfficeHelpPath = NULL ) - - throw( HelpProcessingException ); - - HelpLinker() - : init(true) - , m_pIndexerPreProcessor(NULL) - {} - ~HelpLinker() - { delete m_pIndexerPreProcessor; } - -private: - int locCount, totCount; - Stringtable additionalFiles; - HashSet helpFiles; - fs::path sourceRoot; - fs::path embeddStylesheet; - fs::path idxCaptionStylesheet; - fs::path idxContentStylesheet; - fs::path zipdir; - fs::path outputFile; - std::string extsource; - std::string extdestination; - std::string module; - std::string lang; - std::string extensionPath; - std::string extensionDestination; - bool bExtensionMode; - fs::path indexDirName; - fs::path indexDirParentName; - bool init; - IndexerPreProcessor* m_pIndexerPreProcessor; - void initIndexerPreProcessor(); - void link() throw( HelpProcessingException ); - void addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishid, - const std::string& fileB, const std::string& anchorB, - const std::string& jarfileB, const std::string& titleB ); -}; - namespace URLEncoder { static std::string encode(const std::string &rIn) @@ -1024,24 +965,6 @@ void HelpLinker::main( std::vector<std::string> &args, link(); } -SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { - std::vector<std::string> args; - for (int i = 1; i < argc; ++i) - args.push_back(std::string(argv[i])); - try - { - HelpLinker* pHelpLinker = new HelpLinker(); - pHelpLinker->main( args ); - delete pHelpLinker; - } - catch( const HelpProcessingException& e ) - { - std::cerr << e.m_aErrorMsg; - exit(1); - } - return 0; -} - // Variable to set an exception in "C" StructuredXMLErrorFunction static const HelpProcessingException* GpXMLParsingException = NULL; diff --git a/l10ntools/source/help/HelpLinker_main.cxx b/l10ntools/source/help/HelpLinker_main.cxx new file mode 100644 index 000000000000..fae24bcebf0b --- /dev/null +++ b/l10ntools/source/help/HelpLinker_main.cxx @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "HelpCompiler.hxx" +#include "l10ntools/HelpLinker.hxx" + +#include <sal/main.h> + +SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { + std::vector<std::string> args; + for (int i = 1; i < argc; ++i) + args.push_back(std::string(argv[i])); + try + { + HelpLinker* pHelpLinker = new HelpLinker(); + pHelpLinker->main( args ); + delete pHelpLinker; + } + catch( const HelpProcessingException& e ) + { + std::cerr << e.m_aErrorMsg; + exit(1); + } + return 0; +} + diff --git a/l10ntools/source/help/helplinker.pmk b/l10ntools/source/help/helplinker.pmk deleted file mode 100644 index 6e99d322f434..000000000000 --- a/l10ntools/source/help/helplinker.pmk +++ /dev/null @@ -1,31 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -# define HELPLINKER_DLLIMPLEMENTATION (see @ inc/xmlhelp/helplinkerdllapi.h) -CDEFS += -DHELPLINKER_DLLIMPLEMENTATION - -VISIBILITY_HIDDEN=TRUE diff --git a/l10ntools/source/help/makefile.mk b/l10ntools/source/help/makefile.mk deleted file mode 100644 index f3019f415b6f..000000000000 --- a/l10ntools/source/help/makefile.mk +++ /dev/null @@ -1,116 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/.. -PRJNAME = l10ntools -TARGET = HelpLinker -LIBBASENAME = helplinker -TARGETTYPE=CUI -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : helplinker.pmk - -CFLAGS+=-DL10N_DLLIMPLEMENTATION - -.IF "$(SYSTEM_LIBXSLT)" == "YES" -CFLAGS+= $(LIBXSLT_CFLAGS) -.ELSE -LIBXSLTINCDIR=external$/libxslt -CFLAGS+= -I$(SOLARINCDIR)$/$(LIBXSLTINCDIR) -.ENDIF - -CFLAGS+= $(SYSTEM_DB_CFLAGS) - -.IF "$(SYSTEM_EXPAT)" == "YES" -CFLAGS+=-DSYSTEM_EXPAT -.ENDIF - -.IF "$(SYSTEM_CLUCENE)" == "YES" -CFLAGS+= $(CLUCENE_CFLAGS) -.ENDIF - -OBJFILES=\ - $(OBJ)$/HelpLinker.obj \ - $(OBJ)$/HelpCompiler.obj \ - $(OBJ)$/HelpIndexer.obj \ - $(OBJ)$/HelpIndexer_main.obj \ - $(OBJ)$/HelpSearch.obj \ - $(OBJ)$/LuceneHelper.obj - -SLOFILES=\ - $(SLO)$/HelpLinker.obj \ - $(SLO)$/HelpCompiler.obj \ - $(SLO)$/LuceneHelper.obj \ - $(SLO)$/HelpIndexer.obj \ - $(SLO)$/HelpSearch.obj - -.IF "$(OS)" == "MACOSX" && "$(CPU)" == "P" && "$(COM)" == "GCC" -# There appears to be a GCC 4.0.1 optimization error causing _file:good() to -# report true right before the call to writeOut at HelpLinker.cxx:1.12 l. 954 -# but out.good() to report false right at the start of writeOut at -# HelpLinker.cxx:1.12 l. 537: -NOOPTFILES=\ - $(OBJ)$/HelpLinker.obj \ - $(SLO)$/HelpLinker.obj -.ENDIF - -APP1TARGET= $(TARGET) -APP1OBJS=\ - $(OBJ)$/HelpLinker.obj \ - $(OBJ)$/HelpCompiler.obj -APP1RPATH = NONE -APP1STDLIBS+=$(SALLIB) $(BERKELEYLIB) $(XSLTLIB) $(EXPATASCII3RDLIB) - -APP2TARGET=HelpIndexer -APP2OBJS=\ - $(OBJ)$/LuceneHelper.obj \ - $(OBJ)$/HelpIndexer.obj \ - $(OBJ)$/HelpIndexer_main.obj -APP2RPATH = NONE -APP2STDLIBS+=$(SALLIB) $(CLUCENELIB) - -SHL1TARGET =$(LIBBASENAME)$(DLLPOSTFIX) -SHL1LIBS= $(SLB)$/$(TARGET).lib -.IF "$(COM)" == "MSC" -SHL1IMPLIB =i$(LIBBASENAME) -.ELSE -SHL1IMPLIB =$(LIBBASENAME)$(DLLPOSTFIX) -.ENDIF -SHL1DEF =$(MISC)$/$(SHL1TARGET).def -SHL1STDLIBS =$(SALLIB) $(BERKELEYLIB) $(XSLTLIB) $(EXPATASCII3RDLIB) $(CLUCENELIB) -SHL1USE_EXPORTS =ordinal - -DEF1NAME =$(SHL1TARGET) -DEFLIB1NAME =$(TARGET) - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/l10ntools/source/makefile.mk b/l10ntools/source/makefile.mk deleted file mode 100644 index db60289be394..000000000000 --- a/l10ntools/source/makefile.mk +++ /dev/null @@ -1,141 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -INCPRE=$(MISC) - -PRJNAME=l10ntools -TARGET=transex -TARGETTYPE=CUI -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : settings.mk - -CDEFS+= -DYY_NEVER_INTERACTIVE=1 - -.IF "$(SYSTEM_EXPAT)" == "YES" -CFLAGS+=-DSYSTEM_EXPAT -.ENDIF - - -# --- Files -------------------------------------------------------- - -OBJFILES= \ - $(OBJ)$/export.obj \ - $(OBJ)$/export2.obj \ - $(OBJ)$/merge.obj \ - $(OBJ)$/xmlparse.obj \ - $(OBJ)$/helpmerge.obj \ - $(OBJ)$/helpex.obj \ - $(OBJ)$/file.obj \ - $(OBJ)$/directory.obj - - -LIB1TARGET= $(LB)$/$(TARGET).lib -LIB1ARCHIV= $(LB)$/libtransex.a -LIB1OBJFILES= $(OBJ)$/export.obj \ - $(OBJ)$/export2.obj \ - $(OBJ)$/merge.obj \ - $(OBJ)$/file.obj \ - $(OBJ)$/directory.obj - -APP1VERSIONMAP=exports.map - -# extractor and merger for *.src and *.hrc -APP1TARGET= transex3 -APP1OBJS= $(OBJ)$/src_yy_wrapper.obj -APP1RPATH= NONE -APP1STDLIBS+= \ - $(SALLIB) - -APP1LIBS+= $(LB)$/$(TARGET).lib -APP1DEPN= $(OBJ)$/src_yy_wrapper.obj $(LB)$/$(TARGET).lib - -APP2TARGET= helpex -APP2OBJS= $(OBJ)$/helpmerge.obj $(OBJ)$/xmlparse.obj $(OBJ)$/export2.obj $(OBJ)$/merge.obj $(OBJ)$/helpex.obj -APP2RPATH= NONE -APP2STDLIBS+= \ - $(EXPATASCII3RDLIB) \ - $(SALLIB) - -# extractor and merger for *.lng and *.lng -APP3TARGET= ulfex -APP3OBJS= $(OBJ)$/lngmerge.obj $(OBJ)$/merge.obj $(OBJ)$/export2.obj $(OBJ)$/lngex.obj -APP3RPATH= NONE -APP3STDLIBS+= \ - $(SALLIB) - -# tag checker for *.gsi -APP5TARGET= gsicheck -APP5OBJS= $(OBJ)$/gsicheck.obj $(OBJ)$/tagtest.obj -APP5RPATH= NONE -APP5STDLIBS+= \ - $(SALLIB) - -# extractor and merger for *.cfg -APP6TARGET= cfgex -APP6OBJS= $(OBJ)$/cfgmerge.obj $(OBJ)$/cfg_yy_wrapper.obj $(OBJ)$/merge.obj $(OBJ)$/export2.obj -APP6RPATH= NONE -APP6STDLIBS+= \ - $(SALLIB) - -# extractor and merger for *.xrm -APP7TARGET= xrmex -APP7OBJS= $(OBJ)$/xrmmerge.obj $(OBJ)$/xrm_yy_wrapper.obj $(OBJ)$/merge.obj $(OBJ)$/export2.obj -APP7RPATH= NONE -APP7STDLIBS+= \ - $(SALLIB) - -# localizer for l10n framework -APP9TARGET= localize -EXCEPTIONSFILES= \ - $(OBJ)$/localize.obj -APP9OBJS= $(OBJ)$/localize.obj -APP9RPATH= NONE -APP9STDLIBS+= \ - $(SALLIB) - -DEPOBJFILES=$(APP1OBJS) $(APP2OBJS) $(APP3OBJS) $(APP4OBJS) $(APP5OBJS) $(APP6OBJS) $(APP7OBJS) $(APP8OBJS) $(APP9OBJS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -$(MISC)$/%_yy.c : %lex.l - flex -l -w -8 -o$@ $< - -# Helper to suppress warnings in lex generated c code, see #i57362# - -$(OBJ)$/src_yy_wrapper.obj: $(MISC)$/src_yy.c -$(OBJ)$/cfg_yy_wrapper.obj: $(MISC)$/cfg_yy.c -$(OBJ)$/xrm_yy_wrapper.obj: $(MISC)$/xrm_yy.c - diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l index 814e236e98a4..ccde01be0a42 100644 --- a/l10ntools/source/srclex.l +++ b/l10ntools/source/srclex.l @@ -4,7 +4,7 @@ * lexer for parsing ressource source files (*.src) * */ - +#define YY_NEVER_INTERACTIVE 1 /* enlarge token buffer to tokenize whole strings */ #undef YYLMAX @@ -26,19 +26,23 @@ #include "sal/main.h" #if defined __GNUC__ -#pragma GCC system_header +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#pragma GCC diagnostic ignored "-Wunused-function" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif #elif defined __SINPRO_CC #pragma disable_warn #elif defined _MSC_VER #pragma warning(push, 1) #endif -/* external functions (C++ code, declared as extren "C" */ -extern int WorkOnTokenSet( int, char* ); -extern FILE * init(int, char **); -extern int SetError(); -extern int GetError(); -extern void Close(); +/* external functions (C++ code, declared as extern "C" */ +extern "C" int WorkOnTokenSet( int, char* ); +extern "C" FILE * init(int, char **); +extern "C" int SetError(); +extern "C" int GetError(); +extern "C" void Close(); /* forwards */ void YYWarning(); @@ -69,7 +73,7 @@ void YYWarning(); WorkOnTokenSet( IGNOREDTOKENS, yytext ); } "/*" { - char c1 = 0, c2 = input(); + char c1 = 0,c2 = yyinput(); char pChar[2]; pChar[1] = 0x00; pChar[0] = c2; @@ -82,7 +86,7 @@ void YYWarning(); if ( c1 == '*' && c2 == '/' ) break; c1 = c2; - c2 = input(); + c2 = yyinput(); pChar[0] = c2; WorkOnTokenSet( COMMEND, pChar ); } @@ -216,7 +220,7 @@ int yywrap(void) } /*****************************************************************************/ -void YYWarning( char *s ) +void YYWarning( const char *s ) /*****************************************************************************/ { /* write warning to stderr */ @@ -224,7 +228,7 @@ void YYWarning( char *s ) } /*****************************************************************************/ -void yyerror( char *s ) +void yyerror( const char *s ) /*****************************************************************************/ { /* write error to stderr */ diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l index 5a2170f11e97..56d43d356d3b 100644 --- a/l10ntools/source/xrmlex.l +++ b/l10ntools/source/xrmlex.l @@ -3,7 +3,7 @@ * lexer for parsing xml-property source files (*.xml) * */ - +#define YY_NEVER_INTERACTIVE 1 /* enlarge token buffer to tokenize whole strings */ #undef YYLMAX @@ -25,24 +25,28 @@ #include "sal/main.h" #if defined __GNUC__ -#pragma GCC system_header +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#pragma GCC diagnostic ignored "-Wunused-function" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif #elif defined __SINPRO_CC #pragma disable_warn #elif defined _MSC_VER #pragma warning(push, 1) #endif -/* external functions (C++ code, declared as extren "C" */ -extern int WorkOnTokenSet( int, char* ); -extern int Argument( char * ); -extern int InitXrmExport( char * , char * ); -extern int EndXrmExport(); -extern int GetError(); -extern int SetError(); -extern char *GetOutputFile( int argc, char* argv[]); -extern FILE *GetXrmFile(); -extern int isQuiet(); -extern char* getFilename(); +/* external functions (C++ code, declared as extern "C" */ +extern "C" int WorkOnTokenSet( int, char* ); +extern "C" int Argument( char * ); +extern "C" int InitXrmExport( char * , char * ); +extern "C" int EndXrmExport(); +extern "C" int GetError(); +extern "C" int SetError(); +extern "C" char *GetOutputFile( int argc, char* argv[]); +extern "C" FILE *GetXrmFile(); +extern "C" int isQuiet(); +extern "C" char* getFilename(); /* forwards */ void YYWarning(); @@ -131,7 +135,7 @@ int bText=0; "<!--" { - char c1 = 0, c2 = 0, c3 = input(); + char c1 = 0, c2 = 0, c3 = yyinput(); char pChar[2]; pChar[1] = 0x00; pChar[0] = c3; @@ -146,7 +150,7 @@ int bText=0; break; c1 = c2; c2 = c3; - c3 = input(); + c3 = yyinput(); pChar[0] = c3; WorkOnTokenSet( COMMEND, pChar ); } @@ -179,11 +183,7 @@ void YYWarning( const char *s ) } /*****************************************************************************/ -#ifdef GCC -void yyerror ( const char *s, ... ) -#else void yyerror ( const char *s ) -#endif /*****************************************************************************/ { /* write error to stderr */ diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx index 0f1e3e0d2fbf..a26e866388af 100644 --- a/l10ntools/source/xrmmerge.cxx +++ b/l10ntools/source/xrmmerge.cxx @@ -42,8 +42,8 @@ using namespace std; -extern "C" { int yyerror( char * ); } -extern "C" { int YYWarning( char * ); } +void yyerror( const char * ); +void YYWarning( const char * ); // defines to parse command line #define STATE_NON 0x0001 |