On Mon, May 11, 2020, 11:31 PM Akim Demaille <[email protected]> wrote:
> Hi Joshua, > > Thanks for this clean up! > > > Le 12 mai 2020 à 04:42, Joshua Watt <[email protected]> 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! > >
