feat(shell): add getopt
Let travis find out which platforms support it Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
a98fdd9be6
commit
f78cf6a415
1 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,7 @@ Author: Leonardo de Moura
|
|||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <signal.h>
|
||||
#include <getopt.h>
|
||||
#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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue