about summary refs log tree commit diff
path: root/src/libmain/shared.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain/shared.hh')
-rw-r--r--src/libmain/shared.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh
index 2a1e42dd9774..9219dbed8325 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 <signal.h>
 
@@ -69,6 +70,19 @@ template<class N> N getIntArg(const string & opt,
 }
 
 
+struct LegacyArgs : public MixCommonArgs
+{
+    std::function<bool(Strings::iterator & arg, const Strings::iterator & end)> parseArg;
+
+    LegacyArgs(const std::string & programName,
+        std::function<bool(Strings::iterator & arg, const Strings::iterator & end)> 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);