Lines printed before entering fullscreen are now displayed correctly

This commit is contained in:
Jacobo Tarrío 2000-07-09 00:19:24 +00:00
parent fb0b5f4649
commit 9a2386a823
4 changed files with 35 additions and 16 deletions

View File

@ -2,7 +2,7 @@
Random remarks about the ncurses support for GoldEd+ Random remarks about the ncurses support for GoldEd+
by Jacobo Tarrio, 2:348/105.93@fidonet <jtarrio@iname.com> by Jacobo Tarrio, 2:348/105.93@fidonet <jtarrio@iname.com>
This version of GoldEd+ bears the fourth public release of the ncurses This version of GoldEd+ bears the fifth public release of the ncurses
implementation of its video code; it's still considered beta, so expect some implementation of its video code; it's still considered beta, so expect some
strange behaviour while it is being completed. strange behaviour while it is being completed.
@ -24,6 +24,18 @@ If you find any bug not listed here, please report to Jacobo Tarrio,
2:348/105.93@fidonet <jtarrio@iname.com> ASAP to get it fixed soon, or, 2:348/105.93@fidonet <jtarrio@iname.com> ASAP to get it fixed soon, or,
even better, fix it yourself and send me the patch :-) even better, fix it yourself and send me the patch :-)
=== 2000-07-09: Fifth public release
Known bugs:
* None 8-)
Notes:
* Changed function key management to work as expected in Debian Potato. That's
all I can do. I will do no more. Reason: function keys are not portable -
repeat - they are not portable.
=== 2000-04-19: Fourth public release === 2000-04-19: Fourth public release
Known bugs: Known bugs:
@ -42,6 +54,7 @@ Notes:
neither I nor you want it, do you? Workaround: map these functions to neither I nor you want it, do you? Workaround: map these functions to
regular keys. regular keys.
=== 2000-02-17: Third public release === 2000-02-17: Third public release
Known bugs: Known bugs:

View File

@ -288,7 +288,7 @@ int ShellToDos(char* command, char* message, int cls, int cursor, int swap, int
#endif #endif
#ifdef __USE_NCURSES__ #ifdef __USE_NCURSES__
savetty(); def_prog_mode();
reset_shell_mode(); reset_shell_mode();
#endif #endif
@ -342,10 +342,10 @@ int ShellToDos(char* command, char* message, int cls, int cursor, int swap, int
if(status != -1) if(status != -1)
status = 0; status = 0;
// Restore keyboard settings // Restore console settings
#ifdef __USE_NCURSES__ #ifdef __USE_NCURSES__
reset_prog_mode();
clearok(stdscr, TRUE); clearok(stdscr, TRUE);
resetty();
#else #else
gkbd.Init(); gkbd.Init();
#endif #endif

View File

@ -96,13 +96,15 @@ void GKbd::Init() {
#if defined(__USE_NCURSES__) #if defined(__USE_NCURSES__)
if(not curses_initialized++) // Both screen and keyboard must be initialized at once
if(1 == (curses_initialized++)) {
initscr(); initscr();
raw(); raw();
noecho(); noecho();
nonl(); nonl();
intrflush(stdscr, FALSE); intrflush(stdscr, FALSE);
keypad(stdscr, TRUE); keypad(stdscr, TRUE);
}
// WARNING: this might break with an old version of ncurses, or // WARNING: this might break with an old version of ncurses, or
// with another implementation of curses. I'm putting it here because // with another implementation of curses. I'm putting it here because
@ -292,7 +294,7 @@ GKbd::~GKbd() {
#if defined(__USE_NCURSES__) #if defined(__USE_NCURSES__)
if(not --curses_initialized) if(1 == (--curses_initialized))
endwin(); endwin();
#elif defined(__WIN32__) #elif defined(__WIN32__)

View File

@ -134,7 +134,7 @@ GVid::~GVid() {
#if defined(__USE_NCURSES__) #if defined(__USE_NCURSES__)
attrset(A_NORMAL); attrset(A_NORMAL);
if(not --curses_initialized) if(1 == (--curses_initialized))
endwin(); endwin();
#elif defined(__UNIX__) #elif defined(__UNIX__)
@ -159,11 +159,15 @@ GVid::~GVid() {
void GVid::init() { void GVid::init() {
#if defined(__USE_NCURSES__) #if defined(__USE_NCURSES__)
if(not curses_initialized++) // Both display and keyboard will be initialized at once
if(1 == (curses_initialized++)) {
initscr(); initscr();
noecho(); raw();
nonl(); noecho();
intrflush(stdscr, FALSE); nonl();
intrflush(stdscr, FALSE);
keypad(stdscr, TRUE);
}
#endif #endif
// Detect video adapter // Detect video adapter