From: Guido S. <gs...@us...> - 2009-09-22 18:58:30
|
Update of /cvsroot/alsamodular/qmidiarp/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28024/src Modified Files: main.cpp Log Message: command line help streamlined Index: main.cpp =================================================================== RCS file: /cvsroot/alsamodular/qmidiarp/src/main.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** main.cpp 17 Sep 2009 18:52:18 -0000 1.11 --- main.cpp 22 Sep 2009 18:58:14 -0000 1.12 *************** *** 33,60 **** out.flush(); exit(EXIT_SUCCESS); case 'h': ! out << ABOUTMSG << endl; ! out << endl; ! out << "Usage" << endl; ! out << PACKAGE " [--portCount <num>] [<filename>]" << endl; ! out << PACKAGE " [-v]" << endl; ! out << PACKAGE " [-h]" << endl; ! out << endl; ! out << "Options" << endl; ! out << QString("--version -v " ! "Print application version") << endl; ! out << QString("--help -h " ! "Print this message") << endl; ! out << QString("--portCount -p <num> " ! "Number of output ports [%1]\n").arg(portCount) << endl; out.flush(); exit(EXIT_SUCCESS); case 'p': portCount = atoi(optarg); if (portCount > MAX_PORTS) ! portCount = MAX_PORTS; else if (portCount < 1) portCount = 2; ! break; } } --- 33,57 ---- out.flush(); exit(EXIT_SUCCESS); + case 'h': ! out << "Usage: " PACKAGE " [OPTION] [FILENAME]" << endl; ! out << endl; ! out << "Options:" << endl; ! out << " -v, --version " ! "Print application version" << endl; ! out << " -h, --help " ! "Print this message" << endl; ! out << QString(" -p, --portCount <num> " ! "Number of output ports [%1]").arg(portCount) << endl; out.flush(); exit(EXIT_SUCCESS); + case 'p': portCount = atoi(optarg); if (portCount > MAX_PORTS) ! portCount = MAX_PORTS; else if (portCount < 1) portCount = 2; ! break; } } *************** *** 70,74 **** app.installTranslator(&qtTr); ! // translator for qmidiarp strings QTranslator qmidiarpTr; --- 67,71 ---- app.installTranslator(&qtTr); ! // translator for qmidiarp messages QTranslator qmidiarpTr; *************** *** 84,88 **** qWarning("File not found: %s", argv[optind]); } ! int result = app.exec(); delete qmidiarp; --- 81,85 ---- qWarning("File not found: %s", argv[optind]); } ! int result = app.exec(); delete qmidiarp; |