From f78cf6a415380e24cdc2957986ba81dd941545e1 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Tue, 19 Nov 2013 17:04:52 -0800 Subject: [PATCH] feat(shell): add getopt Let travis find out which platforms support it Signed-off-by: Leonardo de Moura --- src/shell/lean.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/shell/lean.cpp b/src/shell/lean.cpp index 07cd1aacd..8454c3f90 100644 --- a/src/shell/lean.cpp +++ b/src/shell/lean.cpp @@ -7,6 +7,7 @@ Author: Leonardo de Moura #include #include #include +#include #include "util/interrupt.h" #include "kernel/printer.h" #include "frontends/lean/parser.h" @@ -21,6 +22,14 @@ using lean::leanlua_state; enum class input_kind { Unspecified, Lean, Lua }; +struct option long_options[] = { + {"version", no_argument, 0, 'v'}, + {"help", no_argument, 0, 'h'}, + {"lean", no_argument, 0, 0}, + {"lua", no_argument, 0, 0}, + {0, 0, 0, 0} +}; + static void on_ctrl_c(int ) { lean::request_interrupt(); }