#define STARTCOL 0
#define STARTROW 3
-#define SECONDCOL 30
#define DISPROW 15
#define LISTMAX 50
#define LISTSIZE 32
int maxcol;
maxcol = COLS;
+
+/* I don't understand the point of this limitation. -jweiss 3/25/94
if (maxcol >= 80)
maxcol = 80;
-
+*/
cnt = 0;
printbuf = calloc((unsigned)maxcol, 1);
for (i = 0; i <= strlen(buf); i++) {
mvcur(0, 0, currow, STARTCOL);
refresh();
if (Prompt("--RETURN for more, ctl-c to exit--", buffer, 1, 0) == 0) {
- display_buff("Flushing query...");
+ erase_line(currow, STARTCOL);
+ show_text(currow, STARTCOL, "Flushing query...");
moreflg = 1;
return (0);
}
char *buff;
{
char *buffer;
+ int secondcol; /* where to start the second column of text */
+ secondcol = (COLS / 2); /* 1/2 was accross the screen */
num_members++;
if (moreflg)
return(0);
mvcur(0, 0, currow, STARTCOL);
refresh();
if (Prompt("--RETURN for more, ctl-c to exit--", buffer, 1, 0) == 0) {
- display_buff("Flushing query...");
+ erase_line(currow, STARTCOL);
+ show_text(currow, STARTCOL, "Flushing query...");
moreflg = 1;
return (0);
}
if (!toggle)
show_text(currow, STARTCOL, buff);
else {
- show_text(currow, SECONDCOL, buff);
+ erase_line(currow, secondcol-1); /* in case the 1st col is too long */
+ show_text(currow, secondcol, buff);
currow++;
}
toggle = !toggle;
mvcur(0, 0, row, col);
addstr(buff);
refresh();
+ free(buff); /* close mem. leak */
}
/****************************************************/
int maxcol;
maxcol = COLS;
+/* I don't understand the point of this limitation. -jweiss 3/25/94
+ and I believe it was preventing the window from being cleared properly.
if (maxcol > 80)
- maxcol = 80; /* limit width */
+ maxcol = 80; */ /* limit width */
buff = calloc((unsigned)maxcol + 1, 1);
for (i = 0; i <= maxcol - 1; i++)
addstr(buff);
mvcur(erase_row, STARTCOL, STARTROW + oldpos[level] - 1, STARTCOL);
refresh();
+ free (buff); /* fix mem. leak */
}
/****************************************************/