New version of ncurses port applied, fixed memory leak in gutlgrp.cpp.
This commit is contained in:
parent
c3909b39c9
commit
69b146f956
@ -2,7 +2,7 @@
|
||||
Random remarks about the ncurses support for GoldEd+
|
||||
by Jacobo Tarrio, 2:348/102.11@fidonet <jtarrio@iname.com>
|
||||
|
||||
This version of GoldEd+ bears the second public release of the ncurses
|
||||
This version of GoldEd+ bears the third public release of the ncurses
|
||||
implementation of its video code; it's still considered beta, so expect some
|
||||
strange behaviour while it is being completed.
|
||||
|
||||
@ -24,7 +24,30 @@ If you find any bug not listed here, please report to Jacobo Tarrio,
|
||||
2:348/102.11@fidonet <jtarrio@iname.com> ASAP to get it fixed soon, or,
|
||||
better, fix it yourself and send me the patch :-)
|
||||
|
||||
=== 2000-02-25: Second public release
|
||||
=== 2000-02-17: Third public release
|
||||
Known bugs:
|
||||
|
||||
! Statusline displays a couple of odd characters (after GoldEd+'s name and
|
||||
before the current time)
|
||||
! Screen may become corrupted if someone other than GoldEd+ writes on the
|
||||
terminal
|
||||
! Messages from the program viewed before entering full-screen are not
|
||||
displayed properly
|
||||
* The cursor grows very big every 30 seconds when editing a message
|
||||
(possible reincarnation of a similar bug in former versions)
|
||||
* The splash screen looks ugly, but not as much as before :)
|
||||
|
||||
Notes:
|
||||
|
||||
* ESCDELAY is now set by default to 50ms. If it is too short for you, you
|
||||
can set the ESCDELAY environment variable to override it (under ncurses).
|
||||
It must hold an integer value representing the delay in milliseconds.
|
||||
Quite useful over wide area network links or on very-very-i-really-mean-it
|
||||
slow terminals. Undocumented in ncurses 4, but functional. Documented
|
||||
in ncurses 5 and above (I believe).
|
||||
|
||||
|
||||
=== 2000-02-05: Second public release
|
||||
Known bugs:
|
||||
|
||||
! The splash screen looks a bit ugly :-)
|
||||
@ -71,3 +94,4 @@ Notes:
|
||||
implementation; also, it would make GoldEd+ unusable over a network or
|
||||
with some dumb terminals or terminal emulators; this way you can press
|
||||
ESC followed immediately by an A to "press" ALT-A.
|
||||
|
||||
|
@ -7,6 +7,18 @@ ______________________________________________________________________
|
||||
--- === *** === ---
|
||||
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
Notes for GoldED+ 1.1.4.4, March xx 2000
|
||||
______________________________________________________________________
|
||||
|
||||
- Fixed sound support under DOS (GSNDAPI).
|
||||
|
||||
- From the previous version GoldED+ does not read goldrand.cfg
|
||||
separately. Just include it with INCLUDE if not yet ;-)
|
||||
|
||||
- Fixed some memory leaks.
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
Notes for GoldED+ 1.1.4.3, February xx 2000
|
||||
|
@ -374,6 +374,14 @@ static void w_brag() {
|
||||
char buf[200];
|
||||
char* logo[6];
|
||||
|
||||
#if defined(__USE_NCURSES__)
|
||||
logo[0] = throw_strdup(" 88 88 88 ");
|
||||
logo[1] = throw_strdup(" oooooo oooooo 88 oooo88 oooooo oooo88 ");
|
||||
logo[2] = throw_strdup(" 88 88 88 88 88 88 88 88oo88 88 88 ");
|
||||
logo[3] = throw_strdup(" 88oo88 88oo88 88 88oo88 88oooo 88oo88 ");
|
||||
logo[4] = throw_strdup(" oo 88 ");
|
||||
logo[5] = throw_strdup(" 88oooooo88 ");
|
||||
#else
|
||||
if(W_BBRAG == 7) {
|
||||
logo[0] = throw_strdup(" ** ** ** ");
|
||||
logo[1] = throw_strdup(" ****** ****** ** ****** ****** ****** ");
|
||||
@ -383,7 +391,7 @@ static void w_brag() {
|
||||
logo[5] = throw_strdup(" ********** ");
|
||||
}
|
||||
else {
|
||||
#if defined(__UNIX__) and not defined(__USE_NCURSES__)
|
||||
#if defined(__UNIX__)
|
||||
if(gvid_xterm) {
|
||||
logo[0] = throw_strdup(" Ú¿ Ú¿ Ú¿ ");
|
||||
logo[1] = throw_strdup(" ÚÂÄÄ¿ ÚÂÄÄ¿ ³³ ÚÂÄÄ´³ ÚÂÄÄ¿ ÚÂÄÄ´³ ");
|
||||
@ -400,7 +408,7 @@ static void w_brag() {
|
||||
logo[3] = throw_strdup(" ÈÊÍ͹º ÈÊÍÍʼ ȼ ÈÊÍÍʼ ÈÊÍÍʼ ÈÊÍÍʼ ");
|
||||
logo[4] = throw_strdup(" É» ºº ");
|
||||
logo[5] = throw_strdup(" ÈÊÍÍÍÍÍÍʼ ");
|
||||
#if defined(__UNIX__) and not defined(__USE_NCURSES__)
|
||||
#if defined(__UNIX__)
|
||||
}
|
||||
gvid_boxcvt(logo[0]);
|
||||
gvid_boxcvt(logo[1]);
|
||||
@ -410,6 +418,7 @@ static void w_brag() {
|
||||
gvid_boxcvt(logo[5]);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
W_READ = wopen_(1, 2, MAXROW-4, MAXCOL-5, W_BBRAG, C_BRAGB, C_BRAGW);
|
||||
w_shadow();
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include <gkbdbase.h>
|
||||
#include <gmemall.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(__OS2__)
|
||||
#define INCL_BASE
|
||||
#include <os2.h>
|
||||
@ -98,11 +100,12 @@ void GKbd::Init() {
|
||||
intrflush(stdscr, FALSE);
|
||||
keypad(stdscr, TRUE);
|
||||
|
||||
// WARNING: this might break with another 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
|
||||
// it is quote useful most of the time :-) For other implementations of
|
||||
// curses, you might have to compile curses yourself to achieve this. -jt
|
||||
#if defined(NCURSES_VERSION)
|
||||
if(not getenv("ESCDELAY")) // If not specified by user via environment, set
|
||||
ESCDELAY = 50; // ms, slow for a 300bps terminal, fast for humans :-)
|
||||
#endif
|
||||
// For more ncurses-dependent code, look at the gkbd_curstable array
|
||||
|
@ -52,7 +52,7 @@ Grp::~Grp() {
|
||||
|
||||
multimap<int, grp_stock>::iterator i;
|
||||
for(currgrp = container.begin(); currgrp != container.end(); currgrp++)
|
||||
for(i = currgrp->second.find(GRP_MEMBER); i != currgrp->second.end(); i++) {
|
||||
for(i = currgrp->second.begin(); i != currgrp->second.end(); i++) {
|
||||
if(i->second.type == TYPE_OBJECT)
|
||||
throw_free(i->second.data.object_item);
|
||||
else if(i->second.type == TYPE_STRING)
|
||||
|
@ -1361,9 +1361,10 @@ void vscroll(int srow, int scol, int erow, int ecol, int atr, int lines) {
|
||||
// Does anyone know a better solution?
|
||||
|
||||
if(lines >= 0) {
|
||||
if (lines <= 1 + erow - srow) {
|
||||
vatch *buf = vsave (srow + lines, scol, erow, ecol);
|
||||
vrestore (buf, srow, scol, erow - lines, ecol);
|
||||
if(lines <= 1 + erow - srow) {
|
||||
vatch *buf = vsave(srow + lines, scol, erow, ecol);
|
||||
vrestore(buf, srow, scol, erow - lines, ecol);
|
||||
throw_xfree(buf);
|
||||
}
|
||||
else
|
||||
lines = 1 + erow - srow;
|
||||
@ -1374,9 +1375,10 @@ void vscroll(int srow, int scol, int erow, int ecol, int atr, int lines) {
|
||||
}
|
||||
else {
|
||||
lines*=-1;
|
||||
if (lines <= 1 + erow - srow) {
|
||||
vatch *buf = vsave (srow, scol, erow - lines, ecol);
|
||||
vrestore (buf, srow + lines, scol, erow, ecol);
|
||||
if(lines <= 1 + erow - srow) {
|
||||
vatch *buf = vsave(srow, scol, erow - lines, ecol);
|
||||
vrestore(buf, srow + lines, scol, erow, ecol);
|
||||
throw_xfree(buf);
|
||||
}
|
||||
else
|
||||
lines = 1 + erow - srow;
|
||||
|
Reference in New Issue
Block a user