diff 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
line wrap: on
line diff
--- a/src/noffle.c	Sun Feb 25 23:29:50 2001 +0000
+++ b/src/noffle.c	Mon Feb 26 22:41:26 2001 +0000
@@ -10,7 +10,7 @@
   received for some seconds (to allow multiple clients connect at the same
   time).
 
-  $Id: noffle.c 249 2001-01-25 13:38:31Z bears $
+  $Id: noffle.c 261 2001-02-26 22:41:26Z mnalis $
 */
 
 #if HAVE_CONFIG_H
@@ -411,7 +411,7 @@
     else if ( strcmp( cmd, "desc" ) != 0
 	      && strcmp( cmd, "post" ) != 0 )
     {
-	fprintf( stderr, "Unknown argument -m %s\n", optarg );
+	fprintf( stderr, "Unknown argument -m %s\n", cmd );
 	return FALSE;
     }
     
@@ -447,7 +447,7 @@
 	    Grp_setPostAllow( grp, c );
 	else
 	{
-	    fprintf( stderr, "Access must be 'y', 'n' or 'm'" );
+	    fprintf( stderr, "Access must be 'y', 'n' or 'm'\n" );
 	    return FALSE;
 	}
     }
@@ -883,7 +883,7 @@
             result = EXIT_FAILURE;
         }
         else
-	    if ( ! doModify( *argv, --argc, ++argv ) )
+	    if ( ! doModify( argv[0], --argc, &argv[1] ) )
 		result = EXIT_FAILURE;
         break;
     case 'n':