From 0d59f1ca49c9f7f3b2edaadcf590360ec66a6257 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Oct 2017 12:45:11 +0200 Subject: nix: Respect -I, --arg, --argstr Also, random cleanup to argument handling. --- src/libmain/shared.hh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/libmain/shared.hh') diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh index 2a1e42dd9..9219dbed8 100644 --- a/src/libmain/shared.hh +++ b/src/libmain/shared.hh @@ -2,6 +2,7 @@ #include "util.hh" #include "args.hh" +#include "common-args.hh" #include @@ -69,6 +70,19 @@ template N getIntArg(const string & opt, } +struct LegacyArgs : public MixCommonArgs +{ + std::function parseArg; + + LegacyArgs(const std::string & programName, + std::function parseArg); + + bool processFlag(Strings::iterator & pos, Strings::iterator end) override; + + bool processArgs(const Strings & args, bool finish) override; +}; + + /* Show the manual page for the specified program. */ void showManPage(const string & name); -- cgit v1.2.3