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:
Leonardo de Moura 2013-11-19 17:04:52 -08:00
parent a98fdd9be6
commit f78cf6a415

View file

@ -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();
}