1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-22 06:38:37 -05:00

Remove diagnostics and attempt to work around VC compiler bug :-(

[originally from svn r1096]
This commit is contained in:
Simon Tatham 2001-05-03 10:10:53 +00:00
parent 56a5e6fdf3
commit 059998d17b
3 changed files with 21 additions and 35 deletions

View File

@ -50,12 +50,12 @@
##-- ##--
# Enable debug and incremental linking and compiling # Enable debug and incremental linking and compiling
CFLAGS = /W3 /YX /Yd /O1 /Gi /D_WINDOWS /DDEBUG # CFLAGS = /nologo /W3 /YX /Yd /O1 /Gi /D_WINDOWS /DDEBUG
LFLAGS = /debug # LFLAGS = /debug
# Disable debug and incremental linking and compiling # Disable debug and incremental linking and compiling
#CFLAGS = /nologo /W3 /O1 /D_WINDOWS CFLAGS = /nologo /W3 /O1 /D_WINDOWS
#LFLAGS = /incremental:no /fixed LFLAGS = /incremental:no /fixed
# Use MSVC DLL # Use MSVC DLL
# CFLAGS = /nologo /W3 /O1 /MD /D_WINDOWS # CFLAGS = /nologo /W3 /O1 /MD /D_WINDOWS

View File

@ -350,9 +350,6 @@ void term_size(int newrows, int newcols, int newsavelines) {
alt_t = marg_t = 0; alt_t = marg_t = 0;
alt_b = marg_b = newrows - 1; alt_b = marg_b = newrows - 1;
debug(("term_size, old r,c,s (%d,%d,%d), new rcs (%d,%d,%d)\n",
rows, cols, savelines, newrows, newcols, newsavelines));
if (rows == -1) { if (rows == -1) {
scrollback = newtree234(NULL); scrollback = newtree234(NULL);
screen = newtree234(NULL); screen = newtree234(NULL);
@ -380,32 +377,22 @@ void term_size(int newrows, int newcols, int newsavelines) {
* away. * away.
*/ */
sblen = count234(scrollback); sblen = count234(scrollback);
debug(("newrows=%d rows=%d sblen=%d\n", newrows, rows, sblen)); /* Do this loop to expand the screen if newrows > rows */
if (newrows > rows) { for (i = rows; i < newrows; i++) {
for (i = rows; i < newrows; i++) { if (sblen > 0) {
debug(("increase screen: i=%d\n", i)); line = delpos234(scrollback, --sblen);
if (sblen > 0) { } else {
debug(("sblen=%d so use line from scrollback\n", sblen)); line = smalloc(TSIZE * (newcols+2));
line = delpos234(scrollback, --sblen); line[0] = newcols;
} else { for (j = 0; j <= newcols; j++)
debug(("sblen=%d so make up a new line\n", sblen)); line[j+1] = ERASE_CHAR;
line = smalloc(TSIZE * (newcols+2)); }
line[0] = newcols; addpos234(screen, line, 0);
for (j = 0; j <= newcols; j++) }
line[j+1] = ERASE_CHAR; /* Do this loop to shrink the screen if newrows < rows */
} for (i = newrows; i < rows; i++) {
debug(("got new screen line %p\n", line)); line = delpos234(screen, 0);
addpos234(screen, line, 0); addpos234(scrollback, line, sblen++);
}
} else if (newrows < rows) {
for (i = newrows; i < rows; i++) {
debug(("decrease screen: i=%d\n", i));
line = delpos234(screen, 0);
debug(("taken out line %p, count is now %d\n",
line, count234(screen)));
addpos234(scrollback, line, sblen++);
debug(("added to scrollback, sblen is now %d\n", sblen));
}
} }
assert(count234(screen) == newrows); assert(count234(screen) == newrows);
while (sblen > newsavelines) { while (sblen > newsavelines) {

View File

@ -39,8 +39,7 @@
#ifdef TEST #ifdef TEST
#define LOG(x) (printf x) #define LOG(x) (printf x)
#else #else
// FIXME #define LOG(x)
#define LOG(x) (dprintf x)
#endif #endif
typedef struct node234_Tag node234; typedef struct node234_Tag node234;