From b04a5bb1c8e7520eea0208a360b220831cf5cdef Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 7 May 2003 22:19:59 +0000 Subject: fixed options --- src/main.cc | 115 +++++++++++++++++++++++------------------------------------- 1 file changed, 43 insertions(+), 72 deletions(-) diff --git a/src/main.cc b/src/main.cc index 2eb0ff0..183983f 100644 --- a/src/main.cc +++ b/src/main.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: main.cc,v 1.14 2003/04/27 01:51:04 fluxgen Exp $ +// $Id: main.cc,v 1.15 2003/05/07 22:19:59 fluxgen Exp $ @@ -58,35 +58,10 @@ using namespace std; -#ifdef DEBUG_UDS - -#include -#include - -// configure UDS -uds::uds_flags_t uds::flags = uds::leak_check | uds::std_backtraces | uds::log_allocs | uds::leak_check; - -#endif //!DEBUG_UDS - -const char *getNLSYesNoMsg(bool val) { - if (val) { - return I18n::instance()->getMessage( - FBNLS::CommonSet, FBNLS::CommonYes, - "yes"); - } - - return I18n::instance()->getMessage( - FBNLS::CommonSet, FBNLS::CommonNo, - "no"); -} - int main(int argc, char **argv) { -#ifdef DEBUG_UDS - uds::Init uds_init; -#endif //!DEBUG_UDS - char *session_display = (char *) 0; - char *rc_file = (char *) 0; + char *session_display = 0; + char *rc_file = 0; NLSInit("fluxbox.cat"); I18n *i18n = I18n::instance(); @@ -129,70 +104,66 @@ int main(int argc, char **argv) { "warning: couldn't set environment variable 'DISPLAY'\n")); perror("putenv()"); } - } else if (strcmp(argv[i], "-version") == 0) { + } else if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "-v") == 0) { // print current version string - printf("Fluxbox %s : (c) 2001-2002 Henrik Kinnunen \n\n", + printf("Fluxbox %s : (c) 2001-2003 Henrik Kinnunen \n\n", __fluxbox_version); exit(0); - } else if (strcmp(argv[i], "-help") == 0) { + } else if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "-h") == 0) { // print program usage and command line options printf(i18n-> getMessage( FBNLS::mainSet, FBNLS::mainUsage, - "Fluxbox %s : (c) 2001-2002 Henrik Kinnunen\n\n" + "Fluxbox %s : (c) 2001-2003 Henrik Kinnunen\n\n" " -display \t\tuse display connection.\n" " -rc \t\t\tuse alternate resource file.\n" " -version\t\t\tdisplay version and exit.\n" " -help\t\t\t\tdisplay this help text and exit.\n\n"), __fluxbox_version); - - printf(i18n-> - getMessage( - FBNLS::mainSet, FBNLS::mainCompileOptions, - "Compile time options:\n" - " Debugging:\t\t\t%s\n" - " Interlacing:\t\t\t%s\n" - " Shape:\t\t\t%s\n" - " Slit:\t\t\t\t%s\n" - " 8bpp Ordered Dithering:\t%s\n\n"), + cout<<"Compiled with: "<