Added: openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.cxx?rev=1505522&view=auto
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.cxx (added)
+++ openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.cxx Sun Jul 21
23:45:23 2013
@@ -0,0 +1,481 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#include "gL10nMem.hxx"
+//#include <algorithm>
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+
+
+/*****************************************************************************
+ ************************ G L 1 0 N M E M . C X X ************************
+ *****************************************************************************
+ * This is the interface to translation memory that links between the converts
+ * and to the language files. The memory contains the actual text info
+
***********************d******************************************************/
+
+
+
+/******************* G L O B A L D E F I N I T I O N *******************/
+l10nMem_impl * l10nMem_impl::mcImpl = NULL;
+bool l10nMem_impl::mbVerbose = false;
+bool l10nMem_impl::mbDebug = false;
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem::l10nMem()
+{
+ l10nMem_impl::mcImpl = new l10nMem_impl();
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem::~l10nMem()
+{
+ delete l10nMem_impl::mcImpl;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem::setShowVerbose()
+{
+ l10nMem_impl::mbVerbose = true;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem::setShowDebug()
+{
+ l10nMem_impl::mbDebug = true;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+int l10nMem::showError(const std::string& sText, int iLineNo)
+ { return l10nMem_impl::mcImpl->showError(sText, iLineNo); }
+int l10nMem::showWarning(const std::string& sText, int iLineNo)
+ { return l10nMem_impl::mcImpl->showWarning(sText, iLineNo); }
+void l10nMem::showDebug(const std::string& sText, int iLineNo)
+ { l10nMem_impl::mcImpl->showDebug(sText, iLineNo); }
+void l10nMem::showVerbose(const std::string& sText, int iLineNo)
+ { l10nMem_impl::mcImpl->showVerbose(sText, iLineNo); }
+bool l10nMem::isError()
+ { return l10nMem_impl::mcImpl->mbInError; }
+void l10nMem::setModuleName(const std::string& sM)
+ { l10nMem_impl::mcImpl->setModuleName(sM); }
+void l10nMem::setLanguage(const std::string& sL, bool bC, bool bK)
+ { l10nMem_impl::mcImpl->mcDb.setLanguage(sL, bC, bK); }
+void l10nMem::loadEntryKey(int iL, const std::string& sS, const std::string&
sK, const std::string& sO, const std::string& sT, bool bI)
+ { l10nMem_impl::mcImpl->loadEntryKey(iL, sS, sK, sO, sT, bI); }
+void l10nMem::setSourceKey(int iL, const std::string& sF, const std::string&
sK, const std::string& sT)
+ { l10nMem_impl::mcImpl->setSourceKey(iL, sF, sK, sT); }
+void l10nMem::save(const std::string& sT, bool bK, bool bF)
+ { l10nMem_impl::mcImpl->save(*this, sT, bK, bF); }
+int l10nMem::prepareMerge()
+ { return l10nMem_impl::mcImpl->mcDb.prepareMerge(); }
+void l10nMem::dumpMem(const std::string& sT)
+ { l10nMem_impl::mcImpl->dumpMem(sT); }
+bool l10nMem::getMergeLang(std::string& sL, std::string& sT)
+ { return l10nMem_impl::mcImpl->mcDb.getMergeLang(sL, sT); }
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_impl::l10nMem_impl()
+ :
+ mbInError(false)
+{
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_impl::~l10nMem_impl()
+{
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+int l10nMem_impl::showError(const std::string& sText, int iLineNo)
+{
+ mbInError = true;
+ formatAndShowText("ERROR", iLineNo, sText);
+ return 1;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+int l10nMem_impl::showWarning(const std::string& sText, int iLineNo)
+{
+ formatAndShowText("WARNING", iLineNo, sText);
+ return 2;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::showDebug(const std::string& sText, int iLineNo)
+{
+ if (mbDebug)
+ formatAndShowText("DEBUG", iLineNo, sText);
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::showVerbose(const std::string& sText, int iLineNo)
+{
+ if (mbVerbose)
+ formatAndShowText("INFO", iLineNo, sText);
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::setModuleName(const std::string& sModuleName)
+{
+ msModuleName = sModuleName;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::loadEntryKey(int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText,
+ const std::string& sText,
+ bool bIsFuzzy)
+{
+ if (!mcDb.miCurLangInx)
+ mcDb.loadENUSkey(iLineNo, sSourceFile, sKey, sText);
+ else if (mcDb.mbConvertMode)
+ convEntryKey(iLineNo, sSourceFile, sKey, sOrgText, sText, bIsFuzzy);
+ else
+ mcDb.loadLangKey(iLineNo, sSourceFile, sKey, sOrgText, sText, bIsFuzzy);
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::setSourceKey(int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sText)
+{
+ std::string newText(sText);
+ int i;
+
+
+ // time to escape " and \ if contained in text or key
+ for (i = 0; (i = newText.find("\\", i)) != (int)std::string::npos;)
+ {
+ ++i;
+ if (i < (int)newText.size() && (newText[i] == '<' || newText[i] == '>'))
+ ++i;
+ else
+ {
+ newText.insert(i-1, "\\");
+ ++i;
+ }
+ }
+ for (i = 0; (i = newText.find("\"", i)) != (int)std::string::npos;)
+ {
+ newText.insert(i, "\\");
+ i += 2;
+ }
+
+ // if key exist update state
+ if (mcDb.locateKey(iLineNo, sSourceFile, sKey, newText, false))
+ {
+ mcDb.mcENUSlist[mcDb.miCurENUSinx].meState = l10nMem::ENTRY_NORMAL;
+ }
+ else
+ {
+ // add key, if changed text, this is wrong but handled in reorganize
+ mcDb.addKey(iLineNo, sSourceFile, sKey, newText, l10nMem::ENTRY_ADDED);
+ }
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::save(l10nMem& cMem, const std::string& sTargetDir, bool
bKid, bool bForce)
+{
+ int iE, iEsize = mcDb.mcENUSlist.size();
+ int iL, iLsize = mcDb.mcLangList.size();
+ int iCntDeleted = 0, iCntChanged = 0, iCntAdded = 0;
+ std::string sFileName = msModuleName + ".po";
+
+ // and reorganize db if needed
+ mcDb.reorganize();
+
+ // no save if there has been errors
+ if(!needWrite(sFileName, bForce))
+ return;
+
+ //JIX save HANDLE KID
+
+ // Save en-US
+ {
+ convert_gen savePo(cMem, sTargetDir, sTargetDir, sFileName);
+
+ savePo.startSave("en-US", sFileName);
+ for (iE = 1; iE < iEsize; ++iE)
+ {
+ l10nMem_enus_entry& cE = mcDb.mcENUSlist[iE];
+
+ // remove deleted entries
+ if (cE.meState == l10nMem::ENTRY_DELETED)
+ continue;
+
+ savePo.save(mcDb.mcFileList[cE.miFileInx].msFileName, cE.msKey,
cE.msText, cE.msText, false);
+ }
+ savePo.endSave();
+ }
+
+ // save all languages
+ for (iL = 1; iL < iLsize; ++iL)
+ {
+ convert_gen savePo(cMem, sTargetDir, sTargetDir, sFileName);
+
+ savePo.startSave(mcDb.mcLangList[iL], sFileName);
+ for (iE = 1; iE < iEsize; ++iE)
+ {
+ l10nMem_enus_entry& cE = mcDb.mcENUSlist[iE];
+ l10nMem_lang_entry& cL = cE.mcLangText[iL];
+ bool bF = cL.mbFuzzy;
+
+ // remove deleted entries
+ if (cE.meState == l10nMem::ENTRY_DELETED)
+ continue;
+
+ savePo.save(mcDb.mcFileList[cE.miFileInx].msFileName, cE.msKey,
cE.msText, cL.msText, bF);
+ }
+ savePo.endSave();
+ }
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::dumpMem(const std::string& sFileName)
+{
+ // and reorganize db if needed
+ mcDb.reorganize();
+
+ // no save if there has been errors
+ if(!needWrite(sFileName, true))
+ return;
+
+ // JIX (dumpMem)
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::formatAndShowText(const std::string& sType, int iLineNo,
const std::string& sText)
+{
+ std::string& cFile = mcDb.mcFileList[mcDb.miCurFileInx].msFileName;
+
+ std::cerr << sType;
+ if (mcDb.miCurFileInx > 0)
+ std::cerr << " in " << mcDb.mcFileList[mcDb.miCurFileInx].msFileName;
+ if (iLineNo)
+ std::cerr << "(" << iLineNo << ")";
+ std::cerr << ": " << sText << std::endl;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+bool l10nMem_impl::needWrite(const std::string sFileName, bool bForce)
+{
+ int iE, iEsize = mcDb.mcENUSlist.size();
+ int iCntDeleted = 0, iCntChanged = 0, iCntAdded = 0;
+
+ // no save if there has been errors
+ if (mbInError)
+ throw l10nMem::showError("Cannot save due to previous errors");
+
+ // Check number of changes
+ for (iE = 1; iE < iEsize; ++iE)
+ {
+ l10nMem_enus_entry& cur = mcDb.mcENUSlist[iE];
+ if (cur.meState == l10nMem::ENTRY_ADDED)
+ ++iCntAdded;
+ if (cur.meState == l10nMem::ENTRY_CHANGED)
+ {
+ ++iCntChanged;
+ if (mcDb.mbConvertMode)
+ cur.meState = l10nMem::ENTRY_NORMAL;
+ }
+ if (cur.meState == l10nMem::ENTRY_DELETED)
+ ++iCntDeleted;
+ }
+ if (!mcDb.mbConvertMode)
+ iCntDeleted -= iCntChanged;
+ if (!iCntAdded && !iCntChanged && !iCntDeleted)
+ {
+ std::cout << "genLang: No changes in " << sFileName;
+ if (bForce)
+ std::cout << ", -o switch used, so files are saved" << std::endl;
+ else
+ std::cout << " skipping \"save\"" << std::endl;
+ return bForce;
+ }
+
+ std::cout << "genLang statistics: " << iCntDeleted << " deleted, "
+ << iCntChanged << " changed, "
+ << iCntAdded << " added entries in "
+ << sFileName << std::endl;
+ return true;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+bool l10nMem_impl::convFilterWarning(const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText)
+{
+ if (sOrgText == "-")
+ return true;
+
+ if (msModuleName == "basic")
+ {
+ if (sSourceFile == "basic.src" ||
+ sSourceFile == "basmsg.src" ||
+ sSourceFile == "svtmsg.src" ||
+ sSourceFile == "testtool.src" ||
+ sSourceFile == "ttmsg.src" )
+ return true;
+ }
+
+ return false;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_impl::convEntryKey(int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText,
+ const std::string& sText,
+ bool bIsFuzzy)
+{
+ std::vector<int> ivEntryList;
+ std::string sKeyUpper;
+ int i, iSize, iCandidate;
+
+
+ // filter out dummy messages, silently
+ if (!sText.size() || convFilterWarning(sSourceFile, sKey, sOrgText))
+ return;
+
+ // make copy of key in upper case
+ iSize = sKey.size();
+ sKeyUpper = sKey;
+ for (i = 0; i < iSize; ++i)
+ sKeyUpper[i] = toupper(sKeyUpper[i]);
+
+ // Find all matching file names
+ iSize = mcDb.mcFileList.size();
+ for (i = 1; i < iSize; ++i)
+ if (sSourceFile == mcDb.mcFileList[i].msPureName)
+ {
+ int j = mcDb.mcFileList[i].miStart;
+ int iEnd = mcDb.mcFileList[i].miEnd;
+
+ for (; j <= iEnd; ++j)
+ ivEntryList.push_back(j);
+ }
+
+ // Did we find one or more files ?
+ iSize = ivEntryList.size();
+ if (!iSize)
+ {
+ showWarning("file(" + sSourceFile + ") key(" + sKey + ") lang(" +
mcDb.mcLangList[mcDb.miCurLangInx] +
+ ") with msgId(" + sOrgText + ") file not found", iLineNo);
+ return;
+ }
+
+ // Loop through all potential en-US entries
+ for (iCandidate = -1, i = 0; i < iSize; ++i)
+ {
+ l10nMem_enus_entry& curE = mcDb.mcENUSlist[ivEntryList[i]];
+
+ // The entry cannot be converted twice
+ if (curE.meState != l10nMem::ENTRY_NORMAL)
+ continue;
+
+ // The msgId must match
+ if (sOrgText == curE.msText)
+ break;
+
+ // compare keys, but be aware of different length
+ if (sKeyUpper.find(curE.msUpperKey) != std::string::npos)
+ {
+ // is this the second (or more candidate ? then we cannot use key
+ if (iCandidate > 0)
+ iCandidate = -1;
+ else
+ iCandidate = i;
+ }
+ }
+ sKeyUpper.clear();
+ if (i == iSize && iCandidate < 0)
+ sKeyUpper = "cannot be matched";
+ else
+ {
+ // Primarely use text match, alternatively use key candidate
+ if (i == iSize)
+ {
+ i = iCandidate;
+ sKeyUpper = "could only be matched through KEY";
+ }
+
+ // update language text
+ l10nMem_enus_entry& curE = mcDb.mcENUSlist[ivEntryList[i]];
+ l10nMem_lang_entry& curL = curE.mcLangText[mcDb.miCurLangInx];
+
+ if (sText != curL.msText)
+ {
+ curL.msText = sText;
+ curL.mbFuzzy = bIsFuzzy;
+ curE.meState = l10nMem::ENTRY_CHANGED;
+ }
+ if (sKeyUpper.size())
+ {
+ showWarning("file(" + sSourceFile + ") key(" + sKey + ") lang(" +
mcDb.mcLangList[mcDb.miCurLangInx] +
+ ") with msgId(" + sOrgText + ") " + sKeyUpper, iLineNo);
+ }
+ }
+}
Propchange: openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.hxx?rev=1505522&view=auto
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.hxx (added)
+++ openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.hxx Sun Jul 21
23:45:23 2013
@@ -0,0 +1,193 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#ifndef GL10NMEM_HXX
+#define GL10NMEM_HXX
+#include "gLang.hxx"
+
+
+
+/*****************************************************************************
+ ************************ G L 1 0 N M E M . H X X ************************
+ *****************************************************************************
+ * This is the class definition header of the l10n localizer program,
+ * all global classes and their interrelations is defined here
+ *****************************************************************************/
+
+
+
+/******************** C L A S S D E F I N I T I O N ********************/
+class l10nMem_lang_entry
+{
+ public:
+ l10nMem_lang_entry(const std::string& sText, bool bFuzzy);
+ ~l10nMem_lang_entry();
+
+ std::string msText; // translated text from po file
+ bool mbFuzzy; // fuzzy flag
+};
+
+
+
+/******************** C L A S S D E F I N I T I O N ********************/
+class l10nMem_enus_entry
+{
+ public:
+ l10nMem_enus_entry(const std::string& sKey,
+ const std::string& sText,
+ int iLineNo,
+ int iFileInx,
+ int iLangSize,
+ l10nMem::ENTRY_STATE eState);
+ ~l10nMem_enus_entry();
+
+ std::string msKey; // key in po file and source
file
+ std::string msUpperKey; // key converted to uppercase
(for compare)
+ std::string msText; // en-US text from source file
+ l10nMem::ENTRY_STATE meState; // status information
+ int miFileInx; // index of file name
+ int miLineNo; // line number
+ std::vector<l10nMem_lang_entry> mcLangText; // language texts (index is
languageId)
+};
+
+
+
+/******************** C L A S S D E F I N I T I O N ********************/
+class l10nMem_file_entry
+{
+ public:
+ l10nMem_file_entry(const std::string& sFileName, int iStart);
+ ~l10nMem_file_entry();
+
+ std::string msFileName; // file Name with relative path
+ std::string msPureName; // just filename
+ int miStart; // start index of entries in mcMasterEntries
(l10Mem_db::mcENUS)
+ int miEnd; // last index of entries in mcMasterEntries
(l10Mem_db::mcENUS)
+};
+
+
+
+/******************** C L A S S D E F I N I T I O N ********************/
+class l10nMem_db
+{
+ public:
+ l10nMem_db();
+ ~l10nMem_db();
+
+ int miCurFileInx;
+ int miCurLangInx;
+ int miCurENUSinx;
+ bool mbNeedWrite;
+ bool mbConvertMode;
+ std::vector<l10nMem_enus_entry> mcENUSlist;
+ std::vector<l10nMem_file_entry> mcFileList;
+ std::vector<std::string> mcLangList;
+
+
+ void loadENUSkey (int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sText);
+ void setLanguage (const std::string& sLanguage,
+ bool bCreate,
+ bool bConvert);
+ bool findFileName (const std::string& sSourceFile);
+ void loadLangKey (int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText,
+ const std::string& sText,
+ bool bFuzzy);
+
+
+ bool locateKey (int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sText,
+ bool bThrow);
+ void reorganize ();
+ void addKey (int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sText,
+ l10nMem::ENTRY_STATE eStat);
+
+ int prepareMerge ();
+ bool getMergeLang (std::string& sLang,
+ std::string& sText);
+ bool getLangList (std::string& sLang);
+};
+
+
+
+
+/******************** C L A S S D E F I N I T I O N ********************/
+class l10nMem_impl
+{
+ public:
+ l10nMem_impl();
+ ~l10nMem_impl();
+
+ int showError (const std::string& sText, int iLineNo);
+ int showWarning (const std::string& sText, int iLineNo);
+ void showDebug (const std::string& sText, int iLineNo);
+ void showVerbose (const std::string& sText, int iLineNo);
+
+ void setModuleName (const std::string& sModuleName);
+ void loadEntryKey (int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText,
+ const std::string& sText,
+ bool bIsFuzzy);
+ void setSourceKey (int iLineNo,
+ const std::string& sFilename,
+ const std::string& sKey,
+ const std::string& sText);
+
+ void save (l10nMem& cMem,
+ const std::string& sTargetDir,
+ bool bKid,
+ bool bForce);
+ void dumpMem (const std::string& sTargetDir);
+
+ private:
+ static bool mbVerbose;
+ static bool mbDebug;
+ static l10nMem_impl *mcImpl;
+ l10nMem_db mcDb;
+ std::string msModuleName;
+ bool mbInError;
+
+ void formatAndShowText(const std::string& sType, int iLineNo, const
std::string& sText);
+ bool needWrite (const std::string sFileName, bool bForce);
+ bool convFilterWarning(const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText);
+ void convEntryKey (int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText,
+ const std::string& sText,
+ bool bIsFuzzy);
+
+ friend class l10nMem;
+};
+#endif
Propchange: openoffice/branches/l10n40/main/l10ntools/source/gL10nMem.hxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx?rev=1505522&view=auto
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx (added)
+++ openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx Sun Jul 21
23:45:23 2013
@@ -0,0 +1,420 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#include "gL10nMem.hxx"
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+
+/*****************************************************************************
+ ********************** G L 1 0 N M E M D B . C X X **********************
+ *****************************************************************************
+ * This is the translation memory that links between the converts (from source
+ * files) and to the language files. The memory contains the actual text info
+
***********************d******************************************************/
+
+
+
+/******************* G L O B A L D E F I N I T I O N *******************/
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_lang_entry::l10nMem_lang_entry(const std::string& sText, bool bFuzzy)
+ :
+ msText(sText),
+ mbFuzzy(bFuzzy)
+{
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_lang_entry::~l10nMem_lang_entry()
+{
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_enus_entry::l10nMem_enus_entry(const std::string& sKey,
+ const std::string& sText,
+ int iLineNo,
+ int iFileInx,
+ int iLangSize,
+ l10nMem::ENTRY_STATE eState)
+ :
+ msKey(sKey),
+ msText(sText),
+ meState(eState),
+ miFileInx(iFileInx),
+ miLineNo(iLineNo)
+{
+ int i, iSize;
+ char ch;
+
+ // add dummy language entries
+ for (i = 0; i < iLangSize; ++i)
+ mcLangText.push_back(l10nMem_lang_entry("", false));
+
+ // convert key to upper case
+ iSize = sKey.size();
+ msUpperKey = sKey;
+ for (i = 0; i < iSize; ++i)
+ {
+ ch = msUpperKey[i];
+ if (ch == ' ' || ch == '*' || ch == '+')
+ msUpperKey[i] = '_';
+ else
+ msUpperKey[i] = toupper(msUpperKey[i]);
+ }
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_enus_entry::~l10nMem_enus_entry()
+{
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_file_entry::l10nMem_file_entry(const std::string& sFileName, int
iStart)
+ :
+ msFileName(sFileName),
+ miStart(iStart),
+ miEnd(iStart)
+{
+ // Store fileName without relative path
+ int i = msFileName.rfind("/");
+ if (i == (int)std::string::npos)
+ msPureName = msFileName;
+ else
+ msPureName = msFileName.substr(i+1);
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_file_entry::~l10nMem_file_entry()
+{
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_db::l10nMem_db()
+ :
+ miCurFileInx(0),
+ miCurLangInx(0),
+ miCurENUSinx(0),
+ mbNeedWrite(false),
+ mbConvertMode(false)
+{
+ mcFileList.push_back(l10nMem_file_entry("-genLang-", 0));
+ mcLangList.push_back("-genLang-");
+ mcENUSlist.push_back(l10nMem_enus_entry("-genLang-", "-genLang-", 0, 0, 0,
l10nMem::ENTRY_DELETED));
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+l10nMem_db::~l10nMem_db()
+{
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_db::loadENUSkey(int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sText)
+{
+ // add it to vector and update file pointer
+ addKey(iLineNo, sSourceFile, sKey, sText, l10nMem::ENTRY_DELETED);
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_db::setLanguage(const std::string& sLanguage,
+ bool bCreate,
+ bool bConvert)
+{
+ int i, iSize;
+
+ // regular load or convert of old po files
+ if (bConvert)
+ {
+ iSize = mcENUSlist.size();
+ for (i = 0; i < iSize; ++i)
+ mcENUSlist[i].meState = l10nMem::ENTRY_NORMAL;
+ }
+ mbConvertMode = bConvert;
+ miCurFileInx = 0;
+
+ // With no languages selected only en-US is generated
+ if (!sLanguage.size())
+ {
+ miCurLangInx = 0;
+ return;
+ }
+
+ // en-US is loaded as master and cannot be loaded again
+ if (sLanguage == "en-US")
+ throw l10nMem::showError("en-US is loaded automatically");
+
+ // check if language is already loaded
+ iSize = mcLangList.size();
+ for (miCurLangInx = 0; miCurLangInx < iSize && mcLangList[miCurLangInx] !=
sLanguage; ++miCurLangInx) ;
+ if (miCurLangInx < iSize)
+ {
+ if (bCreate)
+ throw l10nMem::showError("loading " + sLanguage + " twice");
+ return;
+ }
+
+ // language does not exist in db
+ if (!bCreate)
+ throw l10nMem::showError("language " + sLanguage + " not loaded");
+
+ // create language
+ mcLangList.push_back(sLanguage);
+
+ // add language to all ENUS entries
+ iSize = mcENUSlist.size();
+ for (i = 0; i < iSize; ++i)
+ mcENUSlist[i].mcLangText.push_back(l10nMem_lang_entry("", false));
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+bool l10nMem_db::findFileName(const std::string& sSourceFile)
+{
+ int iSize = mcFileList.size();
+
+ // Check this or next file
+ if (mcFileList[miCurFileInx].msFileName == sSourceFile)
+ return true;
+ if (++miCurFileInx < iSize && mcFileList[miCurFileInx].msFileName ==
sSourceFile)
+ return true;
+
+ for (miCurFileInx = 1;
+ miCurFileInx < iSize && mcFileList[miCurFileInx].msFileName !=
sSourceFile;
+ ++miCurFileInx) ;
+ if (miCurFileInx == iSize)
+ {
+ miCurFileInx = 0;
+ return false;
+ }
+ else
+ return true;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_db::loadLangKey(int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText,
+ const std::string& sText,
+ bool bFuzzy)
+{
+ if (!locateKey(iLineNo, sSourceFile, sKey, sOrgText, true))
+ throw l10nMem::showError(".po file contains unknown filename: " +
sSourceFile + " or key: " + sKey);
+
+ l10nMem_lang_entry& xCur = mcENUSlist[miCurENUSinx].mcLangText[miCurLangInx];
+ xCur.msText = sText;
+ xCur.mbFuzzy = bFuzzy;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_db::reorganize()
+{
+ int iE, iEsize = mcENUSlist.size();
+ int iD, iDsize;
+ std::vector<int> listDel, listAdd;
+
+
+ // Check number of changes
+ for (iE = 1; iE < iEsize; ++iE)
+ {
+ l10nMem_enus_entry& cur = mcENUSlist[iE];
+ if (cur.meState == l10nMem::ENTRY_ADDED)
+ listAdd.push_back(iE);
+ if (cur.meState == l10nMem::ENTRY_DELETED)
+ listDel.push_back(iE);
+ }
+
+ if (!listDel.size() || !listAdd.size())
+ return;
+
+ // loop through added text and see if key match deleted text
+ iEsize = listAdd.size();
+ iDsize = listDel.size();
+ for (iE = 0; iE < iEsize; ++iE)
+ {
+ l10nMem_enus_entry& curAdd = mcENUSlist[listAdd[iE]];
+ for (iD = 0; iD < iDsize; ++iD)
+ {
+ l10nMem_enus_entry& curE = mcENUSlist[listDel[iD]];
+
+ if (curE.miFileInx != curAdd.miFileInx)
+ continue;
+ if (curE.msKey == curAdd.msKey)
+ break;
+ if (curE.msText == curAdd.msText)
+ break;
+ }
+ if (iD == iDsize)
+ continue;
+
+ // Update deleted entry (original), because lang is connected here
+ l10nMem_enus_entry& curDel = mcENUSlist[listDel[iD]];
+ curDel.msText = curAdd.msText;
+ curDel.msKey = curAdd.msKey;
+ curDel.meState = l10nMem::ENTRY_CHANGED;
+ curAdd.meState = l10nMem::ENTRY_DELETED;
+ }
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+bool l10nMem_db::locateKey(int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sText,
+ bool bThrow)
+{
+ // Position file pointer
+ if (!findFileName(sSourceFile))
+ return false;
+
+ // Fast check, to see if next key is the one (normal with load and source
without change)
+ if (++miCurENUSinx < (int)mcENUSlist.size())
+ {
+ l10nMem_enus_entry& nowEntry = mcENUSlist[miCurENUSinx];
+ if (nowEntry.msText == sText && nowEntry.msKey == sKey)
+ return true;
+ }
+
+ // Start from beginning of file and to end
+ l10nMem_file_entry& cCur = mcFileList[miCurFileInx];
+
+ // Find match with key and text
+ for (miCurENUSinx = cCur.miStart; miCurENUSinx <= cCur.miEnd; ++miCurENUSinx)
+ {
+ l10nMem_enus_entry& cEntry = mcENUSlist[miCurENUSinx];
+ if (cEntry.msText == sText && cEntry.msKey == sKey)
+ return true;
+ }
+
+ if (bThrow)
+ throw l10nMem::showError("cannot find key(" + sKey +") with text(" + sText
+ ")", iLineNo);
+ return false;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void l10nMem_db::addKey(int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sText,
+ l10nMem::ENTRY_STATE eStat)
+{
+ // check file
+ if (!findFileName(sSourceFile))
+ {
+ // prepare for new entry
+ miCurENUSinx = mcENUSlist.size();
+ miCurFileInx = mcFileList.size();
+
+ // Create file
+ mcFileList.push_back(l10nMem_file_entry(sSourceFile, miCurENUSinx));
+
+ // and add entry at the back (no problem since it is a new file)
+ mcENUSlist.push_back(l10nMem_enus_entry(sKey, sText, iLineNo, miCurFileInx,
+ mcLangList.size(), eStat));
+ mcFileList[miCurFileInx].miEnd = miCurENUSinx;
+ }
+ else
+ {
+ int iFsize = mcFileList.size();
+ l10nMem_file_entry& curF = mcFileList[miCurFileInx];
+ std::vector<l10nMem_enus_entry>::iterator it = mcENUSlist.begin();
+
+ // file is registred, so we need to add the entry at the end of the file
range
+ curF.miEnd++;
+ miCurENUSinx = curF.miEnd;
+ mcENUSlist.insert(it + curF.miEnd,
+ l10nMem_enus_entry(sKey, sText, iLineNo, miCurFileInx,
+ mcLangList.size(), eStat));
+ for (int i = miCurFileInx+1; i < iFsize; ++i)
+ {
+ l10nMem_file_entry& curF2 = mcFileList[i];
+ if (curF2.miStart >= curF.miEnd)
+ curF2.miStart++;
+ if (curF2.miEnd >= curF.miEnd)
+ curF2.miEnd++;
+ }
+ }
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+int l10nMem_db::prepareMerge()
+{
+ miCurLangInx = -1;
+ return mcLangList.size();
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+bool l10nMem_db::getMergeLang(std::string& sLang,
+ std::string& sText)
+{
+ miCurLangInx++;
+ if (miCurLangInx >= (int)mcLangList.size())
+ return false;
+
+ // update pointers
+ if (!miCurLangInx)
+ {
+ sLang = "en-US";
+ sText = mcENUSlist[miCurENUSinx].msText;
+ }
+ else
+ {
+ sLang = mcLangList[miCurLangInx];
+ sText = mcENUSlist[miCurENUSinx].mcLangText[miCurLangInx].msText;
+ }
+ return true;
+}
Propchange: openoffice/branches/l10n40/main/l10ntools/source/gL10nMemDB.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/l10n40/main/l10ntools/source/gLang.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gLang.cxx?rev=1505522&view=auto
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gLang.cxx (added)
+++ openoffice/branches/l10n40/main/l10ntools/source/gLang.cxx Sun Jul 21
23:45:23 2013
@@ -0,0 +1,49 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#include "gLang.hxx"
+
+
+
+/*****************************************************************************
+ *************************** G L A N G . C X X ***************************
+ *****************************************************************************
+ * This is the main of the l10n localizer program, it is C based and call
+ * down to classes for handling.
+ *****************************************************************************/
+
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+#if defined(UNX) || defined(OS2)
+int main(int argc, char *argv[])
+#else
+int _cdecl main(int argc, char *argv[])
+#endif
+{
+ handler cHandler;
+
+ // check command line (exit if problems)
+ cHandler.checkCommandLine(argc, argv);
+
+ // command line is ok, so execute it
+ cHandler.run();
+}
Propchange: openoffice/branches/l10n40/main/l10ntools/source/gLang.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/l10n40/main/l10ntools/source/gLang.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/gLang.hxx?rev=1505522&view=auto
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/gLang.hxx (added)
+++ openoffice/branches/l10n40/main/l10ntools/source/gLang.hxx Sun Jul 21
23:45:23 2013
@@ -0,0 +1,156 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#ifndef GLANG_HXX
+#define GLANG_HXX
+#include <string>
+#include <vector>
+
+
+
+/*****************************************************************************
+ *************************** G L A N G . H X X ***************************
+ *****************************************************************************
+ * This is the class definition header of the l10n localizer program,
+ * all global classes and their interrelations is defined here
+ *****************************************************************************/
+
+
+
+/******************* G L O B A L D E F I N I T I O N *******************/
+
+
+
+
+
+
+/******************** C L A S S D E F I N I T I O N ********************/
+class l10nMem_impl;
+class l10nMem
+{
+ public:
+ l10nMem();
+ ~l10nMem();
+
+ typedef enum
+ {
+ ENTRY_DELETED,
+ ENTRY_ADDED,
+ ENTRY_CHANGED,
+ ENTRY_NORMAL
+ } ENTRY_STATE;
+
+ static void setShowVerbose ();
+ static void setShowDebug ();
+
+ static int showError (const std::string& sText, int iLineNo = 0);
+ static int showWarning (const std::string& sText, int iLineNo = 0);
+ static void showDebug (const std::string& sText, int iLineNo = 0);
+ static void showVerbose (const std::string& sText, int iLineNo = 0);
+ bool isError ();
+
+ void setModuleName (const std::string& sModuleName);
+ void setLanguage (const std::string& sLanguage,
+ bool bCreate,
+ bool bConvert);
+ void loadEntryKey (int iLineNo,
+ const std::string& sSourceFile,
+ const std::string& sKey,
+ const std::string& sOrgText,
+ const std::string& sText,
+ bool bIsFuzzy);
+
+ void setSourceKey (int iLineNo,
+ const std::string& sFilename,
+ const std::string& sKey,
+ const std::string& sText);
+
+ void save (const std::string& sTargetDir,
+ bool bKid,
+ bool bForce);
+ void dumpMem (const std::string& sTargetDir);
+
+ int prepareMerge ();
+ bool getMergeLang (std::string& sLang,
+ std::string& sText);
+};
+
+
+
+/******************** C L A S S D E F I N I T I O N ********************/
+class convert_gen
+{
+ public:
+ convert_gen(l10nMem& cMemory,
+ const std::string& sSourceDir,
+ const std::string& sTargetDir,
+ const std::string& sSourceFile);
+ ~convert_gen();
+
+ // do extract/merge
+ bool execute(const bool bMerge);
+
+ // ONLY po should implement these functions
+ void startSave(const std::string& sLanguage,
+ const std::string& sFile);
+ void save(const std::string& sFileName,
+ const std::string& sKey,
+ const std::string& sENUStext,
+ const std::string& sText,
+ bool bFuzzy);
+ void endSave();
+ static bool checkAccess(std::string& sFile);
+ static bool createDir(std::string& sDir, std::string& sFile);
+};
+
+
+
+/******************** C L A S S D E F I N I T I O N ********************/
+class handler
+{
+ public:
+ handler();
+ ~handler();
+
+ void checkCommandLine(int argc, char *argv[]);
+ void run();
+
+ private:
+ enum {DO_CONVERT, DO_EXTRACT, DO_MERGE, DO_MERGE_KID, DO_GENERATE}
meWorkMode;
+ l10nMem mcMemory;
+ std::string msModuleName;
+ std::string msPoOutDir;
+ std::string msPoDir;
+ std::string msSourceDir;
+ std::string msTargetDir;
+ bool mbForceSave;
+ std::vector<std::string> mvSourceFiles;
+ std::vector<std::string> mvLanguages;
+
+ void runConvert();
+ void runExtractMerge(bool bMerge, bool bKid);
+ void runGenerate();
+
+ void showUsage(std::string& sErr);
+ void showManual();
+ void loadL10MEM();
+ void readFileWithSources();
+};
+#endif
Propchange: openoffice/branches/l10n40/main/l10ntools/source/gLang.hxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/l10n40/main/l10ntools/source/l10procNew.odt
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/l10procNew.odt?rev=1505522&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openoffice/branches/l10n40/main/l10ntools/source/l10procNew.odt
------------------------------------------------------------------------------
svn:executable = *
Propchange: openoffice/branches/l10n40/main/l10ntools/source/l10procNew.odt
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openoffice/branches/l10n40/main/l10ntools/source/l10procNew2.odt
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/l10procNew2.odt?rev=1505522&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openoffice/branches/l10n40/main/l10ntools/source/l10procNew2.odt
------------------------------------------------------------------------------
svn:executable = *
Propchange: openoffice/branches/l10n40/main/l10ntools/source/l10procNew2.odt
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openoffice/branches/l10n40/main/l10ntools/source/l10procToday.odt
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/l10procToday.odt?rev=1505522&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openoffice/branches/l10n40/main/l10ntools/source/l10procToday.odt
------------------------------------------------------------------------------
svn:executable = *
Propchange: openoffice/branches/l10n40/main/l10ntools/source/l10procToday.odt
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: openoffice/branches/l10n40/main/l10ntools/source/makefile.mk
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/l10ntools/source/makefile.mk?rev=1505522&r1=1505521&r2=1505522&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/l10ntools/source/makefile.mk (original)
+++ openoffice/branches/l10n40/main/l10ntools/source/makefile.mk Sun Jul 21
23:45:23 2013
@@ -166,10 +166,24 @@ APP7STDLIBS+= \
# static libs at end for OS X
.ENDIF
-#
-#APP8TARGET= treeconfig
-#APP8OBJS= $(OBJ)$/treeconfig.obj $(OBJ)$/inireader.obj $(OBJ)$/export2.obj
-#APP8STDLIBS=$(TOOLSLIB) $(SALLIB) $(VOSLIB) $(ICUINLIB) $(STLPORT)
+# localizer for new l10n framework
+APP8TARGET= genLang
+APP8OBJS= $(OBJ)$/gLang.obj $(OBJ)$/gL10nMem.obj \
+ $(OBJ)$/gL10nMemDB.obj $(OBJ)$/gHandler.obj \
+ $(OBJ)$/gConProp.obj $(OBJ)$/gCon.obj \
+ $(OBJ)$/gConDB.obj \
+ $(OBJ)$/gConPoWrap.obj $(OBJ)$/gConSrcWrap.obj \
+ $(OBJ)$/gConXrmWrap.obj $(OBJ)$/gConXhpWrap.obj \
+ $(OBJ)$/gConXcsWrap.obj $(OBJ)$/gConXcuWrap.obj \
+ $(OBJ)$/gConUlfWrap.obj $(OBJ)$/gConTreeWrap.obj
+APP8RPATH= NONE
+APP8STDLIBS=
+APP8LIBS=
+APP8LINKTYPE=STATIC
+APP8LIBSALCPPRT=
+
+
+
# localizer for l10n framework
APP9TARGET= localize_sl
@@ -194,9 +208,22 @@ DEPOBJFILES=$(APP1OBJS) $(APP2OBJS) $(AP
$(MISC)$/%_yy.c : %lex.l
flex -l -w -8 -o$@ $<
+
+
+# --- Files --------------------------------------------------------
+
+
# Helper to suppress warnings in lex generated c code, see #i57362#
+$(OBJ)$/gConPoWrap.obj: $(MISC)$/gConPo_yy.c
+$(OBJ)$/gConSrcWrap.obj: $(MISC)$/gConSrc_yy.c
+$(OBJ)$/gConXcuWrap.obj: $(MISC)$/gConXcu_yy.c
+$(OBJ)$/gConXcsWrap.obj: $(MISC)$/gConXcs_yy.c
+$(OBJ)$/gConXrmWrap.obj: $(MISC)$/gConXrm_yy.c
+$(OBJ)$/gConXhpWrap.obj: $(MISC)$/gConXhp_yy.c
+$(OBJ)$/gConUlfWrap.obj: $(MISC)$/gConUlf_yy.c
+$(OBJ)$/gConTreeWrap.obj: $(MISC)$/gConTree_yy.c
+
$(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
-