diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 82 |
1 files changed, 19 insertions, 63 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9c95f7c..584c121 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,73 +20,29 @@ void usage() int main(int argc, char *argv[]) { -// /////////////////// -// // Debug -// argv[1] = "/home/manuel/beamer.conf"; -// ///////////////////7 - -// if ( argc < 1 ) -// { -// std::cerr << "Too many arguments. The only parameter shall be a path to a config file." << std::endl; -// exit(1); +// if (argc != 1) +// std::cout << "Usage: " << argv[0] << " <config file>" << std::endl; +// else { +// // Check if file exists +// std::ifstream f(argv[1]); +// if (!f) { +// std::cerr << "The config file does not exist." << std::endl; +// exit(1); // } -// if ( argc == 1 ) -// { -// // Check if file exists -// std::ifstream f(argv[1]); -// if (!f) -// { -// std::cerr << "The config file does not exist" << std::endl; -// exit(1); -// } -// else -// f.close(); -// } - -// //Load settings -// Config::inst()->loadSettings(argv[1]); -// qDebug() << X::Screen::inst(); - - -// qDebug() << Config::inst()->getDisplay(); -// qDebug() << Config::inst()->getInterface(); -// qDebug() << Config::inst()->getIpSpecificXConf(); -// qDebug() << Config::inst()->getModeLines(); -// qDebug() << Config::inst()->getSettingsPath(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// else +// f.close(); +// } +// //Load settings +// Config::inst()->loadSettings(argv[1]); +// qDebug() << X::Screen::inst(); +// qDebug() << Config::inst()->getDisplay(); +// qDebug() << Config::inst()->getInterface(); +// qDebug() << Config::inst()->getIpSpecificXConf(); +// qDebug() << Config::inst()->getModeLines(); +// qDebug() << Config::inst()->getSettingsPath(); // // Get initial data (to be freed) |