|
|
|
@ -34,7 +34,7 @@
|
|
|
|
|
static const char *description =
|
|
|
|
|
I18N_NOOP("Tool for Comparison and Merge of Files and Directories");
|
|
|
|
|
|
|
|
|
|
static KCmdLineOptions options[] =
|
|
|
|
|
static TDECmdLineOptions options[] =
|
|
|
|
|
{
|
|
|
|
|
{ "m", 0, 0 },
|
|
|
|
|
{ "merge", I18N_NOOP("Merge the input."), 0 },
|
|
|
|
@ -54,7 +54,7 @@ static KCmdLineOptions options[] =
|
|
|
|
|
{ "confighelp", I18N_NOOP("Show list of config settings and current values."), 0 },
|
|
|
|
|
{ "config file", I18N_NOOP("Use a different config file."), 0 }
|
|
|
|
|
};
|
|
|
|
|
static KCmdLineOptions options2[] =
|
|
|
|
|
static TDECmdLineOptions options2[] =
|
|
|
|
|
{
|
|
|
|
|
{ "+[File1]", I18N_NOOP("file1 to open (base, if not specified via --base)"), 0 },
|
|
|
|
|
{ "+[File2]", I18N_NOOP("file2 to open"), 0 },
|
|
|
|
@ -62,9 +62,9 @@ static KCmdLineOptions options2[] =
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, TQStringList& ignorableOptions)
|
|
|
|
|
void initialiseCmdLineArgs(std::vector<TDECmdLineOptions>& vOptions, TQStringList& ignorableOptions)
|
|
|
|
|
{
|
|
|
|
|
vOptions.insert( vOptions.end(), options, (KCmdLineOptions*)((char*)options+sizeof(options)));
|
|
|
|
|
vOptions.insert( vOptions.end(), options, (TDECmdLineOptions*)((char*)options+sizeof(options)));
|
|
|
|
|
TQString configFileName = TDEStandardDirs().findResource("config","kdiff3rc");
|
|
|
|
|
TQFile configFile( configFileName );
|
|
|
|
|
if ( configFile.open( IO_ReadOnly ) )
|
|
|
|
@ -85,7 +85,7 @@ void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, TQStringList&
|
|
|
|
|
ignorableOptions = TQStringList::split( ';', sl.front() );
|
|
|
|
|
for (TQStringList::iterator i=ignorableOptions.begin(); i!=ignorableOptions.end(); ++i)
|
|
|
|
|
{
|
|
|
|
|
KCmdLineOptions ignoreOption;
|
|
|
|
|
TDECmdLineOptions ignoreOption;
|
|
|
|
|
(*i).remove('-');
|
|
|
|
|
if (!(*i).isEmpty())
|
|
|
|
|
{
|
|
|
|
@ -101,9 +101,9 @@ void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, TQStringList&
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
vOptions.insert(vOptions.end(),options2,(KCmdLineOptions*)((char*)options2+sizeof(options2)));
|
|
|
|
|
vOptions.insert(vOptions.end(),options2,(TDECmdLineOptions*)((char*)options2+sizeof(options2)));
|
|
|
|
|
|
|
|
|
|
KCmdLineOptions last = KCmdLineLastOption;
|
|
|
|
|
TDECmdLineOptions last = TDECmdLineLastOption;
|
|
|
|
|
vOptions.push_back(last);
|
|
|
|
|
TDECmdLineArgs::addCmdLineOptions( &vOptions[0] ); // Add our own options.
|
|
|
|
|
}
|
|
|
|
@ -191,7 +191,7 @@ int main(int argc, char *argv[])
|
|
|
|
|
aboutData.addCredit(I18N_NOOP("+ Many thanks to those who reported bugs and contributed ideas!"));
|
|
|
|
|
|
|
|
|
|
TDECmdLineArgs::init( argc, argv, &aboutData );
|
|
|
|
|
std::vector<KCmdLineOptions> vOptions;
|
|
|
|
|
std::vector<TDECmdLineOptions> vOptions;
|
|
|
|
|
TQStringList ignorableOptions;
|
|
|
|
|
initialiseCmdLineArgs(vOptions, ignorableOptions);
|
|
|
|
|
|
|
|
|
|