Kaydet (Commit) bcbb3c4f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove dead Executable_genlang

...originally introduce with 999c68f1 "genLang
project (awareness)", but apparently never took off.

Change-Id: I6f61271a75d96750dea63de596b7745c2f589b83
Reviewed-on: https://gerrit.libreoffice.org/49389Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst c07b913c
......@@ -34,7 +34,6 @@ $(eval $(call gb_Helper_register_executables,NONE, \
genconv_dict \
gendict \
genindex_data \
genlang \
helpex \
idxdict \
langsupport \
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_Executable_Executable,genlang))
$(eval $(call gb_Executable_set_include,genlang,\
-I$(SRCDIR)/l10ntools/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Executable_use_externals,genlang,\
boost_headers \
))
$(eval $(call gb_Executable_add_scanners,genlang,\
l10ntools/source/gLexPo \
l10ntools/source/gLexUi \
l10ntools/source/gLexSrc \
l10ntools/source/gLexXcu \
l10ntools/source/gLexXcs \
l10ntools/source/gLexXrm \
l10ntools/source/gLexXml \
l10ntools/source/gLexXhp \
l10ntools/source/gLexUlf \
l10ntools/source/gLexTree \
))
$(eval $(call gb_Executable_add_exception_objects,genlang,\
l10ntools/source/gLang \
l10ntools/source/gL10nMem \
l10ntools/source/gConvProp \
l10ntools/source/gConv \
l10ntools/source/gConvPo \
l10ntools/source/gConvSrc \
l10ntools/source/gConvUi \
l10ntools/source/gConvXrm \
l10ntools/source/gConvXml \
l10ntools/source/gConvXhp \
l10ntools/source/gConvXcs \
l10ntools/source/gConvXcu \
l10ntools/source/gConvUlf \
l10ntools/source/gConvTree \
))
# vim:set noet sw=4 ts=4:
/* -*- 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 GCON_HXX
#define GCON_HXX
#include <iostream>
#include <fstream>
class convert_gen
{
public:
static convert_gen *mcImpl;
convert_gen(l10nMem& cMemory);
virtual ~convert_gen();
// Create instance
static convert_gen& createInstance(l10nMem& cMemory,
const string& sSourceDir,
const string& sTargetDir,
const string& sSourceFile);
// do extract/merge
bool execute(const bool bMerge);
// all converters MUST implement this function
virtual void doExecute() = 0;
// utility functions for converters
void lexRead(char *sBuf, size_t *result, size_t nMax_size);
static void lexStrncpy(char* s1, const char * s2, int n);
string& copySource(char const *yyText, bool bDoClear = true);
protected:
// generic variables
bool mbMergeMode;
bool mbLoadMode;
string msSourcePath;
string msTargetPath;
string msSourceFile;
l10nMem& mcMemory;
string msCollector;
int miLineNo;
string msSourceBuffer, msCopyText;
int miSourceReadIndex;
bool prepareFile();
// utility functions for converters
void writeSourceFile(const string& line);
static bool createDir(const string& sDir, const string& sFile);
private:
ofstream mcOutputFile;
static bool checkAccess(string& sFile);
};
#endif
/* -*- 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 GCONPO_HXX
#define GCONPO_HXX
#include "gConv.hxx"
extern int polex(void);
class convert_po : public convert_gen
{
public:
bool mbExpectId;
bool mbExpectStr;
convert_po(l10nMem& crMemory);
~convert_po() override {};
void startLook ();
void setValue (char *syyText, int iLineCnt);
void setFuzzy ();
void setKey (char *syyText);
void setMsgId ();
void setMsgStr ();
void handleNL ();
// Used to save .pot files
void startSave(const string& sName,
const string& sTargetDir,
const string& sFile);
void save(const string& sFileName,
const string& sKey,
const string& sENUStext,
const string& sText,
const string& sComment,
const string& sResource,
const string& sGroup,
bool bFuzzy);
void endSave();
private:
string msId;
string msStr;
string msKey;
bool mbFuzzy;
filebuf mfOutBuffer;
void doExecute() override;
string genKeyId(const string& text);
};
#endif
/* -*- 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 GCONPROP_HXX
#define GCONPROP_HXX
#include "gConv.hxx"
class convert_prop : public convert_gen
{
public:
convert_prop(l10nMem& crMemory) : convert_gen(crMemory) {};
~convert_prop() override {};
private:
void doExecute() override;
};
#endif
/* -*- 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 GCONSRCHXX
#define GCONSRCHXX
#include "gConv.hxx"
extern int srclex(void);
class convert_src : public convert_gen
{
public:
// bool mbExpectValue;
convert_src(l10nMem& crMemory);
~convert_src() override {};
void setValue(string& syyText);
bool setLang(string& syyText);
void setName(string& syyText, bool revertLevel);
void setCmd(string& syyText);
void startBlock();
void stopBlock();
void defMacro();
void endMacro();
// void setId (char *syyText, bool bIde);
// void setText (char *syyText);
// void setList (char *syyText);
// void setListItem (char const *syyText, bool bIsStart);
// void setNL (char *syyText, bool bMacro);
private:
vector<string> mcStack;
int miLevel;
bool mbMacroActive;
void doExecute() override;
#if 0
string msValue;
string msName;
string msTextName;
string msCmd;
string msGroup;
bool mbEnUs;
bool mbExpectName;
bool mbAutoPush;
bool mbValuePresent;
bool mbInList;
bool mbInListItem;
int miListCount;
static void trim(string& sText);
void buildKey(string& sKey);
void insertLanguagePart(string& sKey, string& sTextType);
#endif
};
#endif
/* -*- 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 GCONTREE_HXX
#define GCONTREE_HXX
#include "gConv.hxx"
extern int treelex(void);
class convert_tree : public convert_gen
{
public:
typedef enum {
STATE_TAG_NONE,
STATE_TAG_HELPSEC,
STATE_TAG_NODE,
STATE_TAG_TOPIC,
STATE_TAG_VALUE
} STATE_TAG;
typedef enum {
STATE_VAL_NONE,
STATE_VAL_APPL,
STATE_VAL_ID,
STATE_VAL_TITLE
} STATE_VAL;
convert_tree(l10nMem& crMemory);
~convert_tree() override;
void setString(char *yytext);
void setState(char *yytext, STATE_TAG eNewStateTag, STATE_VAL eNewStateVAL, char *sModule);
void setValue(char *yytext);
void writeSourceFile(string& sText, int inx);
string& copySourceSpecial(char *yytext, int iType);
private:
string msLine;
string msModule;
string msId;
string msAppl;
ofstream *mcOutputFiles;
STATE_TAG meStateTag;
STATE_VAL meStateVal;
int miCntLanguages;
void doExecute() override;
};
#endif
/* -*- 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 GCONUIHXX
#define GCONUIHXX
#include "gConv.hxx"
extern int uilex(void);
class convert_ui : public convert_gen
{
public:
convert_ui(l10nMem& crMemory);
~convert_ui() override {};
private:
void doExecute() override;
};
#endif
/* -*- 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 GCONULF_HXX
#define GCONULF_HXX
#include "gConv.hxx"
extern int ulflex(void);
class convert_ulf : public convert_gen
{
public:
convert_ulf(l10nMem& crMemory) : convert_gen(crMemory) {};
~convert_ulf() override {};
void setKey(char *syyText);
void setText(char *syyText, bool bIsEnUs);
void setValue(char *syyText);
private:
string msKey;
void doExecute() override;
void handleLines();
};
#endif
/* -*- 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 GCONXCS_HXX
#define GCONXCS_HXX
#include "gConv.hxx"
extern int xcslex(void);
class convert_xcs : public convert_gen
{
public:
convert_xcs(l10nMem& crMemory);
~convert_xcs() override {};
void setKey(char *syyText);
void unsetKey(char *syyText);
void startCollectData(char *syyText);
void stopCollectData(char *syyText);
private:
string msKey;
bool mbCollectingData;
void doExecute() override;
};
#endif
/* -*- 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 GCONXCU_HXX
#define GCONXCU_HXX
#include "gConv.hxx"
extern int xculex(void);
class xcu_stack_entry;
class convert_xcu : public convert_gen
{
public:
bool mbNoCollectingData;
convert_xcu(l10nMem& crMemory);
~convert_xcu() override {};
void pushKey(char *syyText);
void popKey(char *syyText);
void startCollectData(char *syyText);
void stopCollectData(char *syyText);
void copySpecial(char *syyText);
void copyNL(char *syyText);
void addLevel();
private:
vector<string> mcStack;
int miLevel;
bool mbNoTranslate;
void doExecute() override;
};
#endif
/* -*- 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 GCONXHP_HXX
#define GCONXHP_HXX
#include "gConv.hxx"
extern int xhplex(void);
class convert_xhp : public convert_gen
{
public:
convert_xhp(l10nMem& crMemory);
~convert_xhp() override;
void setString(char *yytext);
void openTag(char *yytext);
void closeTag(char *yytext);
void closeTagNOvalue(char *yytext);
void setId(char *yytext);
void setLang(char *yytext);
void setRef(char *yytext);
void openTransTag(char *yytext);
void closeTransTag(char *yytext);
void stopTransTag(char *yytext);
void startComment(char *yytext);
void stopComment(char *yytext);
void handleSpecial(char *yytext);
void handleDataEnd(char *yytext);
void duplicate(char *yytext);
string& copySourceSpecial(char *yytext, int iType);
void writeSourceFile(string& sText, int inx);
private:
typedef enum {
VALUE_NOT_USED,
VALUE_IS_TAG,
VALUE_IS_TAG_TRANS,
VALUE_IS_VALUE,
VALUE_IS_VALUE_TAG
} STATE;
STATE meExpectValue, mePushValue;
string msKey, msPushCollect;
string msLine;
string *msLangText;
ofstream *mcOutputFiles;
int miCntLanguages;
void doExecute() override;
};
#endif
/* -*- 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 GCONVXMLHXX
#define GCONVXMLHXX
#include "gConv.hxx"
extern int xmllex(void);
class convert_xml : public convert_gen
{
public:
convert_xml(l10nMem& crMemory);
~convert_xml() override {};
private:
void doExecute() override;
};
#endif
/* -*- 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 GCONXRM_HXX
#define GCONXRM_HXX
#include "gConv.hxx"
extern int xrmlex(void);
class convert_xrm : public convert_gen
{
public:
bool mbNoCollectingData;
convert_xrm(l10nMem& crMemory);
~convert_xrm() override {};
void setId(char *yytext);
void setLang(char *yytext);
void setTag(char *yytext);
void startCollectData(char *yytext);
void stopCollectData(char *yytext);
private:
string msKey;
bool mbIsTag;
bool mbIsLang;
string msTag;
void doExecute() override;
};
#endif
/* -*- 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 GL10NMEM_HXX
#define GL10NMEM_HXX
class l10nMem_enus_entry;
class l10nMem_file_entry;
class l10nMem_lang_list_entry;
class l10nMem
{
public:
l10nMem();
~l10nMem();
typedef enum {
ENTRY_DELETED,
ENTRY_ADDED,
ENTRY_CHANGED,
ENTRY_NORMAL
} ENTRY_STATE;
static int showError (const string& sText, int iLineNo = 0);
static void showWarning(const string& sText, int iLineNo = 0);
static void showDebug (const string& sText, int iLineNo = 0);
static void showVerbose(const string& sText, int iLineNo = 0);
static void keyToLower (string& sKey);
void setModuleName(const string& sModuleName);
const string& getModuleName(void);
void setLanguage(const string& sLanguage,
bool bCreate);
void setConvert(bool bConvert,
bool bStrict);
void setVerbose(const bool doVerbose);
void setDebug(const bool doDebug);
void loadEntryKey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sOrgText,
const string& sText,
const string& sComment,
const string& sResource,
const string& sGroup,
bool bIsFuzzy);
void setSourceKey(int iLineNo,
const string& sFilename,
const string& sKey,
const string& sText,
const string& sComment,
const string& sResource,
const string& sGroup,
bool bMustExist);
void saveTemplates(const string& sTargetDir,
bool bForce);
void saveLanguages(l10nMem& cMem,
const string& sTargetDir,
bool bForce);
void dumpMem(const string& sTargetDir);
int prepareMerge();
bool getMergeLang(string& sLang,
string& sText);
void showNOconvert();
bool isError();
void convertToInetString(string& sText);
void convertFromInetString(string& sText);
private:
bool mbVerbose;
bool mbDebug;
bool mbInError;
string msModuleName;
int miCurFileInx;
int miCurLangInx;
int miCurENUSinx;
bool mbConvertMode;
bool mbStrictMode;
vector<l10nMem_enus_entry> mcENUSlist;
vector<l10nMem_file_entry> mcFileList;
vector<l10nMem_lang_list_entry> mcLangList;
void formatAndShowText(const string& sType, int iLineNo, const string& sText);
bool needWrite(const string sFileName, bool bForce);
bool convFilterWarning(const string& sSourceFile,
const string& sKey,
const string& sMsgId);
void convEntryKey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sMsgId,
const string& sMsgStr,
bool bIsFuzzy);
void loadENUSkey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sMsgId,
const string& sComment,
const string& sResource,
const string& sGroup);
void loadLangKey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sMsgId,
const string& sMsgStr,
bool bFuzzy);
void reorganize(bool bConvert);
bool locateKey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sMsgId,
bool bThrow);
void addKey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sMsgId,
const string& sComment,
const string& sResource,
const string& sGroup,
l10nMem::ENTRY_STATE eStat);
bool findFileName(const string& sSourceFile);
};
#endif
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConv.hxx"
#include "gConvPo.hxx"
#include "gConvProp.hxx"
#include "gConvSrc.hxx"
#include "gConvUi.hxx"
#include "gConvTree.hxx"
#include "gConvUlf.hxx"
#include "gConvXcs.hxx"
#include "gConvXcu.hxx"
#include "gConvXhp.hxx"
#include "gConvXml.hxx"
#include "gConvXrm.hxx"
#ifdef _WIN32
#include <io.h>
#include <direct.h>
#define OS_ACCESS(x,y) _access(x,y)
#define OS_MKDIR(x) _mkdir(x)
#else
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#define OS_ACCESS(x,y) access(x,y)
#define OS_MKDIR(x) mkdir(x,0777)
#endif
convert_gen * convert_gen::mcImpl;
convert_gen::convert_gen(l10nMem& cMemory)
: mcMemory(cMemory)
{
mcImpl = this;
}
convert_gen::~convert_gen()
{
}
convert_gen& convert_gen::createInstance(l10nMem& cMemory,
const string& sSourceDir,
const string& sTargetDir,
const string& sSourceFile)
{
// did the user give a .xxx with the source file ?
int nInx = sSourceFile.rfind(".");
if (nInx == (int)string::npos)
throw l10nMem::showError("source file: "+sSourceFile+" missing extension");
// find correct conversion class and create correct object
string sExtension = sSourceFile.substr(nInx+1);
convert_gen *x;
if (sExtension == "hrc") x = new convert_src(cMemory);
else if (sExtension == "src") x = new convert_src(cMemory);
else if (sExtension == "po") x = new convert_po(cMemory);
else if (sExtension == "pot") x = new convert_po(cMemory);
else if (sExtension == "tree") x = new convert_tree(cMemory);
else if (sExtension == "ulf") x = new convert_ulf(cMemory);
else if (sExtension == "ui") x = new convert_ui(cMemory);
else if (sExtension == "xcu") x = new convert_xcu(cMemory);
else if (sExtension == "xhp") x = new convert_xhp(cMemory);
else if (sExtension == "xrm") x = new convert_xrm(cMemory);
else if (sExtension == "xml") x = new convert_xml(cMemory);
else if (sExtension == "properties") x = new convert_prop(cMemory);
else throw l10nMem::showError("unknown extension on source file: "+sSourceFile);
// and set environment
x->msSourceFile = sSourceFile;
x->msTargetPath = sTargetDir;
x->msSourcePath = sSourceDir + sSourceFile;
return *x;
}
bool convert_gen::execute(const bool bMerge)
{
mbMergeMode = bMerge;
// and load file
if (!prepareFile())
return false;
// and execute conversion
doExecute();
return true;
}
bool convert_gen::checkAccess(string& sFile)
{
return (OS_ACCESS(sFile.c_str(), 0) == 0);
}
bool convert_gen::createDir(const string& sDir, const string& sFile)
{
string sNewDir(sDir);
int newPos, oldPos;
for (oldPos = 0;; oldPos = newPos +1) {
newPos = sFile.find_first_of("/\\", oldPos);
if (newPos == (int)string::npos)
break;
sNewDir += sFile.substr(oldPos, newPos-oldPos) + "/";
if (!checkAccess(sNewDir)) {
OS_MKDIR(sNewDir.c_str());
}
}
return true;
}
bool convert_gen::prepareFile()
{
ifstream inputFile(msSourcePath.c_str(), ios::binary);
if (!inputFile.is_open()) {
if (mbLoadMode) {
l10nMem::showWarning("Cannot open file (" + msSourcePath + ")");
return false;
}
else
throw l10nMem::showError("Cannot open file (" + msSourcePath + ") for reading");
}
// get length of file:
miSourceReadIndex = 0;
inputFile.seekg (0, ios::end);
msSourceBuffer.resize((unsigned int)inputFile.tellg());
inputFile.seekg (0, ios::beg);
// get size, prepare string and read whole file
inputFile.read(const_cast<char *>(msSourceBuffer.c_str()), msSourceBuffer.size());
if ((unsigned int)inputFile.gcount() != msSourceBuffer.size())
throw l10nMem::showError("cannot read whole file");
inputFile.close();
if (mbMergeMode && !mbLoadMode) {
// close previous file
if (mcOutputFile.is_open())
mcOutputFile.close();
// open output file
mcOutputFile.open((msTargetPath+msSourceFile).c_str(), ios::binary);
if (mcOutputFile.is_open())
return true;
if (createDir(msTargetPath, msSourceFile)) {
mcOutputFile.open((msTargetPath+msSourceFile).c_str(), ios::binary);
if (mcOutputFile.is_open())
return true;
}
throw l10nMem::showError("Cannot open file (" + msTargetPath+msSourceFile + ") for writing");
}
return true;
}
void convert_gen::lexRead(char *sBuf, size_t *result, size_t nMax_size)
{
// did we hit eof
if (miSourceReadIndex == -1)
*result = 0;
else {
// assume we can copy all that are left.
*result = msSourceBuffer.size() - miSourceReadIndex;
// space enough for the whole line ?
if (*result <= nMax_size) {
msSourceBuffer.copy(sBuf, *result, miSourceReadIndex);
l10nMem::showDebug(sBuf);
miSourceReadIndex = -1;
}
else {
msSourceBuffer.copy(sBuf, nMax_size, miSourceReadIndex);
l10nMem::showDebug(sBuf);
*result = nMax_size;
miSourceReadIndex += nMax_size;
}
}
}
void convert_gen::lexStrncpy(char *s1, const char *s2, int n)
{
register int i;
for (i = 0; i < n; ++i)
s1[i] = s2[i];
}
void convert_gen::writeSourceFile(const string& line)
{
if (!line.size())
return;
if (mcOutputFile.is_open())
mcOutputFile.write(line.c_str(), line.size());
}
string& convert_gen::copySource(char const *yyText, bool bDoClear)
{
int nL;
if (!yyText) {
msCopyText.clear();
return msCopyText;
}
msCopyText = yyText;
// write text for merge
if (mbMergeMode)
writeSourceFile(msCopyText);
if (bDoClear)
msCollector.clear();
else
msCollector += msCopyText;
// remove any CR
for (nL = 0; nL < (int)msCopyText.size(); ++nL) {
if (msCopyText[nL] == '\r') {
msCopyText.erase(nL, 1);
--nL;
continue;
}
if (msCopyText[nL] == '\n')
++miLineNo;
}
return msCopyText;
}
/* -*- 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
*/
#include <iomanip>
#include <ctime>
#include <string>
#include <vector>
using namespace std;
#include <rtl/crc.h>
#include "gL10nMem.hxx"
#include "gConvPo.hxx"
#include <iostream>
#include <fstream>
#include <cstdlib>
convert_po::convert_po(l10nMem& crMemory)
: convert_gen(crMemory),
mbExpectId(false),
mbExpectStr(false),
mbFuzzy(false)
{
// Po files are handled special
mbLoadMode = true;
}
void convert_po::startLook()
{
string sFileName, sNewKey;
int i;
if (!msKey.size() || !msId.size())
return;
// split key into filename and real key
i = msKey.find("#");
sFileName = msKey.substr(0, i);
sNewKey = msKey.substr(i+1);
// load in db
if (msId.size())
mcMemory.loadEntryKey(miLineNo, sFileName, sNewKey, msId, msStr, "", "", "", mbFuzzy);
// and prepare for new entry
msKey.clear();
msId.clear();
msStr.clear();
}
void convert_po::setValue(char *syyText, int iLineCnt)
{
if (mbExpectId)
msId = syyText;
if (mbExpectStr)
msStr = syyText;
mbExpectId =
mbExpectStr = false;
miLineNo += iLineCnt;
}
void convert_po::setFuzzy()
{
mbFuzzy = true;
}
void convert_po::setKey(char *syyText)
{
int i;
// Activate "look for msg" mode.
startLook();
// skip "#:" and any blanks
for (syyText += 2; *syyText == ' ' || *syyText == '\t'; ++syyText)
msKey = syyText;
// remove trailing blanks
for (i = msKey.size() -1; msKey[i] == '\r' || msKey[i] == ' ' || msKey[i] == '\t'; --i)
msKey.erase(i+1);
}
void convert_po::setMsgId()
{
mbExpectId = true;
}
void convert_po::setMsgStr()
{
mbExpectStr = true;
}
void convert_po::handleNL()
{
++miLineNo;
}
void convert_po::doExecute()
{
if (mbMergeMode)
throw l10nMem::showError("Merge not implemented");
polex();
startLook();
}
void convert_po::startSave(const string& sName,
const string& sTargetDir,
const string& sFile)
{
string sFilePath;
string ext = sTargetDir.substr(sTargetDir.length() - 5, sTargetDir.length());
sFilePath = (ext == ".pot/") ? sTargetDir.substr(0, sTargetDir.length() - 1) : sTargetDir + sFile;
// create directories as needed
createDir(string(""), sFilePath);
mfOutBuffer.open(sFilePath.c_str(), ios::out | ios::binary);
if (!mfOutBuffer.is_open())
throw l10nMem::showError("Cannot open " + sFilePath + " for writing");
l10nMem::showDebug("writing file (" + sFilePath + ")");
ostream outFile(&mfOutBuffer);
// Set header
auto t = std::time(nullptr);
auto tm = *std::localtime(&t);
outFile << "#. extracted from " << sName << endl
<< "msgid \"\"" << endl
<< "msgstr \"\"" << endl
<< "\"Project-Id-Version: PACKAGE VERSION\\n\"" << endl
<< "\"Report-Msgid-Bugs-To: "
"https://bugs.libreoffice.org/enter_bug.cgi?"
"product=LibreOffice&bug_status=UNCONFIRMED"
"&component=UI\\n\"" << endl
<< "\"POT-Creation-Date: "
<< std::put_time(&tm, "%Y-%m-%d %H:%M%z") << "\\n\"" << endl
<< "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"" << endl
<< "\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"" << endl
<< "\"Language-Team: LANGUAGE <LL@li.org>\\n\"" << endl
<< "\"MIME-Version: 1.0\\n\"" << endl
<< "\"Content-Type: text/plain; charset=UTF-8\\n\"" << endl
<< "\"Content-Transfer-Encoding: 8bit\\n\"" << endl
<< "\"X-Generator: LibreOffice\\n\"" << endl
<< "\"X-Accelerator-Marker: ~\\n\"" << endl;
}
void convert_po::save(const string& sFileName,
const string& sKey,
const string& sENUStext,
const string& sText,
const string& sComment,
const string& sResource,
const string& sGroup,
bool bFuzzy)
{
string sName;
ostream outFile(&mfOutBuffer);
int newPos, oldPos;
// isolate filename
newPos = sFileName.find_last_of("/\\", sFileName.length());
sName = sFileName.substr(newPos + 1, sFileName.length());
outFile << endl << "#. " << genKeyId(sName + sKey + sGroup + sResource + sENUStext) << endl;
if (sComment.length())
outFile << "#. " << sComment << endl;
outFile << "#: " << sName << endl
<< "msgctxt \"\"" << endl
<< "\"" << sName << "\\n\"" << endl
<< "\"" << sKey << "\\n\"" << endl;
if (sGroup.length())
outFile << "\"" << sGroup << "\\n\"" << endl;
outFile << "\"" << sResource << ".text\"" << endl;
if (bFuzzy)
outFile << "#, fuzzy" << endl;
outFile << "msgid \"";
newPos = oldPos = 0;
while ((newPos = sENUStext.find("\\n", oldPos)) > 0) {
newPos += 2;
outFile << "\"" << endl
<< "\"" << sENUStext.substr(oldPos, newPos - oldPos);
oldPos = newPos;
}
if (oldPos)
outFile << "\"" << endl << "\"";
outFile << sENUStext.substr(oldPos) << "\"" << endl
<< "msgstr \"" << sText << "\"" << endl;
}
void convert_po::endSave()
{
mfOutBuffer.close();
}
string convert_po::genKeyId(const string& text)
{
string newText(text);
int i;
for (i = 0; (i = newText.find("\\\\", 0)) != (int)string::npos;) {
newText.erase(i, 1);
}
for (i = 0; (i = newText.find("\\\"", 0)) != (int)string::npos;) {
newText.erase(i, 1);
}
for (i = 0; (i = newText.find("\\n", 0)) != (int)string::npos;) {
newText.erase(i, 1);
newText[i] = 0x0A;
}
sal_uInt32 const nCRC = rtl_crc32(0, newText.c_str(), newText.length());
string key;
// Use simple ASCII characters, exclude I, l, 1 and O, 0 to avoid confusing IDs
static const char sSymbols[] =
"ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789";
for (short nKeyInd = 0; nKeyInd < 5; ++nKeyInd) {
key += sSymbols[(nCRC & 63) % strlen(sSymbols)];
nCRC >>= 6;
}
return key;
}
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvProp.hxx"
void convert_prop::doExecute()
{
// throw l10nMem::showError(string("convert_prop::execute not implemented"));
}
/* -*- 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 .
*/
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <sstream>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvSrc.hxx"
convert_src::convert_src(l10nMem& crMemory)
: convert_gen(crMemory),
miLevel(0),
mbMacroActive(false)
#if 0
mbExpectValue(false),
mbEnUs(false),
mbExpectName(false),
mbAutoPush(false),
mbValuePresent(false),
mbInList(false),
mbInListItem(false)
#endif
{
}
void convert_src::doExecute()
{
srclex();
}
void convert_src::setValue(string& syyText)
{
int stackSize = mcStack.size();
string cleanValue = syyText.substr(1, syyText.size() - 1);
{
cout << "test value\n";
for (int i = 0; i < stackSize; i++)
cout << i << ") " << mcStack[i] << "\n";
}
string subid = (stackSize > 3) ? mcStack[stackSize - 1] : "";
string stringid = mcStack[stackSize - 2];
l10nMem::keyToLower(stringid);
mcMemory.setSourceKey(miLineNo, msSourceFile, mcStack[1], cleanValue, "", stringid, subid, false);
}
bool convert_src::setLang(string& syyText)
{
if (syyText == "en-US")
return true;
else if (syyText != "x-comment")
l10nMem::showError(syyText + " non legal language");
return false;
}
void convert_src::setName(string& syyText, bool revertLevel)
{
if (revertLevel)
mcStack.pop_back();
mcStack.push_back(syyText);
}
void convert_src::setCmd(string& syyText)
{
mcStack.push_back(syyText);
}
void convert_src::startBlock()
{
unsigned int cnt = 2 * ++miLevel;
while (cnt > mcStack.size())
mcStack.push_back("");
}
void convert_src::stopBlock()
{
if (miLevel > 0)
miLevel--;
// check for correct node/prop relations
if (mcStack.size()) {
if (miLevel) {
mcStack.pop_back();
mcStack.pop_back();
}
else
mcStack.clear();
}
}
void convert_src::defMacro()
{
if (!miLevel)
miLevel++;
mbMacroActive = true;
}
void convert_src::endMacro()
{
if (mbMacroActive) {
mbMacroActive = false;
miLevel = 0;
mcStack.clear();
}
}
#if 0
void convert_src::setId(char *syyText, bool bId)
{
copySource(syyText);
if (bId || !mcStack.back().size())
mbExpectName = mbAutoPush = true;
}
#endif
#if 0
void convert_src::setText(char *syyText)
{
msTextName = copySource(syyText);
mbExpectValue = true;
mbEnUs = false;
trim(msTextName);
}
#endif
#if 0
void convert_src::setList(char *syyText)
{
msCmd = copySource(syyText);
miListCount = 0;
mbInList = true;
trim(msCmd);
l10nMem::keyToLower(msCmd);
}
#endif
#if 0
void convert_src::setNL(char *syyText, bool bMacro)
{
int nL;
string sKey;
copySource(syyText);
if (msTextName.size() && mbValuePresent && mbEnUs) {
// locate key and extract it
buildKey(sKey);
for (nL = -1;;) {
nL = msValue.find("\\\"", nL + 1);
if (nL == (int)string::npos)
break;
msValue.erase(nL, 1);
}
for (nL = -1;;) {
nL = msValue.find("\\\\", nL + 1);
if (nL == (int)string::npos)
break;
msValue.erase(nL, 1);
}
//FIX sKey += "." + msCmd + "." + msTextName;
if (msValue.size() && msValue != "-") {
mcMemory.setSourceKey(miLineNo, msSourceFile, sKey, msValue, "", msCmd, msGroup, mbMergeMode);
if (mbMergeMode)
insertLanguagePart(sKey, msTextName);
}
msGroup.clear();
}
if (!bMacro && mbExpectMacro) {
while ((int)mcStack.size() > miMacroLevel)
mcStack.pop_back();
mbEnUs =
mbExpectMacro = false;
}
mbValuePresent =
mbExpectName =
mbAutoPush = false;
msValue.clear();
msTextName.clear();
}
#endif
#if 0
void convert_src::setListItem(char const *syyText, bool bIsStart)
{
copySource(syyText);
if (bIsStart) {
if (!miListCount) {
mcStack.pop_back();
msName = "dummy";
mcStack.push_back(msName);
}
msTextName = "item";
mbExpectValue =
mbExpectName =
mbInListItem = true;
msName.clear();
}
else
{
if (mbInListItem) {
stringstream ssBuf;
string myKey;
++miListCount;
mcStack.pop_back();
if (mbExpectName) {
ssBuf << miListCount;
msName = "item" + ssBuf.str();
}
mcStack.push_back(msName);
mbInListItem =
mbExpectName = false;
// check key or add seq.
buildKey(myKey);
}
}
}
#endif
#if 0
void convert_src::trim(string& sText)
{
int nL;
while (sText[0] == ' ' || sText[0] == '\t')
sText.erase(0,1);
for (nL = sText.size(); sText[nL-1] == ' ' || sText[nL-1] == '\t'; --nL)
;
if (nL != (int)sText.size())
sText.erase(nL);
}
#endif
#if 0
void convert_src::buildKey(string& sKey)
{
int nL;
sKey.clear();
for (nL = 0; nL < (int)mcStack.size(); ++nL)
if (mcStack[nL].size())
sKey += (sKey.size() ? "." : "") + mcStack[nL];
// FIX jan
sKey = mcStack[0];
}
#endif
#if 0
void convert_src::insertLanguagePart(string& sKey, string& sTextType)
{
string sLang, sText, sTagText;
// just to please compiler
sKey = sKey;
// prepare to read all languages
mcMemory.prepareMerge();
for (; mcMemory.getMergeLang(sLang, sText);) {
// Prepare tag start and end
sTagText = sTextType + "[ " + sLang + " ] = \"" + sText + "\" ;" +
(mbExpectMacro ? "\\" : "") + "\n";
writeSourceFile(sTagText);
}
}
#endif
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvTree.hxx"
convert_tree::convert_tree(l10nMem& crMemory)
: convert_gen(crMemory),
mcOutputFiles(nullptr),
meStateTag(STATE_TAG_NONE),
meStateVal(STATE_VAL_NONE),
miCntLanguages(0)
{
// tree files are written through a local routine
mbLoadMode = true;
}
convert_tree::~convert_tree()
{
if (mcOutputFiles) {
for (int i = 0; i < miCntLanguages; ++i)
mcOutputFiles[i].close();
delete[] mcOutputFiles;
}
}
void convert_tree::doExecute()
{
string sLang;
string sFile, sFile2;
if (mbMergeMode)
throw l10nMem::showError("Merge not implemented");
// prepare list with languages
if (mbMergeMode) {
miCntLanguages = mcMemory.prepareMerge();
mcOutputFiles = new ofstream[miCntLanguages];
for (int i = 0; mcMemory.getMergeLang(sLang, sFile); ++i) {
sFile2 = sLang + "/" + msSourceFile;
sFile = msTargetPath + sFile2;
mcOutputFiles[i].open(sFile.c_str(), ios::binary);
if (!mcOutputFiles[i].is_open()) {
if (!createDir(msTargetPath, sFile2))
throw l10nMem::showError("Cannot create missing directories (" + sFile + ") for writing");
mcOutputFiles[i].open(sFile.c_str(), ios::binary);
if (!mcOutputFiles[i].is_open())
throw l10nMem::showError("Cannot open file (" + sFile + ") for writing");
}
}
}
// run analyzer
treelex();
// dump last line
copySourceSpecial(nullptr,3);
}
void convert_tree::setString(char *yytext)
{
switch (meStateVal) {
case STATE_VAL_NONE:
copySourceSpecial(yytext, 0);
break;
case STATE_VAL_APPL:
msAppl = copySourceSpecial(yytext, 0);
break;
case STATE_VAL_ID:
msId = copySourceSpecial(yytext, 0);
msId.erase(msId.size()-1);
break;
case STATE_VAL_TITLE:
string sText = copySourceSpecial(yytext, 1);
sText.erase(sText.size()-1);
mcMemory.setSourceKey(miLineNo, msSourceFile, msId, sText, "", "help_section", "", mbMergeMode);
break;
}
meStateVal = STATE_VAL_NONE;
}
void convert_tree::setState(char *yytext, STATE_TAG eNewStateTag, STATE_VAL eNewStateVAL, char *sModule)
{
copySourceSpecial(yytext, 0);
msCollector.clear();
meStateTag = eNewStateTag;
meStateVal = eNewStateVAL;
if (sModule)
msModule = sModule;
}
void convert_tree::setValue(char *yytext)
{
mcMemory.setSourceKey(miLineNo, msSourceFile, msId, msCollector, "", msModule, "", mbMergeMode);
copySourceSpecial(yytext, 2);
meStateTag = STATE_TAG_NONE;
meStateVal = STATE_VAL_NONE;
}
string& convert_tree::copySourceSpecial(char *yytext, int iType)
{
string& sText = copySource(yytext, false);
string sLang, sTemp;
int i;
// Handling depends on iType
switch (iType) {
case 0: // Used for tokens that are to be copied 1-1,
if (mbMergeMode) {
msLine += yytext;
if (*yytext == '\n') {
for (i = 0; i < miCntLanguages; ++i)
writeSourceFile(msLine, i);
msLine.clear();
}
}
break;
case 1: // Used for title token, are to replaced with languages
if (mbMergeMode) {
mcMemory.prepareMerge();
for (i = 0; i < miCntLanguages; ++i) {
writeSourceFile(msLine, i);
mcMemory.getMergeLang(sLang, sTemp);
writeSourceFile(sTemp,i);
}
msLine.clear();
}
break;
case 2: // Used for token at end of value, language text are to be inserted and then token written
if (mbMergeMode) {
mcMemory.prepareMerge();
for (i = 0; i < miCntLanguages; ++i) {
writeSourceFile(msLine, i);
mcMemory.getMergeLang(sLang, sTemp);
writeSourceFile(sTemp,i);
string sYY(yytext);
writeSourceFile(sYY, i);
}
msLine.clear();
}
break;
case 3: // Used for EOF
if (mbMergeMode) {
for (i = 0; i < miCntLanguages; ++i)
writeSourceFile(msLine, i);
}
break;
}
return sText;
}
void convert_tree::writeSourceFile(string& sText, int inx)
{
if (sText.size() && mcOutputFiles[inx].is_open())
mcOutputFiles[inx].write(sText.c_str(), sText.size());
}
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvUi.hxx"
convert_ui::convert_ui(l10nMem& crMemory)
: convert_gen(crMemory)
{
}
void convert_ui::doExecute()
{
uilex();
}
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvUlf.hxx"
void convert_ulf::doExecute()
{
ulflex();
}
void convert_ulf::setKey(char *syyText)
{
string sText = copySource(syyText);
// locate key (is any)
msKey = sText.substr(1,sText.size()-2);
}
void convert_ulf::setText(char *syyText, bool bIsEnUs)
{
string sText = copySource(syyText);
if (!bIsEnUs && sText != "x-comment =")
l10nMem::showError(sText + " is not en-US");
}
void convert_ulf::setValue(char *syyText)
{
string sLang, sText = copySource(syyText);
int nL;
sText.erase(0,1);
nL = sText.rfind("\"");
sText.erase(nL);
mcMemory.setSourceKey(miLineNo, msSourceFile, msKey, sText, "", "LngText", "", mbMergeMode);
if (mbMergeMode) {
// prepare to read all languages
mcMemory.prepareMerge();
for (; mcMemory.getMergeLang(sLang, sText);) {
// Prepare tag
sText = "\n" + sLang + " = \"" + sText + "\"";
writeSourceFile(sText);
}
}
}
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvXcs.hxx"
convert_xcs::convert_xcs(l10nMem& crMemory)
: convert_gen(crMemory),
mbCollectingData(false)
{
}
void convert_xcs::doExecute()
{
if (mbMergeMode)
throw l10nMem::showError("Merge not implemented");
// currently no .xcs files generate en-US translation, so stop trying
xcslex();
}
void convert_xcs::setKey(char *syyText)
{
int nL;
string sHead, sText = copySource(syyText);
// is it to be translated
if (sText.find("oor:localized=") == string::npos)
return;
// locate key (is any)
nL = sText.find("oor:name=\"");
if (nL == (int)string::npos)
return;
sHead = sText.substr(nL+10);
nL = sHead.find("\"");
msKey = sHead.substr(0,nL);
}
void convert_xcs::unsetKey(char *syyText)
{
copySource(syyText);
}
void convert_xcs::startCollectData(char *syyText)
{
copySource(syyText);
if (!msKey.size())
return;
}
void convert_xcs::stopCollectData(char *syyText)
{
string sHead, sKey, sLang, sText, sCollectedText = copySource(syyText, false);
int nL;
// get type of tag
msCollector += sCollectedText;
nL = msCollector.find("<p");
if (nL != (int)string::npos)
sHead = msCollector.substr(nL+1, 1);
else {
nL = msCollector.find("<h");
sHead = msCollector.substr(nL+1, 2);
}
// locate key and extract it
nL = msCollector.find("id=") +4;
sKey = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
nL = msCollector.find("xml:lang=\"") + 10;
sLang = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
nL = msCollector.find(">") +1;
sText = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
msCollector.clear();
if (mbMergeMode) {
#if 0
// get all languages (includes en-US)
vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
string sNewLine;
nL = cExtraLangauges.size();
for (int i = 0; i < nL; ++i) {
sNewLine = "\n<" + sHead + " id=\"" + sKey + "\"" + " xml:lang=\"" +
cExtraLangauges[i]->msLanguage + "\">" +
cExtraLangauges[i]->msText +
"</" + sHead + ">";
writeSourceFile(sNewLine);
}
#endif
}
mcMemory.setSourceKey(miLineNo, msSourceFile, sKey, sText, "", "", "", mbMergeMode);
mbCollectingData = false;
}
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvXcu.hxx"
convert_xcu::convert_xcu(l10nMem& crMemory)
: convert_gen(crMemory),
mbNoCollectingData(true),
miLevel(0),
mbNoTranslate(false)
{
}
void convert_xcu::doExecute()
{
xculex();
}
void convert_xcu::pushKey(char *syyText)
{
string sKey, sTag = copySource(syyText);
// find key in tag
int nL = sTag.find("oor:name=\"");
if (nL != (int)string::npos) {
// find end of key
nL += 10;
int nE = sTag.find("\"", nL);
if (nE != (int)string::npos)
sKey = sTag.substr(nL, nE - nL);
}
mcStack.push_back(sKey);
}
void convert_xcu::popKey(char *syyText)
{
copySource(syyText);
// check for correct node/prop relations
if (mcStack.size())
mcStack.pop_back();
mbNoTranslate = false;
}
void convert_xcu::startCollectData(char *syyText)
{
int nL;
string sTag = copySource(syyText);
if (mbNoTranslate)
return;
// locate object name
nL = sTag.find("xml:lang=\"");
if (nL != (int)string::npos) {
// test language
nL += 10;
if (sTag.substr(nL,5) == "en-US")
mbNoCollectingData = false;
else if (sTag.substr(nL,14) == "x-no-translate")
mbNoTranslate = true;
else {
string sErr = sTag.substr(nL,5) + " is not en-US";
l10nMem::showError(sErr);
}
}
}
void convert_xcu::stopCollectData(char *syyText)
{
int nL;
string useKey, useText = msCollector;
copySource(syyText);
// time to do something ?
if (mbNoCollectingData || mbNoTranslate)
return;
// remove any newline
for (nL = 0;;) {
nL = useText.find("\n");
if (nL == (int)string::npos)
break;
useText.erase(nL,1);
}
mbNoCollectingData = true;
if (useText.size()) {
// locate key and extract it
int max = (int)mcStack.size() - 1;
for (nL = 0; nL < max; ++nL) {
useKey += mcStack[nL];
if (nL < max -1)
useKey += ".";
}
mcMemory.setSourceKey(miLineNo, msSourceFile, useKey, useText, "", "value", mcStack[nL], mbMergeMode);
}
if (mbMergeMode) {
string sLang, sText, sNewLine;
// prepare to read all languages
mcMemory.prepareMerge();
for (; mcMemory.getMergeLang(sLang, sText);) {
sNewLine = "\n<value xml:lang=\"" + sLang + "\">" + sText + "</value>";
mcMemory.convertToInetString(sNewLine);
writeSourceFile(sNewLine);
}
}
}
void convert_xcu::copySpecial(char *syyText)
{
int nx = msCollector.size();
string sText = copySource(syyText, mbNoCollectingData);
if (!mbNoCollectingData) {
msCollector.erase(nx);
mcMemory.convertFromInetString(sText);
msCollector += sText;
}
}
void convert_xcu::copyNL(char *syyText)
{
int nX = msCollector.size();
string sText = copySource(syyText, mbNoCollectingData);
if (!mbNoCollectingData) {
msCollector.erase(nX);
msCollector += ' ';
}
}
void convert_xcu::addLevel()
{
++miLevel;
}
This diff is collapsed.
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvXml.hxx"
convert_xml::convert_xml(l10nMem& crMemory)
: convert_gen(crMemory)
{
}
void convert_xml::doExecute()
{
xmllex();
}
/* -*- 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 .
*/
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvXrm.hxx"
convert_xrm::convert_xrm(l10nMem& crMemory)
: convert_gen(crMemory),
mbNoCollectingData(true),
mbIsTag(false),
mbIsLang(false)
{
}
void convert_xrm::doExecute()
{
xrmlex();
// write last part of file.
if (mbMergeMode)
writeSourceFile(msCollector);
}
void convert_xrm::setId(char *yytext)
{
string& sText = copySource(yytext, mbNoCollectingData);
if (mbIsTag) {
int nL = sText.find("\"");
int nE = sText.find("\"", nL+1);
if (nL == (int)string::npos || nE == (int)string::npos)
return;
msKey = sText.substr(nL+1, nE - nL -1);
}
}
void convert_xrm::setLang(char *yytext)
{
string& sText = copySource(yytext, mbNoCollectingData);
if (mbIsTag) {
int nL = sText.find("\"");
int nE = sText.find("\"", nL+1);
if (nL == (int)string::npos || nE == (int)string::npos)
return;
string sLang = sText.substr(nL+1, nE - nL -1);
if (sLang == "en-US")
mbIsLang = true;
else
l10nMem::showError(sLang + " is no en-US language");
}
}
void convert_xrm::setTag(char *yytext)
{
msTag = copySource(yytext);
msKey.clear();
mbIsLang = false;
mbIsTag = true;
}
void convert_xrm::startCollectData(char *yytext)
{
copySource(yytext, mbNoCollectingData);
if (mbIsTag && mbIsLang && msKey.size())
mbNoCollectingData = false;
mbIsTag = mbIsLang = false;
}
void convert_xrm::stopCollectData(char *yytext)
{
string sTagText, sTagEnd, sLang, sText = msCollector;
copySource(yytext);
if (!mbNoCollectingData) {
mcMemory.setSourceKey(miLineNo, msSourceFile, msKey, sText, "", "readmeitem", "", mbMergeMode);
mbNoCollectingData = true;
if (mbMergeMode) {
sTagEnd = "</" + msTag.substr(1,msTag.size()-2) + ">\n";
msTag += "id=\"" + msKey + "\" xml:lang=\"";
// prepare to read all languages
mcMemory.prepareMerge();
for (; mcMemory.getMergeLang(sLang, sText);) {
// replace \" with "
for (int i = 0; (i = sText.find("\\\"", i)) != (int)string::npos;)
sText.erase(i,1);
// Prepare tag start and end
sTagText = msTag + sLang + "\">" + sText + sTagEnd;
writeSourceFile(sTagText);
}
}
msKey.clear();
}
mbIsTag = false;
}
#!/bin/bash
cd workdir/pot
find . > /tmp/jix1
cd ../jan
find . > /tmp/jix2
echo ">>>>> FILELIST DIFF >>>"
diff /tmp/jix1 /tmp/jix2
for i in `find . -name \*.pot`
do
CMD=$(diff ../pot/$i $i | sed '/^6c6$/,/^16c16$/d')
if [ "$CMD" != "" ]
then
echo ">>>>>>>> " $i
echo "$CMD"
fi
done
This diff is collapsed.
This diff is collapsed.
/* -*- 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 .
*/
%top{
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvPo.hxx"
#define LOCptr ((convert_po *)convert_gen::mcImpl)
#define YYLMAX 64000
#define YY_INPUT(buf,result,max_size) LOCptr->lexRead(buf, &result, max_size)
#define YY_NO_UNISTD_H 1
#define yytext_ptr potext_ptr
#define yy_flex_strncpy convert_gen::lexStrncpy
}
%option prefix="po" 8bit noyywrap never-interactive
%array
%p 24000
%e 1200
%n 500
SPACE [ \t]*
%%
"\"" {
char c, buildValue[8000];
int j, i, iLineCnt;
// loop across multiple "..." and combine them, while keeping the source
for (j = -1, iLineCnt = i = 0; (c = yytext[i]) == '\"';) {
// build current "..."
for (; (buildValue[++j] = yytext[++i] = c = yyinput()) != '\"';)
if (yytext[i] == '\\')
buildValue[++j] = yytext[++i] = yyinput();
--j;
if (!LOCptr->mbExpectId && !LOCptr->mbExpectStr)
break;
// skip rest of line
for (; (c = yytext[++i] = yyinput()) == ' ' || yytext[i] == '\t' || yytext[i] == '\n';)
if (yytext[i] == '\n')
++iLineCnt;
}
if (LOCptr->mbExpectId || LOCptr->mbExpectStr) {
if (yytext[i] != EOF) {
unput(yytext[i]);
}
buildValue[j+1] = '\0';
LOCptr->setValue(buildValue, iLineCnt);
}
}
"#,"{SPACE}.*[fF][uU][zZ][zZ][yY] {
LOCptr->setFuzzy();
}
"#:".* {
LOCptr->setKey(yytext);
}
[mM][sS][gG][cC][tT][xX][tT].* |
"#*".* |
"# ".* |
"#~".* {
// special comment, just skip
}
[mM][sS][gG][iI][dD]{SPACE} {
LOCptr->setMsgId();
}
[mM][sS][gG][sS][tT][rR]{SPACE} {
LOCptr->setMsgStr();
}
\n {
LOCptr->handleNL();
// Just to please compiler.
if (false)
REJECT;
}
.|\n {
}
%%
void dummyJustForCompiler()
{
char *txt = NULL;
// yy_flex_strlen(txt);
yyunput(0, txt);
}
This diff is collapsed.
/* -*- 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 .
*/
%top{
#include <string>
#include <vector>
using namespace std;
#include "gL10nMem.hxx"
#include "gConvTree.hxx"
#define LOCptr ((convert_tree *)convert_gen::mcImpl)
#define YYLMAX 64000
#define YY_INPUT(buf,result,max_size) LOCptr->lexRead(buf, &result, max_size)
#define YY_NO_UNISTD_H 1
#define yytext_ptr treetext_ptr
#define yy_flex_strncpy convert_gen::lexStrncpy
}
%option prefix="tree" 8bit noyywrap never-interactive
%array
%p 24000
%e 1200
%n 500
SP [ \t]*
IDENT [\.a-zA-Z0-9_-]+
%%
"\"" {
int j;
// build current "..."
for (j = -1; (yytext[++j] = yyinput()) != '\"';)
if (yytext[j] == '\\')
yytext[++j] = yyinput();
yytext[j+1] = '\0';
LOCptr->setString(yytext);
}
\> {
LOCptr->setState(yytext, convert_tree::STATE_TAG_VALUE, convert_tree::STATE_VAL_NONE, NULL);
}
"id=" {
LOCptr->setState(yytext, convert_tree::STATE_TAG_NONE, convert_tree::STATE_VAL_ID, NULL);
}
"application=" {
LOCptr->setState(yytext, convert_tree::STATE_TAG_NONE, convert_tree::STATE_VAL_APPL, NULL);
}
"title=" {
LOCptr->setState(yytext, convert_tree::STATE_TAG_NONE, convert_tree::STATE_VAL_TITLE, NULL);
}
"<help_section " {
LOCptr->setState(yytext, convert_tree::STATE_TAG_HELPSEC, convert_tree::STATE_VAL_NONE, "help_section");
}
"<node " {
LOCptr->setState(yytext, convert_tree::STATE_TAG_NODE, convert_tree::STATE_VAL_NONE, "node");
}
"<topic " {
//NOT NOW LOCptr->setState(yytext, convert_tree::STATE_TAG_TOPIC, convert_tree::STATE_VAL_NONE, NULL);
}
"</topic" {
// NOT NOW LOCptr->setValue(yytext);
}
.|\n {
LOCptr->copySourceSpecial(yytext, 0);
// Just to please compiler.
if (false)
REJECT;
}
%%
void tree_dummyJustForCompiler()
{
yyunput(0, NULL);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
S=C:/Users/jani/opensource/libreoffice/lode/dev/work
I=$S/instdir
W=$S/workdir
PATH="C:\Users\jani\opensource\libreoffice\lode\dev\work\instdir\program;C:\Users\jani\opensource\libreoffice\lode\dev\work\instdir\program;$PATH"
./workdir/LinkTarget/Executable/xrmex.exe -i readlicense_oo/docs/readme.xrm -o workdir/jan2/docs
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment