components/ircii/patches/term-fixes.patch
author Geoffrey Gardella <geoffrey.gardella@oracle.com>
Fri, 15 May 2015 14:07:20 -0700
changeset 4298 aa030c46708c
parent 3974 221bc3d28397
permissions -rw-r--r--
21020797 Add "RO" to res1 field of auth_attr.d files in puppet
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3974
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
     1
Needed to get ircii to successfully build and run in 64-bit mode with Solaris
1304
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
libtermcap (really libcurses). Also need to have -DINCLUDE_CURSES_H
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
defined in the component Makefile.
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
3974
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
     5
On Linux systems you do not need to have -DINCLUDE_CURSES_H defined, in
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
     6
order to build ircii. The tgoto() routine has a prototype definition in
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
     7
/usr/include/termcap.h (supplied by the ncurses package), which is
1304
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
found by configure:
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
...
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
checking for termcap.h... yes
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
...
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
On Solaris, we do not have a /usr/include/termcap.h file. Therefore,
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
according to the curs_termcap(3CURSES) man page, for C sources files
3974
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    16
that want to use the tgoto() routine, we need to include both
1304
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
"#include <curses.h" and "#include <term.h>". For that we need to define
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
-DINCLUDE_CURSES_H and also patch it to include term.h
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
3974
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    20
But then we have another problem. /usr/include/term.h on Solaris has:
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    21
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    22
#define lines                           CUR _c3
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    23
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    24
which causes the pre-processor to screw up occurrences of variable "lines"
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    25
in two source files.
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    26
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    27
The patch needs to be reworked before it can be sent upstream. The Solaris
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    28
integration of termcap diverges from the way that Linux systems do this.
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    29
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    30
--- ircii-20141122/include/ircterm.h.orig	2015-03-18 09:31:15.080165469 -0700
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    31
+++ ircii-20141122/include/ircterm.h	2015-03-18 09:31:50.292380649 -0700
1304
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
@@ -39,6 +39,7 @@
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
 
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
 #ifdef INCLUDE_CURSES_H
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
 # include <curses.h>
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
+# include <term.h>
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
 #endif /* INCLUDE_CURSES_H */
428fd83fdeb2 16810032 ircii should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
 
3974
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    39
 #ifdef NCURSES_VERSION
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    40
--- ircii-20141122/source/lastlog.c.orig	2015-03-18 09:17:28.728033735 -0700
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    41
+++ ircii-20141122/source/lastlog.c	2015-03-18 09:36:08.526848734 -0700
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    42
@@ -48,7 +48,7 @@
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    43
 {
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    44
 	int	level;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    45
 	u_char	*msg;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    46
-	u_char	**lines;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    47
+	u_char	**log_lines;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    48
 	int	cols;	/* If this doesn't match the current columns,
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    49
 			 * we have to recalculate the whole thing. */
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    50
 	struct	lastlog_stru	*next;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    51
@@ -209,11 +209,11 @@
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    52
 static	void
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    53
 free_lastlog_lines(Lastlog *log)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    54
 {
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    55
-	u_char **lines;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    56
+	u_char **log_lines;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    57
 
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    58
-	for (lines = log->lines; *lines; lines++)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    59
-		new_free(lines);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    60
-	new_free(&log->lines);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    61
+	for (log_lines = log->log_lines; *log_lines; log_lines++)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    62
+		new_free(log_lines);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    63
+	new_free(&log->log_lines);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    64
 }
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    65
 
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    66
 static	void
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    67
@@ -499,7 +499,7 @@
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    68
 			malloc_strcpy(&new->msg, line);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    69
 			copy_window_size(NULL, &new->cols);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    70
 			Debug(DB_LASTLOG, "columns = %d", new->cols);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    71
-			new->lines = split_up_line_alloc(line);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    72
+			new->log_lines = split_up_line_alloc(line);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    73
 
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    74
 			if (info->lastlog_head)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    75
 				info->lastlog_head->prev = new;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    76
@@ -513,7 +513,7 @@
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    77
 		}
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    78
 	}
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    79
 	if (new)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    80
