[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] Add command line option to map file prefixes
From: |
Joshua Watt |
Subject: |
Re: [PATCH v3] Add command line option to map file prefixes |
Date: |
Tue, 12 May 2020 07:09:51 -0500 |
On Mon, May 11, 2020, 11:31 PM Akim Demaille <address@hidden> wrote:
> Hi Joshua,
>
> Thanks for this clean up!
>
> > Le 12 mai 2020 à 04:42, Joshua Watt <address@hidden> a écrit :
> >
> > @@ -712,6 +716,23 @@ getargs (int argc, char *argv[])
> > language_argmatch (optarg, command_line_prio, loc);
> > break;
> >
> > + case 'M': // -MOLDPREFIX=NEWPREFIX
> > + if (optarg)
> > + {
> > + char *newprefix = strchr (optarg, '=');
> > + if (newprefix)
> > + {
> > + *newprefix = '\0';
> > + add_prefix_map (optarg, newprefix + 1);
> > + }
> > + else
> > + {
> > + complain (&loc, complaint, _("invalid argument for %s:
> %s"),
> > + quote ("--file-prefix-map"), quotearg_n(1,
> optarg));
>
> space paren.
>
> > + }
> > + }
> > + break;
>
> This gives the impression that it's ok not to have an argument, but the
> argument is (fortunately) mandatory. You should remove the if.
>
Ah right. I missed that one. Probably should have a test too
> And, FTR (and then again, I can do it, I don't know if you forgot about
> it, or meant not to do it), doc/bison.texi needs to be updated.
>
I just forgot to do it.
I won't have time to do them until tomorrow, so if you want to fix up the
last few minor things and push the change, that's fine with me.
> Cheers!
>
>