Formerly main.c.~77~

This commit is contained in:
Roland McGrath 1993-04-08 22:14:23 +00:00
parent 2ed0333f3c
commit 542a0f8112

16
main.c
View file

@ -1300,7 +1300,7 @@ positive integral argument",
{ {
unsigned int i; unsigned int i;
sprintf (p, "%s--%s%s", sprintf (p, "%s--%s%s",
cs->c == -1 ? "" : ", ", cs->c == -1 ? " " : ", ",
cs->long_name, arg); cs->long_name, arg);
p += strlen (p); p += strlen (p);
for (i = 0; i < (sizeof (long_option_aliases) / for (i = 0; i < (sizeof (long_option_aliases) /
@ -1426,7 +1426,7 @@ define_makeflags (all, makefile)
struct flag struct flag
{ {
struct flag *next; struct flag *next;
struct command_switch *switch; struct command_switch *cs;
char *arg; char *arg;
unsigned int arglen; unsigned int arglen;
}; };
@ -1435,7 +1435,7 @@ define_makeflags (all, makefile)
#define ADD_FLAG(ARG, LEN) \ #define ADD_FLAG(ARG, LEN) \
do { \ do { \
struct flag *new = (struct flag *) alloca (sizeof (struct flag)); \ struct flag *new = (struct flag *) alloca (sizeof (struct flag)); \
new->switch = cs; \ new->cs = cs; \
new->arg = (ARG); \ new->arg = (ARG); \
new->arglen = (LEN); \ new->arglen = (LEN); \
new->next = flags; \ new->next = flags; \
@ -1543,14 +1543,14 @@ define_makeflags (all, makefile)
do do
{ {
/* Add the flag letter or name to the string. */ /* Add the flag letter or name to the string. */
if (flags->switch->c == -1) if (flags->cs->c == -1)
{ {
*p++ = '-'; *p++ = '-';
strcpy (p, flags->switch->long_name); strcpy (p, flags->cs->long_name);
p += strlen (p); p += strlen (p);
} }
else else
*p++ = flags->c; *p++ = flags->cs->c;
if (flags->arg != 0) if (flags->arg != 0)
{ {
/* A flag that takes an optional argument which in this case /* A flag that takes an optional argument which in this case
@ -1560,7 +1560,7 @@ define_makeflags (all, makefile)
if (flags->arglen > 0) if (flags->arglen > 0)
{ {
/* Add its argument too. */ /* Add its argument too. */
*p++ = flags->switch->c == -1 ? '=' : ' '; *p++ = flags->cs->c == -1 ? '=' : ' ';
bcopy (flags->arg, p, flags->arglen); bcopy (flags->arg, p, flags->arglen);
p += flags->arglen; p += flags->arglen;
} }
@ -1568,7 +1568,7 @@ define_makeflags (all, makefile)
*p++ = ' '; *p++ = ' ';
*p++ = '-'; *p++ = '-';
} }
else if (flags->switch->c == -1) else if (flags->cs->c == -1)
{ {
/* Long options must each go in their own word, /* Long options must each go in their own word,
so we write the following space and dash. */ so we write the following space and dash. */