mirror of
https://github.com/janet-lang/janet
synced 2025-05-30 13:14:12 +00:00
Fix some formatting and undefined behavior.
This commit is contained in:
parent
785757f2f6
commit
aa0de01e5f
@ -286,7 +286,7 @@ static void marshal_one_def(MarshalState *st, JanetFuncDef *def, int flags) {
|
||||
|
||||
#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
|
||||
#define JANET_FIBER_FLAG_HASENV (1 << 30)
|
||||
#define JANET_STACKFRAME_HASENV (1 << 31)
|
||||
#define JANET_STACKFRAME_HASENV (INT32_MIN)
|
||||
|
||||
/* Marshal a fiber */
|
||||
static void marshal_one_fiber(MarshalState *st, JanetFiber *fiber, int flags) {
|
||||
|
@ -126,21 +126,21 @@ https://github.com/antirez/linenoise/blob/master/linenoise.c
|
||||
#define JANET_LINE_MAX 1024
|
||||
#define JANET_MATCH_MAX 256
|
||||
#define JANET_HISTORY_MAX 100
|
||||
JANET_THREAD_LOCAL static int gbl_israwmode = 0;
|
||||
JANET_THREAD_LOCAL static const char *gbl_prompt = "> ";
|
||||
JANET_THREAD_LOCAL static int gbl_plen = 2;
|
||||
JANET_THREAD_LOCAL static char gbl_buf[JANET_LINE_MAX];
|
||||
JANET_THREAD_LOCAL static int gbl_len = 0;
|
||||
JANET_THREAD_LOCAL static int gbl_pos = 0;
|
||||
JANET_THREAD_LOCAL static int gbl_cols = 80;
|
||||
JANET_THREAD_LOCAL static char *gbl_history[JANET_HISTORY_MAX];
|
||||
JANET_THREAD_LOCAL static int gbl_history_count = 0;
|
||||
JANET_THREAD_LOCAL static int gbl_historyi = 0;
|
||||
JANET_THREAD_LOCAL static int gbl_sigint_flag = 0;
|
||||
JANET_THREAD_LOCAL static struct termios gbl_termios_start;
|
||||
JANET_THREAD_LOCAL static JanetByteView gbl_matches[JANET_MATCH_MAX];
|
||||
JANET_THREAD_LOCAL static int gbl_match_count = 0;
|
||||
JANET_THREAD_LOCAL static int gbl_lines_below = 0;
|
||||
static JANET_THREAD_LOCAL int gbl_israwmode = 0;
|
||||
static JANET_THREAD_LOCAL const char *gbl_prompt = "> ";
|
||||
static JANET_THREAD_LOCAL int gbl_plen = 2;
|
||||
static JANET_THREAD_LOCAL char gbl_buf[JANET_LINE_MAX];
|
||||
static JANET_THREAD_LOCAL int gbl_len = 0;
|
||||
static JANET_THREAD_LOCAL int gbl_pos = 0;
|
||||
static JANET_THREAD_LOCAL int gbl_cols = 80;
|
||||
static JANET_THREAD_LOCAL char *gbl_history[JANET_HISTORY_MAX];
|
||||
static JANET_THREAD_LOCAL int gbl_history_count = 0;
|
||||
static JANET_THREAD_LOCAL int gbl_historyi = 0;
|
||||
static JANET_THREAD_LOCAL int gbl_sigint_flag = 0;
|
||||
static JANET_THREAD_LOCAL struct termios gbl_termios_start;
|
||||
static JANET_THREAD_LOCAL JanetByteView gbl_matches[JANET_MATCH_MAX];
|
||||
static JANET_THREAD_LOCAL int gbl_match_count = 0;
|
||||
static JANET_THREAD_LOCAL int gbl_lines_below = 0;
|
||||
|
||||
/* Unsupported terminal list from linenoise */
|
||||
static const char *badterms[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user