summaryrefslogtreecommitdiff
path: root/l10ntools/inc
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-03-30 17:26:25 +0300
committerTor Lillqvist <tlillqvist@novell.com>2011-03-30 17:26:37 +0300
commitd8b112545b44d4166ff531a945d12934f5ab7643 (patch)
treecfa8a09f4ae215224466a2ae6f1e1e404f69974d /l10ntools/inc
parentfbcdf13e815a9af1198f7c3fbddacf2c16e71df7 (diff)
Bin some Hamburg crack
We don't need the possibility to use a "source_config" file that would list "repositories".
Diffstat (limited to 'l10ntools/inc')
-rw-r--r--l10ntools/inc/inireader.hxx55
-rw-r--r--l10ntools/inc/treeconfig.hxx31
2 files changed, 0 insertions, 86 deletions
diff --git a/l10ntools/inc/inireader.hxx b/l10ntools/inc/inireader.hxx
deleted file mode 100644
index 738d4bb3232c..000000000000
--- a/l10ntools/inc/inireader.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#include <string>
-#include <boost/unordered_map.hpp>
-#include <unicode/regex.h>
-
-using namespace std;
-
-namespace transex3
-{
-
-struct eqstr
-{
- bool operator()( const string s1 , const string s2) const
- {
- return s1.compare( s2 ) == 0;
- }
-};
-
-typedef boost::unordered_map< string , string > stringmap;
-typedef boost::unordered_map< string, stringmap* > INImap;
-
-class INIreader
-{
- private:
- UErrorCode section_status;
- UErrorCode parameter_status;
- RegexMatcher* section_match;
- RegexMatcher* parameter_match;
-
- public:
- INIreader(): section_status ( U_ZERO_ERROR ) ,
- parameter_status ( U_ZERO_ERROR )
- {
- section_match = new RegexMatcher ( "^\\s*\\[([a-zA-Z0-9]*)\\].*" , 0 , section_status );
- parameter_match = new RegexMatcher ( "^\\s*([a-zA-Z0-9]*)\\s*=\\s*([a-zA-Z0-9 ]*).*" , 0 , parameter_status ) ;
- }
- ~INIreader()
- {
- delete section_match;
- delete parameter_match;
- }
- // open "filename", fill boost::unordered_map with sections / paramaters
- bool read( INImap& myMap , string& filename );
-
- private:
- bool is_section( string& line , string& section_str );
- bool is_parameter( string& line , string& parameter_key , string& parameter_value );
- inline void check_status( UErrorCode status );
- inline void toStlString ( const UnicodeString& str, string& stl_str );
- inline void trim( string& str );
-};
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/inc/treeconfig.hxx b/l10ntools/inc/treeconfig.hxx
deleted file mode 100644
index ea573943ad2e..000000000000
--- a/l10ntools/inc/treeconfig.hxx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#include <vector>
-#include <string>
-
-#include "inireader.hxx"
-
-namespace transex3{
-
-class Treeconfig
-{
-
- private:
- INIreader inireader;
- INImap map;
- bool has_config_file;
- void getCurrentDir( string& dir );
- bool isConfigFilePresent();
-
- public:
-
- Treeconfig() : has_config_file( false ) { parseConfig(); }
- // read the config file, returns true in case a config file had been found
- bool parseConfig();
- // returns a string vector containing all active repositories, returns true in case we are deep inside
- // of a source tree. This could affect the behavour of the tool
- bool getActiveRepositories( vector<string>& active_repos);
-};
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */