File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ ic_public char* ic_readline(const char* prompt_text)
5959{
6060 ic_env_t * env = ic_get_env ();
6161 if (env == NULL ) return NULL ;
62+ #if defined(EMSCRIPTEN )
63+ return ic_editline (env , prompt_text ); // in editline.c
64+ #else
6265 if (!env -> noedit ) {
6366 // terminal editing enabled
6467 return ic_editline (env , prompt_text ); // in editline.c
@@ -77,6 +80,7 @@ ic_public char* ic_readline(const char* prompt_text)
7780 // read directly from stdin
7881 return ic_getline (env -> mem );
7982 }
83+ #endif
8084}
8185
8286
Original file line number Diff line number Diff line change @@ -403,10 +403,12 @@ ic_private tty_t* tty_new(alloc_t* mem, int fd_in)
403403 tty -> esc_initial_timeout = 100 ;
404404 #endif
405405 tty -> esc_timeout = 10 ;
406+ #if !defined(EMSCRIPTEN )
406407 if (!(isatty (tty -> fd_in ) && tty_init_raw (tty ) && tty_init_utf8 (tty ))) {
407408 tty_free (tty );
408409 return NULL ;
409410 }
411+ #endif
410412 return tty ;
411413}
412414
You can’t perform that action at this time.
0 commit comments