NCurses initialization without clearing the screen

前端 未结 5 652
名媛妹妹
名媛妹妹 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:45

    Have you considered the simple expedient of creating a custom terminfo or termcap entry lacking a sequence to clear the screen and then switching your terminal setting to that right before running your program? You could also just use newterm() and set_term() in ncurses. This used to be easier with termcap, since you could include another terminal and override some of its capabilities.

提交回复
热议问题