joachim99@8: /*************************************************************************** joachim99@8: main.cpp - Where everything starts. joachim99@8: ------------------- joachim99@8: begin : Don Jul 11 12:31:29 CEST 2002 joachim99@58: copyright : (C) 2002-2004 by Joachim Eibl joachim99@8: email : joachim.eibl@gmx.de joachim99@8: ***************************************************************************/ joachim99@8: joachim99@8: /*************************************************************************** joachim99@8: * * joachim99@8: * This program is free software; you can redistribute it and/or modify * joachim99@8: * it under the terms of the GNU General Public License as published by * joachim99@8: * the Free Software Foundation; either version 2 of the License, or * joachim99@8: * (at your option) any later version. * joachim99@8: * * joachim99@8: ***************************************************************************/ joachim99@8: joachim99@8: #include joachim99@8: #include joachim99@8: #include joachim99@40: #include "kdiff3_shell.h" friseb123@16: #include "version.h" joachim99@53: #include joachim99@8: joachim99@8: joachim99@8: static const char *description = joachim99@8: I18N_NOOP("Text Diff and Merge Tool"); joachim99@8: joachim99@8: static KCmdLineOptions options[] = joachim99@8: { joachim99@8: { "m", 0, 0 }, joachim99@8: { "merge", I18N_NOOP("Merge the input."), 0 }, joachim99@8: { "b", 0, 0 }, joachim99@8: { "base file", I18N_NOOP("Explicit base file. For compatibility with certain tools."), 0 }, joachim99@8: { "o", 0, 0 }, joachim99@8: { "output file", I18N_NOOP("Output file. Implies -m. E.g.: -o newfile.txt"), 0 }, joachim99@8: { "out file", I18N_NOOP("Output file, again. (For compatibility with certain tools.)"), 0 }, joachim99@8: { "auto", I18N_NOOP("No GUI if all conflicts are auto-solvable. (Needs -o file)"), 0 }, joachim99@8: { "qall", I18N_NOOP("Don't solve conflicts automatically. (For compatibility...)"), 0 }, joachim99@8: { "fname alias", I18N_NOOP("Visible name replacement. Supply this once for every input."), 0 }, joachim99@8: #ifdef _WIN32 joachim99@8: { "query", I18N_NOOP("For compatibility with certain tools."), 0 }, joachim99@8: #endif joachim99@8: { "+[File1]", I18N_NOOP("file1 to open (base, if not specified via --base)"), 0 }, joachim99@8: { "+[File2]", I18N_NOOP("file2 to open"), 0 }, joachim99@8: { "+[File3]", I18N_NOOP("file3 to open"), 0 }, joachim99@8: { 0, 0, 0 } joachim99@8: }; joachim99@8: joachim99@8: joachim99@8: #ifdef _WIN32 joachim99@8: #include joachim99@8: // This command checks the comm joachim99@8: static bool isOptionUsed(const QString& s, int argc, char* argv[]) joachim99@8: { joachim99@8: for(int j=0; j