[Libreoffice-commits] core.git: l10ntools/inc l10ntools/source

Stephan Bergmann sbergman at redhat.com
Tue Apr 8 01:18:18 PDT 2014


 l10ntools/inc/xrmlex.hxx      |   40 ++++++++++++++++++++++++++++++++++++++++
 l10ntools/source/xrmlex.l     |   15 ++-------------
 l10ntools/source/xrmmerge.cxx |    4 ++--
 3 files changed, 44 insertions(+), 15 deletions(-)

New commits:
commit 52e359d82dbf239e5fd72c5f20d31b206c72d3e7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 8 10:17:38 2014 +0200

    Clean up function declarations
    
    Change-Id: Ie1360857dc4ed3102c709c1ef5b5929e5d5d5d7b

diff --git a/l10ntools/inc/xrmlex.hxx b/l10ntools/inc/xrmlex.hxx
new file mode 100644
index 0000000..3711ca6
--- /dev/null
+++ b/l10ntools/inc/xrmlex.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_L10NTOOLS_SOURCE_XRMLEX_HXX
+#define INCLUDED_L10NTOOLS_SOURCE_XRMLEX_HXX
+
+#include <sal/config.h>
+
+#include <stdio.h>
+
+extern "C" int WorkOnTokenSet( int, char* );
+extern "C" int Argument( char * );
+extern "C" int InitXrmExport( const 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" const char* getFilename();
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index 3017a7f..f91405f 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -37,6 +37,7 @@
 
 /* table of possible token ids */
 #include "tokens.h"
+#include "xrmlex.hxx"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -53,18 +54,6 @@
 #endif
 #define YY_NO_UNISTD_H
 
-/* 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();
 
@@ -226,7 +215,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
 		return 1;
 	}
 	pFile = GetXrmFile();
-	InitXrmExport( pOutput , getFilename() );
+	InitXrmExport( getFilename() );
 
     if ( !pFile )
 		return 1;
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index deeccf7..f3705fa 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -26,6 +26,7 @@
 #include "common.hxx"
 #include "export.hxx"
 #include "po.hxx"
+#include "xrmlex.hxx"
 #include "xrmmerge.hxx"
 #include "tokens.h"
 #include "helper.hxx"
@@ -36,7 +37,6 @@
 using namespace std;
 
 void yyerror( const char * );
-void YYWarning( const char * );
 
 // set of global variables
 bool bMergeMode;
@@ -78,7 +78,7 @@ extern char *GetOutputFile( int argc, char* argv[])
     }
 }
 
-int InitXrmExport( char*, char* pFilename)
+int InitXrmExport( const char* pFilename)
 {
     // instanciate Export
     OString sFilename( pFilename );


More information about the Libreoffice-commits mailing list