comparison src/noffle.c @ 168:cf2274194d38 noffle

[svn] small option parsing fix
author mnalis
date Mon, 26 Feb 2001 22:41:26 +0000
parents 8ea6b5ddc5a5
children 09ca6eb5c7ff
comparison
equal deleted inserted replaced
167:7ba337dafb2c 168:cf2274194d38
8 not as server. If noffle runs as server, locking is performed while 8 not as server. If noffle runs as server, locking is performed while
9 executing NNTP commands, but temporarily released if no new command is 9 executing NNTP commands, but temporarily released if no new command is
10 received for some seconds (to allow multiple clients connect at the same 10 received for some seconds (to allow multiple clients connect at the same
11 time). 11 time).
12 12
13 $Id: noffle.c 249 2001-01-25 13:38:31Z bears $ 13 $Id: noffle.c 261 2001-02-26 22:41:26Z mnalis $
14 */ 14 */
15 15
16 #if HAVE_CONFIG_H 16 #if HAVE_CONFIG_H
17 #include <config.h> 17 #include <config.h>
18 #endif 18 #endif
409 409
410 } 410 }
411 else if ( strcmp( cmd, "desc" ) != 0 411 else if ( strcmp( cmd, "desc" ) != 0
412 && strcmp( cmd, "post" ) != 0 ) 412 && strcmp( cmd, "post" ) != 0 )
413 { 413 {
414 fprintf( stderr, "Unknown argument -m %s\n", optarg ); 414 fprintf( stderr, "Unknown argument -m %s\n", cmd );
415 return FALSE; 415 return FALSE;
416 } 416 }
417 417
418 grp = argv[ 0 ]; 418 grp = argv[ 0 ];
419 argv++; 419 argv++;
445 c = **argv; 445 c = **argv;
446 if ( c == 'y' || c == 'm' || c == 'n' ) 446 if ( c == 'y' || c == 'm' || c == 'n' )
447 Grp_setPostAllow( grp, c ); 447 Grp_setPostAllow( grp, c );
448 else 448 else
449 { 449 {
450 fprintf( stderr, "Access must be 'y', 'n' or 'm'" ); 450 fprintf( stderr, "Access must be 'y', 'n' or 'm'\n" );
451 return FALSE; 451 return FALSE;
452 } 452 }
453 } 453 }
454 454
455 return TRUE; 455 return TRUE;
881 { 881 {
882 fprintf( stderr, "Option -m needs argument.\n" ); 882 fprintf( stderr, "Option -m needs argument.\n" );
883 result = EXIT_FAILURE; 883 result = EXIT_FAILURE;
884 } 884 }
885 else 885 else
886 if ( ! doModify( *argv, --argc, ++argv ) ) 886 if ( ! doModify( argv[0], --argc, &argv[1] ) )
887 result = EXIT_FAILURE; 887 result = EXIT_FAILURE;
888 break; 888 break;
889 case 'n': 889 case 'n':
890 if ( Online_true() ) 890 if ( Online_true() )
891 fprintf( stderr, "NOFFLE is already online\n" ); 891 fprintf( stderr, "NOFFLE is already online\n" );