-		return new->lines;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    81
+		return new->log_lines;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    82
 	return NULL;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    83
 }
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    84
 
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    85
@@ -600,9 +600,9 @@
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    86
 			/* Must free and re-calculate */
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    87
 			free_lastlog_lines(LogLine);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    88
 			LogLine->cols = cols;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    89
-			LogLine->lines = split_up_line_alloc(LogLine->msg);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    90
+			LogLine->log_lines = split_up_line_alloc(LogLine->msg);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    91
 		}
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    92
-		TheirLines = LogLine->lines;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    93
+		TheirLines = LogLine->log_lines;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    94
 		for (row = 0; TheirLines[row]; row++)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    95
 			/* count the rows */;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    96
 		if (window)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    97
--- ircii-20141122/source/status.c.orig	2015-03-18 09:50:11.971051956 -0700
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    98
+++ ircii-20141122/source/status.c	2015-03-18 09:51:38.224735226 -0700
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
    99
@@ -1120,9 +1120,9 @@
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   100
 	u_char	*ptr = NULL;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   101
 	int	num;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   102
 	u_char	localbuf[40];
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   103
-	int	lines = window_held_lines(window);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   104
+	int	held_lines = window_held_lines(window);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   105
 
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   106
-	num = lines - lines % 10;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   107
+	num = held_lines - held_lines % 10;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   108
 	if (num)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   109
 	{
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   110
 		u_char	lbuf[BIG_BUFFER_SIZE];
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   111
@@ -1142,10 +1142,10 @@
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   112
 {
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   113
 	u_char	*ptr = NULL,
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   114
 		*text;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   115
-	int	lines = window_get_all_scrolled_lines(window);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   116
+	int	scrolled_lines = window_get_all_scrolled_lines(window);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   117
 
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   118
-	Debug(DB_STATUS, "status_scrolled: lines = %d", lines);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   119
-	if (lines && (text = get_string_var(STATUS_SCROLLED_VAR)))
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   120
+	Debug(DB_STATUS, "status_scrolled: lines = %d", scrolled_lines);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   121
+	if (scrolled_lines && (text = get_string_var(STATUS_SCROLLED_VAR)))
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   122
 		malloc_strcpy(&ptr, text);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   123
 	else
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   124
 		malloc_strcpy(&ptr, empty_string());
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   125
@@ -1157,20 +1157,20 @@
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   126
 {
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   127
 	u_char	*ptr = NULL;
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   128
 	u_char	localbuf[40];
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   129
-	int	lines = window_get_all_scrolled_lines(window);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   130
+	int	scrolled_lines = window_get_all_scrolled_lines(window);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   131
 
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   132
-	if (lines)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   133
+	if (scrolled_lines)
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   134
 	{
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   135
 		u_char	lbuf[BIG_BUFFER_SIZE];
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   136
 
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   137
-		snprintf(CP(localbuf), sizeof localbuf, "%d", lines);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   138
+		snprintf(CP(localbuf), sizeof localbuf, "%d", scrolled_lines);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   139
 		snprintf(CP(lbuf), sizeof lbuf, CP(hold_lines_format),
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   140
 			 localbuf);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   141
 		malloc_strcpy(&ptr, lbuf);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   142
 	}
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   143
 	else
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   144
 		malloc_strcpy(&ptr, empty_string());
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   145
-	Debug(DB_STATUS, "status_scrolled_lines: lines = %d, str = '%s'", lines, ptr);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   146
+	Debug(DB_STATUS, "status_scrolled_lines: lines = %d, str = '%s'", scrolled_lines, ptr);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   147
 	return (ptr);
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   148
 }
221bc3d28397 20729937 ircii should be updated to version 20141122
Rich Burridge <rich.burridge@oracle.com>
parents: 1304
diff changeset
   149