aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2009-05-08 23:45:27 +0000
committerXin LI <delphij@FreeBSD.org>2009-05-08 23:45:27 +0000
commite1193b7bca0eca8d5c2740fdfa576746303bb993 (patch)
treea3b19b698e154070851f613743d2c3b6467b5828 /screen.c
parentad5f463cf975eb6a9c4cb335fc2ce7a84c7d49a7 (diff)
downloadsrc-e1193b7bca0eca8d5c2740fdfa576746303bb993.tar.gz
src-e1193b7bca0eca8d5c2740fdfa576746303bb993.zip
Vendor import of less v429vendor/less/v429
Notes
Notes: svn path=/vendor/less/dist/; revision=191927 svn path=/vendor/less/v429/; revision=191928; tag=vendor/less/v429
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c37
1 files changed, 34 insertions, 3 deletions
diff --git a/screen.c b/screen.c
index 8e3a0607c666..f36424adbb6c 100644
--- a/screen.c
+++ b/screen.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1984-2007 Mark Nudelman
+ * Copyright (C) 1984-2008 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -1550,7 +1550,8 @@ init()
*/
for (i = 1; i < sc_height; i++)
putchr('\n');
- }
+ } else
+ line_left();
#else
#if MSDOS_COMPILER==WIN32C
if (!no_init)
@@ -1787,7 +1788,7 @@ win32_scroll_up(n)
/* Move the source text to the top of the screen. */
new_org.X = rcSrc.Left;
- new_org.Y = 0;
+ /* new_org.Y = rcClip.top; -- doesn't compile under MSVC6 */
/* Fill the right character and attributes. */
fillchar.Char.AsciiChar = ' ';
@@ -2469,3 +2470,33 @@ WIN32getch(tty)
return ((char)ascii);
}
#endif
+
+#if MSDOS_COMPILER
+/*
+ */
+ public void
+WIN32setcolors(fg, bg)
+ int fg;
+ int bg;
+{
+ SETCOLORS(fg, bg);
+}
+
+/*
+ */
+ public void
+WIN32textout(text, len)
+ char *text;
+ int len;
+{
+#if MSDOS_COMPILER==WIN32C
+ DWORD written;
+ WriteConsole(con_out, text, len, &written, NULL);
+#else
+ char c = text[len];
+ text[len] = '\0';
+ cputs(text);
+ text[len] = c;
+#endif
+}
+#endif