[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] [PATCH 3/7] argp'fied argument parsing & tiny fixes
From: |
Alfred M. Szmidt |
Subject: |
Re: [bug-inetutils] [PATCH 3/7] argp'fied argument parsing & tiny fixes |
Date: |
Sat, 23 Aug 2008 05:09:23 -0400 |
telnet/commands.c:
* Changed some strcpy() to strncpy ()
* Defined MAX_BUF_SIZ
This should be split up into a seperate patch, since it has nothing to
do with argp. I am also not sure why this is needed, strcpy from a
quick glance is just fine here.
telnet/externs.h:
* declare 'family' and 'user' as extern among other argument
values
Why?
- char *args[8], **argp = args;
-
+ char *args[8], **argptr = args;
+
+ /* FIXME: We should proabably move all
+ * argument parsinsg to 'parse_opt ()'. */
if (argc > 2)
- usage ();
- *argp++ = prompt;
+ {
+ /* XXX: using this, we simulate,
+ * argp_usage (), without a 'state' */
+ argp_help (&argp, stderr, ARGP_HELP_USAGE, "telnet");
+ exit (argp_err_exit_status);
+ }
Please try to fix the two FIXME's.