Discussion:
Help on writing console apps (escape sequences)
(too old to reply)
Pavel
2004-01-03 20:00:21 UTC
Permalink
Hello.
Explain, please, how would look an console linux application source that
uses not only forward_stream_output (like "cat"), but can move cursor
everywhere in the screen (like "vi", "less") ?
Seems it should use esc-sequences like "ESC [ NUM ; NUM", but I don't
know how to get them if they are.

PS I've tried to look at the "less" source but it's too large to my
understanding.

PPS I've wrote simple application (in Java) that execs process "bash"
and read its output, but all chars I get was normal printable symbols +
linefeeds.
R.F. Pels
2004-01-03 21:05:43 UTC
Permalink
Post by Pavel
Explain, please, how would look an console linux application source that
uses not only forward_stream_output (like "cat"), but can move cursor
everywhere in the screen (like "vi", "less") ?
Seems it should use esc-sequences like "ESC [ NUM ; NUM", but I don't
know how to get them if they are.
Familiarize yourself with ncurses. No need to hassle with raw escape
sequences...
--
Ruurd
.o.
..o
ooo
Loading...