summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/tscroll.c
diff options
context:
space:
mode:
authorsef <sef@FreeBSD.org>1994-08-13 23:15:38 +0000
committersef <sef@FreeBSD.org>1994-08-13 23:15:38 +0000
commit75d40fe0bd2b890ceffb238a53e26b30cee120de (patch)
treebbb514854ed4891d87f8d7be9bbcca0b27533595 /lib/libcurses/tscroll.c
parent5769d4da59542affce5fd4e48c98355e45206254 (diff)
downloadFreeBSD-src-75d40fe0bd2b890ceffb238a53e26b30cee120de.zip
FreeBSD-src-75d40fe0bd2b890ceffb238a53e26b30cee120de.tar.gz
Brought the 2.0 libcurses up-to-date with the current 4.4 stuff, as
distributed in keith bostic's nvi (got his permission first). Most changes are cosmetic, but a few errors (mostly in tty..c) were cleared up. Reviewed by: Sean Eric Fagan
Diffstat (limited to 'lib/libcurses/tscroll.c')
-rw-r--r--lib/libcurses/tscroll.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libcurses/tscroll.c b/lib/libcurses/tscroll.c
index db7eda9..359b396 100644
--- a/lib/libcurses/tscroll.c
+++ b/lib/libcurses/tscroll.c
@@ -32,10 +32,10 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)tscroll.c 8.2 (Berkeley) 4/15/94";
+static char sccsid[] = "@(#)tscroll.c 8.4 (Berkeley) 7/27/94";
#endif /* not lint */
-#include <curses.h>
+#include "curses.h"
#define MAXRETURNSIZE 64
@@ -61,17 +61,17 @@ static char sccsid[] = "@(#)tscroll.c 8.2 (Berkeley) 4/15/94";
* all other characters are ``self-inserting''.
*/
char *
-__tscroll(cap, n)
+__tscroll(cap, n1, n2)
const char *cap;
- int n;
+ int n1, n2;
{
static char result[MAXRETURNSIZE];
- int c;
+ int c, n;
char *dp;
if (cap == NULL)
goto err;
- for (dp = result; (c = *cap++) != '\0';) {
+ for (n = n1, dp = result; (c = *cap++) != '\0';) {
if (c != '%') {
*dp++ = c;
continue;
@@ -93,6 +93,7 @@ __tscroll(cap, n)
case '2':
two: *dp++ = n / 10 | '0';
one: *dp++ = n % 10 | '0';
+ n = n2;
continue;
case '>':
if (n > *cap++)
OpenPOWER on IntegriCloud