I believe it is this that crashes emscipten-compiled programs. I reported a
bug. I wonder why it compiles at all.
int w, h;
{
struct winsize ws;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws);
w = ws.ws_col;
h = ws.ws_row - 1;
}
On Saturday, June 26, 2021 at 7:01:03 AM UTC+2 Dan Stromberg wrote:
> On Fri, Jun 25, 2021 at 3:33 PM janezz55 <[email protected]> wrote:
>
>> If I output ANSI escape codes using std::cout nothing shows, when I run
>> the "executable" with nodejs. Is this a known problem and does there exist
>> a workaround?
>>
>
> I don't know much about nodejs or emscripten, but I do know a little about
> terminal emulation having written a curses implementation a while back.
>
> Is it possible it wasn't nodejs that was interpreting the escape
> sequences, but really the terminal emulator you were running it in?
>
> I'm guessing emscripten won't interpret escape sequences because the
> browser it's running in doesn't. If you truly need escape sequences in a
> browser, you Might be able to find a library that does it - no guarantees.
>
> You might be better off going with the DOM inside a browser. Maybe this
> URL will help? https://emscripten.org/docs/api_reference/html5.h.html
>
> Good luck.
>
>
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/831f5134-2962-4783-9153-a06af7469785n%40googlegroups.com.