terminal-emulator.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* ANSI terminal emulator module; parse ANSI X3.64 escape sequences and
* the like.
*/
#include <sys/visual_io.h>
#include <sys/tem_impl.h>
#include <sys/terminal-emulator.h>
/* Terminal emulator functions */
static int tem_setup_terminal(struct vis_devinit *,
struct terminal_emulator *);
static void tem_control(struct terminal_emulator *, unsigned char,
cred_t *, enum called_from);
static void tem_setparam(struct terminal_emulator *, int, int);
static void tem_selgraph(struct terminal_emulator *);
static void tem_chkparam(struct terminal_emulator *, unsigned char,
cred_t *, enum called_from);
static void tem_getparams(struct terminal_emulator *, unsigned char,
cred_t *, enum called_from);
static void tem_outch(struct terminal_emulator *, unsigned char,
cred_t *, enum called_from);
static void tem_parse(struct terminal_emulator *, unsigned char,
cred_t *, enum called_from);
static void tem_new_line(struct terminal_emulator *,
cred_t *, enum called_from);
static void tem_cr(struct terminal_emulator *);
static void tem_lf(struct terminal_emulator *,
cred_t *, enum called_from);
enum called_from);
static void tem_align_cursor(struct terminal_emulator *);
static void tem_cls(struct terminal_emulator *,
cred_t *, enum called_from);
static void tem_clear_entire(struct terminal_emulator *,
cred_t *, enum called_from);
static void tem_reset_emulator(struct terminal_emulator *);
static void tem_reset_colormap(struct terminal_emulator *,
cred_t *, enum called_from);
static void tem_reset_display(struct terminal_emulator *,
cred_t *, enum called_from, int);
static void tem_tab(struct terminal_emulator *,
cred_t *, enum called_from);
static void tem_back_tab(struct terminal_emulator *,
cred_t *, enum called_from);
static void tem_clear_tabs(struct terminal_emulator *, int);
static void tem_set_tab(struct terminal_emulator *);
static void tem_mv_cursor(struct terminal_emulator *, int, int,
cred_t *, enum called_from);
static void tem_shift(struct terminal_emulator *, int, int,
cred_t *, enum called_from);
static void tem_scroll(struct terminal_emulator *, int, int,
int, int, cred_t *, enum called_from);
static void tem_free(struct terminal_emulator *);
static void tem_terminal_emulate(struct terminal_emulator *,
unsigned char *, int, cred_t *, enum called_from);
static void tem_text_display(struct terminal_emulator *, unsigned char *,
int, screen_pos_t, screen_pos_t,
cred_t *, enum called_from);
static void tem_text_copy(struct terminal_emulator *,
cred_t *, enum called_from);
static void tem_text_cursor(struct terminal_emulator *, short,
cred_t *, enum called_from);
static void tem_pix_display(struct terminal_emulator *, unsigned char *,
int, screen_pos_t, screen_pos_t,
cred_t *, enum called_from);
static void tem_pix_copy(struct terminal_emulator *,
cred_t *, enum called_from);
enum called_from);
enum called_from called_from);
static void tem_reset_colormap(struct terminal_emulator *,
cred_t *, enum called_from);
int ansi);
int ansi);
enum called_from called_from);
enum called_from called_from);
enum called_from called_from);
#ifdef HAVE_1BIT
static void bit_to_pix1(struct terminal_emulator *, unsigned char,
#endif
static void bit_to_pix4(struct terminal_emulator *, unsigned char,
static void bit_to_pix8(struct terminal_emulator *, unsigned char,
static void bit_to_pix24(struct terminal_emulator *, unsigned char,
extern bitmap_data_t builtin_font_data;
}
#define NELEM(a) (sizeof (a) / sizeof (*(a)))
/*
* Globals
*/
int default_ansi_bg = 0; /* BLACK */
extern struct mod_ops mod_miscops;
&mod_miscops, /* modops */
"ANSI Terminal Emulator", /* name */
};
static struct modlinkage modlinkage = {
};
int
_init(void)
{
int ret;
if (ret != 0)
return (ret);
if (ret != 0) {
(void) mod_remove(&modlinkage);
return (ret);
}
return (0);
}
int
_fini()
{
int ret;
if (ret == 0) {
}
return (ret);
}
int
{
}
};
int
{
int lyr_rval;
/*
* Allow layered on driver to clean up console private
* data.
*/
/*
* Close layered on driver
*/
}
return (0);
}
/*
* This is the main entry point to the module. It handles output requests
* during normal system operation, when (e.g.) mutexes are available.
*/
int
struct terminal_emulator *tem,
unsigned char *buf,
int len,
{
static int first_time = 1;
return (ENXIO);
}
/*
* Realign the console cursor. We did this in tem_init().
* However, drivers in the console stream may emit additional
* messages before we are ready. This causes text overwrite
* on the screen. This is a workaround.
*/
}
first_time = 0;
return (0);
}
/*
* This entry point handles output requests from restricted contexts like
* kmdb, where services like mutexes are not available.
*/
int
struct terminal_emulator *tem,
unsigned char *buf,
int len)
{
return (ENXIO);
if (tem->standalone_writes_ok) {
}
return (0);
}
int
struct terminal_emulator **ptem,
char *pathname,
int default_rows,
int default_cols)
{
struct vis_devinit temargs;
struct terminal_emulator *tem;
char *pathbuf;
tem = (struct terminal_emulator *)
/*
* Open the layered device using the devfs physical device name
* after adding the /devices prefix.
*/
goto fail_1;
}
goto fail_1;
}
/*
* Initialize the console and get the device parameters
*/
goto fail_2;
}
/*
* Initialize the terminal emulator
*/
if (err != 0) {
"terminal-emulator: terminal emulator initialization failed.");
goto fail_3;
}
/*
* Allow standalone writes.
*/
return (0);
/*
* Allow layered driver to clean up console private
* data.
*/
return (err);
}
static int
{
int i;
/* Make sure the fb driver and terminal emulator versions match */
return (EINVAL);
}
case VIS_TEXT:
tem->a_blank_line = (unsigned char *)
break;
case VIS_PIXEL:
/*
* First check to see if the user has specified a screen size.
* If so, use those values. Else use 34x80 as the default.
*/
else
else
/*
* set_font() will select a appropriate sized font for
* the number of rows and columns selected. If we don't
* have a font that will fit, then it will use the
* default builtin font and adjust the rows and columns
* to fit on the screen.
*/
#if defined(HAVE_1BIT)
case 1:
break;
#endif /* HAVE_1BIT */
case 4:
break;
case 8:
break;
case 24:
break;
}
break;
default:
return (ENXIO);
}
return (0);
}
static void
{
return;
}
/*
* This is the main entry point into the terminal emulator.
*
* For each data message coming downstream, ANSI assumes that it is composed
* of ASCII characters, which are treated as a byte-stream input to the
* parsing state machine. All data is parsed immediately -- there is
* no enqueing.
*/
static void
struct terminal_emulator *tem,
unsigned char *buf,
int len,
enum called_from called_from)
{
/*
* Send the data we just got to the framebuffer.
*/
}
static void
{
unsigned char r[1], b[1], g[1];
int rval;
if (called_from == CALLED_FROM_STANDALONE)
return;
r[0] = 0xff;
b[0] = 0xff;
g[0] = 0xff;
r[0] = 0;
b[0] = 0;
g[0] = 0;
}
/*
* send the appropriate control message or set state based on the
* value of the control character ch
*/
static void
struct terminal_emulator *tem,
unsigned char ch,
enum called_from called_from)
{
switch (ch) {
case A_BEL:
break;
case A_BS:
credp, called_from);
break;
case A_HT:
break;
case A_NL:
/*
* tem_send_data(tem, credp, called_from);
* tem_new_line(tem, credp, called_from);
* break;
*/
case A_VT:
break;
case A_FF:
break;
case A_CR:
break;
case A_ESC:
break;
case A_CSI:
{
int i;
tem->a_curparam = 0;
tem->a_paramval = 0;
/* clear the parameters */
for (i = 0; i < TEM_MAXPARAMS; i++)
}
break;
case A_GS:
break;
default:
break;
}
}
/*
* if parameters [0..count - 1] are not set, set them to the value of newparam.
*/
static void
{
int i;
for (i = 0; i < count; i++) {
}
}
/*
* select graphics mode based on the param vals stored in a_params
*/
static void
{
int curparam;
int count = 0;
int param;
do {
switch (param) {
case -1:
case 0:
} else {
}
break;
case 1: /* Bold Intense */
break;
case 5: /* Blink */
break;
case 7: /* Reverse video */
} else {
}
break;
case 30: /* black (grey) foreground */
case 31: /* red (light red) foreground */
case 32: /* green (light green) foreground */
case 33: /* brown (yellow) foreground */
case 34: /* blue (light blue) foreground */
case 35: /* magenta (light magenta) foreground */
case 36: /* cyan (light cyan) foreground */
case 37: /* white (bright white) foreground */
break;
case 40: /* black (grey) background */
case 41: /* red (light red) background */
case 42: /* green (light green) background */
case 43: /* brown (yellow) background */
case 44: /* blue (light blue) background */
case 45: /* magenta (light magenta) background */
case 46: /* cyan (light cyan) background */
case 47: /* white (bright white) background */
break;
default:
break;
}
count++;
curparam--;
} while (curparam > 0);
}
/*
* perform the appropriate action for the escape sequence
*
* General rule: This code does not validate the arguments passed.
* It assumes that the next lower level will do so.
*/
static void
struct terminal_emulator *tem,
unsigned char ch,
enum called_from called_from)
{
int i;
int row;
int col;
switch (ch) {
case 'm': /* select terminal graphics mode */
break;
case '@': /* insert char */
credp, called_from);
break;
case 'A': /* cursor up */
credp, called_from);
break;
case 'd': /* VPA - vertical position absolute */
credp, called_from);
break;
case 'e': /* VPR - vertical position relative */
case 'B': /* cursor down */
credp, called_from);
break;
case 'a': /* HPR - horizontal position relative */
case 'C': /* cursor right */
credp, called_from);
break;
case '`': /* HPA - horizontal position absolute */
credp, called_from);
break;
case 'D': /* cursor left */
credp, called_from);
break;
case 'E': /* CNL cursor next line */
credp, called_from);
break;
case 'F': /* CPL cursor previous line */
credp, called_from);
break;
case 'G': /* cursor horizontal position */
credp, called_from);
break;
case 'g': /* clear tabs */
break;
case 'f': /* HVP Horizontal and Vertical Position */
case 'H': /* CUP position cursor */
credp, called_from);
break;
case 'I': /* CHT - Cursor Horizontal Tab */
/* Not implemented */
break;
case 'J': /* ED - Erase in Display */
case 0:
/* erase cursor to end of screen */
/* FIRST erase cursor to end of line */
/* THEN erase lines below the cursor */
row++) {
}
break;
case 1:
/* erase beginning of screen to cursor */
/* FIRST erase lines above the cursor */
for (row = 0;
row++) {
}
/* THEN erase beginning of line to cursor */
break;
case 2:
/* erase whole screen */
for (row = 0;
row++) {
}
break;
}
break;
case 'K': /* EL - Erase in Line */
case 0:
/* erase cursor to end of line */
break;
case 1:
/* erase beginning of line to cursor */
break;
case 2:
/* erase whole line */
break;
}
break;
case 'L': /* insert line */
break;
case 'M': /* delete line */
break;
case 'P': /* DCH - delete char */
credp, called_from);
break;
case 'S': /* scroll up */
tem_scroll(tem, 0,
break;
case 'T': /* scroll down */
tem_scroll(tem, 0,
break;
case 'X': /* erase char */
break;
case 'Z': /* cursor backward tabulation */
/*
* Rule exception - We do sanity checking here.
*
* Restrict the count to a sane value to keep from
* looping for a long time. There can't be more than one
* tab stop per column, so use that as a limit.
*/
break;
}
}
/*
* Gather the parameters of an ANSI escape sequence
*/
static void
{
return; /* Return immediately */
}
case A_STATE_ESC_Q: /* <ESC>Q<num> ? */
break;
case A_STATE_ESC_Q_DELM: /* <ESC>Q<num><delm> ? */
/* End of <ESC> sequence */
} else if (ch == '^')
/* Control char escaped with '^'? */
/* Read control character next */
else if (ch != '\0') {
/* Not a null? Add to string */
/* End of <ESC> sequence */
}
break;
case A_STATE_ESC_Q_DELM_CTRL: /* Contrl character escaped with '^' */
/* End of <ESC> sequence */
}
break;
default: /* All other states */
if (tem->a_gotparam) {
/*
* Too many parameters. Abort the
* sequence.
*/
break;
}
/*
* Previous number parameter? Save and
* point to next free parameter.
*/
tem->a_curparam++;
}
if (ch == ';') {
/* Multiple param separator? */
/* Restart parameter search */
} else /* Regular letter */
/* Handle escape sequence */
break;
}
}
/*
* Add character to internal buffer.
* When its full, send it to the next layer.
*/
static void
{
/* buffer up the character until later */
}
}
static void
{
}
static void
{
}
static void
{
int row;
/*
* Sanity checking notes:
* . a_nscroll was validated when it was set.
* . Regardless of that, tem_scroll and tem_mv_cursor will prevent
* anything bad from happening.
*/
tem_scroll(tem, 0,
} else { /* no scroll */
/*
* implement Esc[#r when # is zero. This means no
* scroll but just return cursor to top of screen,
* do not clear screen.
*/
row = 0;
}
}
credp, called_from);
/* erase rest of cursor line */
}
}
static void
enum called_from called_from)
{
if (tem->a_outindex != 0) {
} else {
}
/*
* Call the primitive to render this data.
*/
credp, called_from);
tem->a_outindex = 0;
}
}
/*
* We have just done something to the current output point. Reset the start
* point for the buffered data in a_outbuf. There shouldn't be any data
* buffered yet.
*/
static void
{
}
/*
* State machine parser based on the current state and character input
* major terminations are to control character or normal character
*/
static void
{
int i;
else
/* Display */
} else { /* In <ESC> sequence */
/* Need to get parameters? */
switch (ch) {
case '?':
return;
case '=':
return;
case 's':
/*
* As defined below, this sequence
* saves the cursor. However, Sun
* defines ESC[s as reset. We resolved
* the conflict by selecting reset as it
* is exported in the termcap file for
* sun-mon, while the "save cursor"
* definition does not exist anywhere in
* However, having no coherent
* definition of reset, we have not
* implemented it.
*/
/*
* Original code
* tem->a_r_cursor.row =
* tem->a_c_cursor.row;
* tem->a_r_cursor.col =
* tem->a_c_cursor.col;
* tem->a_state = A_STATE_START;
*/
return;
case 'u':
credp, called_from);
return;
case 'p': /* sunbow */
/*
* Don't set anything if we are
* already as we want to be.
*/
/*
* If we have switched the
* characters to be the
* inverse from the screen,
* then switch them as well
* to keep them the inverse
* of the screen.
*/
} else {
}
}
if (tem->display_mode ==
VIS_PIXEL) {
credp, called_from);
} else {
credp, called_from);
}
return;
case 'q': /* sunwob */
/*
* Don't set anything if we are
* already where as we want to be.
*/
/*
* If we have switched the
* characters to be the
* inverse from the screen,
* then switch them as well
* to keep them the inverse
* of the screen.
*/
TEM_ATTR_REVERSE)) {
} else {
}
}
if (tem->display_mode ==
VIS_PIXEL) {
credp, called_from);
} else {
credp, called_from);
}
return;
case 'r': /* sunscrl */
/*
* Rule exception: check for
* validity here.
*/
}
return;
}
}
} else { /* Previous char was <ESC> */
if (ch == '[') {
tem->a_curparam = 0;
tem->a_paramval = 0;
/* clear the parameters */
for (i = 0; i < TEM_MAXPARAMS; i++)
tem->a_curparam = 0;
tem->a_paramval = 0;
for (i = 0; i < TEM_MAXPARAMS; i++)
/* Next get params */
tem->a_curparam = 0;
tem->a_paramval = 0;
for (i = 0; i < TEM_MAXPARAMS; i++)
/* Next get params */
} else {
if (ch == 'c')
/* ESC c resets display */
called_from, 1);
else if (ch == 'H')
/* ESC H sets a tab */
else if (ch == '7') {
/* ESC 7 Save Cursor position */
} else if (ch == '8')
/* ESC 8 Restore Cursor position */
/* check for control chars */
else if (ch < ' ')
else
}
}
}
}
/* ARGSUSED */
static void
{
if (called_from == CALLED_FROM_STANDALONE)
else
}
static void
{
int row;
int lines_affected;
if (count > lines_affected)
if (count <= 0)
return;
switch (direction) {
case TEM_SCROLL_UP:
if (count < lines_affected) {
0, start,
credp, called_from);
}
}
break;
case TEM_SCROLL_DOWN:
if (count < lines_affected) {
0, start,
credp, called_from);
}
}
break;
}
}
static void
{
int rows;
int cols;
return;
return;
return;
credp, called_from);
}
static void
enum called_from called_from)
{
count < 0)
return;
/*
* Note that very large values of "count" could cause col+count
* to overflow, so we check "count" independently.
*/
}
static void
{
struct vis_consdisplay da;
}
static void
{
struct vis_conscopy ma;
}
static void
enum called_from called_from)
{
struct vis_consdisplay da;
} else {
}
}
void
{
struct vis_consdisplay da;
int i;
for (i = 0; i < count; i++) {
}
}
static void
enum called_from called_from)
{
struct vis_conscopy ma;
}
void
enum called_from called_from)
{
struct vis_consdisplay da;
int i;
} else {
}
for (i = 0; i < count; i++) {
}
}
static void
{
int i;
tabstop = 0;
break;
}
}
}
static void
{
int i;
break;
}
}
}
static void
{
int i;
int j;
return;
return;
}
return;
return;
}
}
}
static void
{
int i;
int j;
switch (action) {
case 3: /* clear all tabs */
break;
case 0: /* clr tab at cursor */
return;
}
}
break;
}
}
static void
enum called_from called_from)
{
int row;
int nrows;
int col;
int ncols;
struct vis_consdisplay da;
} else {
}
}
}
}
static void
{
int row;
}
}
static void
{
/*
* Sanity check and bounds enforcement. Out of bounds requests are
* clipped to the screen boundaries. This seems to be what SPARC
* does.
*/
if (row < 0)
row = 0;
if (col < 0)
col = 0;
}
static void
{
int j;
tem->a_outindex = 0;
tem->a_curparam = 0;
tem->a_paramval = 0;
/*
* set up the initial tab stops
*/
for (j = 0; j < TEM_MAXPARAMS; j++)
}
static void
{
} else if (clear_txt) {
} else {
/* ask driver where cursor is */
}
}
static void
struct terminal_emulator *tem,
int count,
int direction,
enum called_from called_from)
{
int rest_of_line;
if (count > rest_of_line)
if (count <= 0)
return;
switch (direction) {
case TEM_SHIFT_LEFT:
if (count < rest_of_line) {
credp, called_from);
}
break;
case TEM_SHIFT_RIGHT:
if (count < rest_of_line) {
credp, called_from);
}
break;
}
}
static void
{
struct vis_conscursor ca;
if (action == VIS_GET_CURSOR) {
}
}
static void
{
struct vis_conscursor ca;
tem->a_p_offset.y;
tem->a_p_offset.x;
} else {
}
} else {
}
}
}
static void
{
/*
* Find best font for these dimensions, or use default
*
* The plus 2 is to make sure we have at least a 1 pixel
* boarder around the entire screen.
*/
break;
}
}
/*
* The minus 2 is to make sure we have at least a 1 pixel
* boarder around the entire screen.
*/
}
}
sizeof (f->char_ptr));
/* Free extra data structures and bitmaps */
}
}
}
#if defined(HAVE_1BIT)
/*
* bit_to_pix1 is for 1-bit frame buffers. It will essentially pass-through
* the bitmap, possibly inverting it for reverse video.
*
* An input data byte of 0x53 will output the bit pattern 01010011.
*
* NEEDSWORK: Does this properly handle fonts that are not a multiple
* of 8 pixels wide?
*/
static void
struct terminal_emulator *tem,
unsigned char c,
{
int row;
int i;
int bytesWide;
unsigned short flags;
for (i = 0; i < bytesWide; i++) {
if (flags & TEM_ATTR_REVERSE) {
} else {
}
}
}
}
#endif /* HAVE_1BIT */
/*
* bit_to_pix4 is for 4-bit frame buffers. It will write one output byte
* for each 2 bits of input bitmap. It inverts the input bits before
* doing the output translation, for reverse video.
*
* Assuming foreground is 0001 and background is 0000...
* An input data byte of 0x53 will output the bit pattern
* 00000001 00000001 00000000 00010001.
*/
static void
struct terminal_emulator *tem,
unsigned char c,
{
int row;
int byte;
int i;
int bytesWide;
for (i = 0; i < 4; i++) {
switch (nibblett) {
case 0x0:
break;
case 0x1:
break;
case 0x2:
break;
case 0x3:
break;
}
}
}
}
}
/*
* bit_to_pix8 is for 8-bit frame buffers. It will write one output byte
* for each bit of input bitmap. It inverts the input bits before
* doing the output translation, for reverse video.
*
* Assuming foreground is 00000001 and background is 00000000...
* An input data byte of 0x53 will output the bit pattern
* 0000000 000000001 00000000 00000001 00000000 00000000 00000001 00000001.
*/
static void
struct terminal_emulator *tem,
unsigned char c,
{
int row;
int byte;
int i;
int bytesWide;
mask = 0x80;
for (i = 0; i < nbits; i++) {
}
}
}
}
/*
* bit_to_pix24 is for 24-bit frame buffers. It will write four output bytes
* for each bit of input bitmap. It inverts the input bits before
* doing the output translation, for reverse video.
*
* Assuming foreground is 00000000 11111111 11111111 11111111
* and background is 00000000 00000000 00000000 00000000
* An input data byte of 0x53 will output the bit pattern
*
* 00000000 00000000 00000000 00000000
* 00000000 11111111 11111111 11111111
* 00000000 00000000 00000000 00000000
* 00000000 11111111 11111111 11111111
* 00000000 00000000 00000000 00000000
* 00000000 00000000 00000000 00000000
* 00000000 11111111 11111111 11111111
* 00000000 11111111 11111111 11111111
*
* FYI this is a pad byte followed by 1 byte each for R,G, and B.
*/
/*
* A 24-bit pixel trapped in a 32-bit body.
*/
/*
* Union for working with 24-bit pixels in 0RGB form, where the
* bytes in memory are 0 (a pad byte), red, green, and blue in that order.
*/
union pixel32_0RGB {
struct {
char pad;
char red;
char green;
char blue;
} bytes;
};
struct {
unsigned char red[16];
unsigned char green[16];
unsigned char blue[16];
} solaris_to_24 = {
/* BEGIN CSTYLED */
/* Wh+ Bk Bl Gr Cy Rd Mg Br Wh Bk+ Bl+ Gr+ Cy+ Rd+ Mg+ Yw */
255,000,000,000,000,128,128,128,128, 64,000,000,000,255,255,255,
255,000,000,128,128,000,000,128,128, 64,000,255,255,000,000,255,
255,000,128,000,128,000,128,000,128, 64,255,000,255,000,255,000,
/* END CSTYLED */
};
static void
struct terminal_emulator *tem,
unsigned char c,
{
int row;
int byte;
int i;
int bytesWide;
union pixel32_0RGB fg_color;
union pixel32_0RGB bg_color;
for (i = 0; i < nbits; i++) {
data <<= 1;
}
}
}
}
typedef enum solaris_colors {
solaris_brt_white = 0,
solaris_black = 1,
solaris_blue = 2,
solaris_green = 3,
solaris_cyan = 4,
solaris_red = 5,
solaris_magenta = 6,
solaris_brown = 7,
solaris_white = 8,
solaris_grey = 9,
solaris_brt_blue = 10,
solaris_brt_green = 11,
solaris_brt_cyan = 12,
solaris_brt_red = 13,
solaris_brt_magenta = 14,
solaris_yellow = 15
solaris_black, /* 0 - black */
solaris_red, /* 1 - red */
solaris_green, /* 2 - green */
solaris_brown, /* 3 - brown */
solaris_blue, /* 4 - blue */
solaris_magenta, /* 5 - magenta */
solaris_cyan, /* 6 - cyan */
solaris_white /* 7 - white */
};
solaris_black, /* 0 - black */
solaris_red, /* 1 - red */
solaris_green, /* 2 - green */
solaris_brown, /* 3 - brown */
solaris_blue, /* 4 - blue */
solaris_magenta, /* 5 - magenta */
solaris_cyan, /* 6 - cyan */
solaris_white /* 7 - white */
};
solaris_grey, /* 0 - black */
solaris_brt_red, /* 1 - red */
solaris_brt_green, /* 2 - green */
solaris_yellow, /* 3 - brown */
solaris_brt_blue, /* 4 - blue */
solaris_brt_magenta, /* 5 - magenta */
solaris_brt_cyan, /* 6 - cyan */
solaris_brt_white /* 7 - white */
};
/* ARGSUSED */
static text_color_t
{
return (ansi_bg_to_solaris_colors[ansi]);
}
static text_color_t
{
return (ansi_fg_bold_to_solaris_colors[ansi]);
} else {
return (ansi_fg_to_solaris_colors[ansi]);
}
}
static void
struct terminal_emulator *tem,
struct vis_consdisplay *pda,
enum called_from called_from)
{
int rval;
if (called_from == CALLED_FROM_STANDALONE)
else
}
static void
struct terminal_emulator *tem,
struct vis_conscopy *pma,
enum called_from called_from)
{
int rval;
if (called_from == CALLED_FROM_STANDALONE)
else
}
static void
struct terminal_emulator *tem,
struct vis_conscursor *pca,
enum called_from called_from)
{
int rval;
if (called_from == CALLED_FROM_STANDALONE)
else
}
void
{
}