summaryrefslogtreecommitdiff
path: root/usr/src/boot/lib/libstand/pager.c
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-12-01 22:31:08 +0200
committerHans Rosenfeld <hans.rosenfeld@joyent.com>2019-01-07 10:11:18 +0100
commit9890ff8357a674572254e0be06b175a1e8eab4b0 (patch)
tree3b4b3a2b61f0cd74bd99b547f6e87c2688b4e122 /usr/src/boot/lib/libstand/pager.c
parentf33b666290305a2b2c134d23cbd1e70e06bf36fd (diff)
downloadillumos-joyent-9890ff8357a674572254e0be06b175a1e8eab4b0.tar.gz
10028 loader: implement framebuffer console
10029 common/font: create shared font.c 10030 import pnglite into usr/src/common/pnglite 8918 loader.efi: add vesa edid support 10031 loader: import tem for loader console 10032 loader: implement tem utf-8 support 10033 ficl: add simple gfx words 10034 loader: use term-drawrect for menu frame 10035 loader: add alpha blending for gfx_fb 10036 ficl: add fb-putimage 10037 loader: add illumos.png logo 10038 loader: replace gop and vesa with framebuffer 10039 loader: build rules for new font setup 10040 loader: gfx use GOP Blt() function in visual_io callbacks Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Diffstat (limited to 'usr/src/boot/lib/libstand/pager.c')
-rw-r--r--usr/src/boot/lib/libstand/pager.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr/src/boot/lib/libstand/pager.c b/usr/src/boot/lib/libstand/pager.c
index a966b0bd79..a916ea3cb6 100644
--- a/usr/src/boot/lib/libstand/pager.c
+++ b/usr/src/boot/lib/libstand/pager.c
@@ -1,4 +1,4 @@
-/*-
+/*
* Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
* All rights reserved.
*
@@ -28,7 +28,6 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
#include "stand.h"
#include <string.h>
@@ -36,8 +35,10 @@ __FBSDID("$FreeBSD$");
static int p_maxlines = -1;
static int p_freelines;
-static char *pager_prompt1 = " --more-- <space> page down <enter> line down <q> quit ";
-static char *pager_blank = " ";
+static char *pager_prompt1 = \
+ " --more-- <space> page down <enter> line down <q> quit ";
+static char *pager_blank = \
+ " ";
/*
* 'open' the pager
@@ -47,9 +48,9 @@ pager_open(void)
{
int nlines;
char *cp, *lp;
-
+
nlines = 24; /* sensible default */
- if ((cp = getenv("LINES")) != NULL) {
+ if ((cp = getenv("screen-#rows")) != NULL) {
nlines = strtol(cp, &lp, 0);
}
@@ -85,11 +86,11 @@ pager_output(const char *cp)
if (cp == NULL)
return(0);
-
+
for (;;) {
if (*cp == 0)
return(0);
-
+
putchar(*cp); /* always emit character */
if (*(cp++) == '\n') { /* got a newline? */
@@ -134,7 +135,7 @@ pager_file(const char *fname)
size_t hmuch;
int fd;
int result;
-
+
if ((fd = open(fname, O_RDONLY)) == -1) {
printf("can't open '%s': %s\n", fname, strerror(errno));
return(-1);