version 1.21, 2005/06/17 12:12:28 |
version 1.22, 2005/07/01 19:33:35 |
|
|
display_width = MAX_COLS - 1; |
display_width = MAX_COLS - 1; |
|
|
/* now, allocate space for the screen buffer */ |
/* now, allocate space for the screen buffer */ |
screenbuf = malloc(display_lines * display_width); |
screenbuf = malloc(display_lines * display_width + 1); |
if (screenbuf == NULL) |
if (screenbuf == NULL) |
return (-1); |
return (-1); |
|
|
|
|
|
|
/* truncate the line to conform to our current screen width */ |
/* truncate the line to conform to our current screen width */ |
linebuf[display_width] = '\0'; |
linebuf[display_width] = '\0'; |
|
bufferline[display_width] = '\0'; |
|
|
/* is line higher than we went on the last display? */ |
/* is line higher than we went on the last display? */ |
if (linenum >= last_hi) { |
if (linenum >= last_hi) { |