comparison mcabber/src/main.c @ 1259:c5c09f8f60b0

Change command line option -v to -V
author Mikael Berthe <mikael@lilotux.net>
date Wed, 27 Jun 2007 22:13:10 +0200
parents 05dc45e7c7bb
children 3b338a5c01fc
comparison
equal deleted inserted replaced
1258:7691eb8c8e55 1259:c5c09f8f60b0
338 signal(SIGCHLD, sig_handler); 338 signal(SIGCHLD, sig_handler);
339 signal(SIGPIPE, SIG_IGN); 339 signal(SIGPIPE, SIG_IGN);
340 340
341 /* Parse command line options */ 341 /* Parse command line options */
342 while (1) { 342 while (1) {
343 int c = getopt(argc, argv, "hvf:"); 343 int c = getopt(argc, argv, "hVf:");
344 if (c == -1) { 344 if (c == -1) {
345 break; 345 break;
346 } else 346 } else
347 switch (c) { 347 switch (c) {
348 case 'h': 348 case 'h':
349 case '?': 349 case '?':
350 printf("Usage: %s [-h|-v|-f mcabberrc_file]\n\n", argv[0]); 350 printf("Usage: %s [-h|-V|-f mcabberrc_file]\n\n", argv[0]);
351 return (c == 'h' ? 0 : -1); 351 return (c == 'h' ? 0 : -1);
352 case 'v': 352 case 'V':
353 compile_options(); 353 compile_options();
354 return 0; 354 return 0;
355 case 'f': 355 case 'f':
356 configFile = g_strdup(optarg); 356 configFile = g_strdup(optarg);
357 break; 357 break;
358 } 358 }
359 } 359 }
360 360
361 if (optind < argc) { 361 if (optind < argc) {
362 fprintf(stderr, "Usage: %s [-h|-v|-f mcabberrc_file]\n\n", argv[0]); 362 fprintf(stderr, "Usage: %s [-h|-V|-f mcabberrc_file]\n\n", argv[0]);
363 return -1; 363 return -1;
364 } 364 }
365 365
366 /* Initialize command system, roster and default key bindings */ 366 /* Initialize command system, roster and default key bindings */
367 cmd_init(); 367 cmd_init();