NCurses initialization without clearing the screen

前端 未结 5 653
名媛妹妹
名媛妹妹 2021-01-17 20:29

I am writing a program that\'s similar to a shell. Once started up, there\'s a prompt and you enter in some app-specific commands.

So far this works just fine. How

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-17 20:36

    Here is another discussion about this. The provided solutions are:

    1. "The 'filter()' function lets you use curses as a single-line."
    2. "You can write something equivalent in C, using setupterm to get the terminal data, and tparm, tputs for formatting and output."

    Of course there is the third option to get the ncurses source code and modify it so it doesn't clear the screen anymore.

提交回复
热议问题