1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-19 08:45:11 +00:00

Get dst to compile on windows

This commit is contained in:
Calvin Rose
2018-02-01 17:09:22 -08:00
parent 776addfc07
commit ccdf758e83
16 changed files with 46 additions and 35 deletions

View File

@@ -103,6 +103,11 @@
*
*/
/* On Windows, have a minimal implementation */
#ifdef WIN32
#else
#include <termios.h>
#include <unistd.h>
#include <stdlib.h>
@@ -1197,3 +1202,5 @@ int linenoiseHistoryLoad(const char *filename) {
fclose(fp);
return 0;
}
#endif

View File

@@ -169,8 +169,10 @@ int main(int argc, char **argv) {
if (!fileRead || (flags & DST_CLIENT_REPL)) {
DstContext ctxt;
dst_context_repl(&ctxt, env);
#ifndef DST_WINDOWS
ctxt.read_chunk = linenoiseread;
linenoiseSetMultiLine(1);
#endif
puts(replsplash);
status = dst_context_run(&ctxt, DST_PARSEFLAG_SOURCEMAP);
}