[m-rev.] for review: changes to option handling
Julien Fischer
jfischer at opturion.com
Fri Sep 18 00:18:30 AEST 2020
On Thu, 17 Sep 2020, Zoltan Somogyi wrote:
> To keep getopt.m and getopt_io.m in sync, I propose that both
> should be generated automatically from a common source, named
> something like "getopt_template", which would look like this:
>
> GETOPT_ONLY_START
> ... documentation or code specific to getopt
> GETOPT_ONLY_END
> GETOPT_IO_ONLY_START
> ... documentation or code specific to getopt_io
> GETOPT_IO_ONLY_END
>
> A shell script using sed would generate both files by either
> including or not including text blocks like this, and also
> deleting ", io::di, io::uo" and ", !IO)" from the getopt.m versions
> of predicate declarations, clause heads and calls.
>
> We could include this dependency in library/Mmakefile, or simply
> let developers run the script manually when modifications are needed.
> Any preferences, or objections to the whole scheme?
No objections from me. I don't really have a preference to whether they are
generated by library/Mmakefile or updated manually.
> ------------------------------------------------------------
>
> The point of this change is to serve as the basis for making
> -O<n> options additive, as per Mantis #495.
>
> The proposed scheme is as follows.
That seems fine.
Julien.
More information about the reviews
mailing list