#include <afsconfig.h>
#include <afs/param.h>
-RCSID
- ("$Header$");
#include <sys/types.h>
#include <ctype.h>
static char *
NName(char *a1, char *a2)
{
- static char tbuffer[80];
+ static char tbuffer[300];
if (strlen(a1) == 0) {
- return "";
+ return "";
} else {
- strcpy(tbuffer, a1);
- strcat(tbuffer, a2);
- return tbuffer;
+ strncpy(tbuffer, a1, sizeof(tbuffer));
+ strncat(tbuffer, a2, sizeof(tbuffer));
+ tbuffer[sizeof(tbuffer)-1]='\0';
+ return tbuffer;
}
}
int ambig;
int best;
+ /* Allow --long-style options. */
+ if (aname[0] == '-' && aname[1] == '-' && aname[2] && aname[3]) {
+ aname++;
+ }
+
cmdlen = strlen(aname);
ambig = 0;
best = -1;
{
register int i;
register struct cmd_parmdesc *tp;
- size_t flag_width;
+ int flag_width;
char *flag_prefix;
/* find flag name length */