summaryrefslogtreecommitdiff
path: root/xml2cmp
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-18 18:03:19 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-19 08:26:51 +0100
commit10d33da53b40ae837d0371011e347f9028a2c76f (patch)
treef635db91ddf98a5f774b89ffe4d3ce13544a5ebf /xml2cmp
parentdb7fb9cdf22d2e36e19baa3e78bca159b3f62735 (diff)
Remove obsolete xml2cmp -ix.
Diffstat (limited to 'xml2cmp')
-rw-r--r--xml2cmp/source/support/cmdline.cxx71
-rw-r--r--xml2cmp/source/support/cmdline.hxx11
-rw-r--r--xml2cmp/source/xcd/cr_index.cxx3
-rw-r--r--xml2cmp/source/xcd/cr_index.hxx4
-rw-r--r--xml2cmp/source/xcd/main.cxx29
5 files changed, 6 insertions, 112 deletions
diff --git a/xml2cmp/source/support/cmdline.cxx b/xml2cmp/source/support/cmdline.cxx
index eb1b867b3805..41116f7714a2 100644
--- a/xml2cmp/source/support/cmdline.cxx
+++ b/xml2cmp/source/support/cmdline.cxx
@@ -40,20 +40,13 @@ char C_sUseText[] = "Use: xml2cmp.exe \n"
" [-html htmlFile] \n"
" [-types typeFile] \n"
" [-idlpath idlPath] \n"
- " Xml_FileName\n"
- " or: xml2cmp.exe \n"
- " -ix \n"
- " sourceDirectory \n"
- " outputDirectory \n"
- " [-idlpath idlPath] \n"
- " tagname [tagname ...]";
+ " Xml_FileName\n";
char C_sCmdFunc[] = "-func";
char C_sCmdDep[] = "-dep";
char C_sCmdHtml[] = "-html";
char C_sCmdType[] = "-types";
-char C_sCmdIndex[] = "-ix";
char C_sCmdIdlPath[] = "-idlpath";
@@ -72,8 +65,6 @@ CommandLine::CommandLine( int argc,
bDisplayUse = true;
else if ( argc == 2 && ! isalnum(argv[1][0]) )
bDisplayUse = true;
- else if ( strcmp( argv[1], C_sCmdIndex ) == 0 && argc < 5 )
- bDisplayUse = true;
if (bDisplayUse)
{
@@ -82,14 +73,7 @@ CommandLine::CommandLine( int argc,
exit(0);
}
- if ( strcmp( argv[1], C_sCmdIndex ) == 0 )
- {
- ParseIndexCommand(argc,argv);
- }
- else
- {
- ParseSingleFileCommand(argc,argv);
- }
+ ParseSingleFileCommand(argc,argv);
if ( sXmlSourceFile.l() == 0
&& sXmlSourceDirectory.l() == 0 )
@@ -101,15 +85,6 @@ CommandLine::CommandLine( int argc,
{
bIsOk = false;
}
- else if ( sIndexFile.l() > 0
- && ( sXmlSourceDirectory.l() == 0
- || aTagsInIndex.size() == 0
- )
- )
- {
- bIsOk = false;
- }
-
}
CommandLine::~CommandLine()
@@ -128,8 +103,7 @@ CommandLine::ErrorText() const
bool
GetParameter( Simstr & o_pMemory,
int & io_pCountArg,
- int argc,
- char * argv[] )
+ int argc, char * argv[] )
{
io_pCountArg++;
if( io_pCountArg < argc )
@@ -140,45 +114,6 @@ GetParameter( Simstr & o_pMemory,
return false;
}
-
-void
-CommandLine::ParseIndexCommand( int argc,
- char * argv[] )
-{
- int nCountArg = 1;
- bIsOk = GetParameter(
- sXmlSourceDirectory,
- nCountArg,
- argc,
- argv );
- if (bIsOk)
- bIsOk = GetParameter(
- sOutputDirectory,
- nCountArg,
- argc,
- argv );
- if (bIsOk && strcmp( argv[nCountArg+1], C_sCmdIdlPath ) == 0 )
- bIsOk = GetParameter(
- sIdlRootPath,
- ++nCountArg,
- argc,
- argv );
-
- sIndexFile = sOutputDirectory;
-#if defined(WNT)
- sIndexFile+= "\\xmlindex.html";
-#elif defined(UNX)
- sIndexFile+= "/xmlindex.html";
-#endif
-
- for ( ++nCountArg; nCountArg < argc; ++nCountArg )
- {
- Simstr sElementName(argv[nCountArg]);
- aTagsInIndex.push_back( sElementName );
- }
-}
-
-
void
CommandLine::ParseSingleFileCommand( int argc,
char * argv[] )
diff --git a/xml2cmp/source/support/cmdline.hxx b/xml2cmp/source/support/cmdline.hxx
index 948685ea185e..9ac47241504e 100644
--- a/xml2cmp/source/support/cmdline.hxx
+++ b/xml2cmp/source/support/cmdline.hxx
@@ -30,8 +30,6 @@
#define X2C_CMDLINE_HXX
#include "sistr.hxx"
-#include "list.hxx"
-
class CommandLine
{
@@ -50,20 +48,13 @@ class CommandLine
const char * TypeInfoFile() const { return sTypeInfoFile.str(); }
const char * DepPath() const { return sDepPath.str(); }
- bool IsIndexCommand() const { return sIndexFile.l() > 0; }
bool IsDepCommand() const { return sDepPath.l() > 0; }
const char * XmlSrcDirectory() const { return sXmlSourceDirectory.str(); }
- const char * IndexOutputFile() const { return sIndexFile.str(); }
const char * OutputDirectory() const { return sOutputDirectory.str(); }
- const List<Simstr> &
- IndexedTags() const { return aTagsInIndex; }
const char * IdlRootPath() const { return sIdlRootPath.str(); }
private:
- void ParseIndexCommand(
- int argc,
- char * argv[] );
void ParseSingleFileCommand(
int argc,
char * argv[] );
@@ -73,9 +64,7 @@ class CommandLine
Simstr sTypeInfoFile;
Simstr sXmlSourceDirectory;
- Simstr sIndexFile;
Simstr sOutputDirectory;
- List<Simstr> aTagsInIndex;
Simstr sIdlRootPath;
Simstr sDepPath;
diff --git a/xml2cmp/source/xcd/cr_index.cxx b/xml2cmp/source/xcd/cr_index.cxx
index 927517558f3b..ff9c4887de66 100644
--- a/xml2cmp/source/xcd/cr_index.cxx
+++ b/xml2cmp/source/xcd/cr_index.cxx
@@ -55,8 +55,7 @@ Simstr sIdlRootPath;
Index::Index( const char * i_sOutputDirectory,
- const char * i_sIdlRootPath,
- const List<Simstr> & )
+ const char * i_sIdlRootPath )
: aService2Module(20),
aModule2Service(20),
sOutputDirectory(i_sOutputDirectory),
diff --git a/xml2cmp/source/xcd/cr_index.hxx b/xml2cmp/source/xcd/cr_index.hxx
index eeea87ed1e46..8cb0668dcba0 100644
--- a/xml2cmp/source/xcd/cr_index.hxx
+++ b/xml2cmp/source/xcd/cr_index.hxx
@@ -43,9 +43,7 @@ class Index
public:
Index(
const char * i_sOutputDirectory,
- const char * i_sIdlRootPath,
- const List<Simstr> &
- i_rTagList );
+ const char * i_sIdlRootPath );
~Index();
void GatherData(
diff --git a/xml2cmp/source/xcd/main.cxx b/xml2cmp/source/xcd/main.cxx
index ea6b140904ba..5ccaf773ddeb 100644
--- a/xml2cmp/source/xcd/main.cxx
+++ b/xml2cmp/source/xcd/main.cxx
@@ -228,29 +228,6 @@ int Do_SingleFileCommandLine(const CommandLine & i_rCommandLine)
return 0;
};
-int Do_IndexCommandLine(const CommandLine & i_rCommandLine)
-{
- // Parse files:
- List<Simstr> aFiles;
- Index aIndex( i_rCommandLine.OutputDirectory(),
- i_rCommandLine.IdlRootPath(),
- i_rCommandLine.IndexedTags() );
-
- std::cout << "Gathering xml-files ..." << std::endl;
- GatherFileNames( aFiles, i_rCommandLine.XmlSrcDirectory() );
-
- std::cout << "Creating output ..." << std::endl;
- aIndex.GatherData(aFiles);
- aIndex.WriteOutput( i_rCommandLine.IndexOutputFile() );
-
- std::cout << "... done." << std::endl;
-
- return 0;
-};
-
-
-
-
int
#ifdef WNT
_cdecl
@@ -267,11 +244,7 @@ main( int argc, char* argv[] )
return 1;
}
- if ( aCommandLine.IsIndexCommand() )
- {
- ret = Do_IndexCommandLine(aCommandLine);
- }
- else if ( aCommandLine.IsDepCommand() )
+ if ( aCommandLine.IsDepCommand() )
{
ret = Do_DepCommandLine(aCommandLine);
}