diff options
author | sos <sos@FreeBSD.org> | 1995-03-03 08:37:52 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1995-03-03 08:37:52 +0000 |
commit | d315780e7d3dcd93a7223254d052a16dc4e228a3 (patch) | |
tree | 9953cf89ac73f5783780e219110e9c15a1baf60d /sys/dev/syscons | |
parent | 7f3e69780abeb02d95b83953be47780c3345f0ca (diff) | |
download | FreeBSD-src-d315780e7d3dcd93a7223254d052a16dc4e228a3.zip FreeBSD-src-d315780e7d3dcd93a7223254d052a16dc4e228a3.tar.gz |
Minor update to syscons.
Let "grey delete" be a function key (default is 0x7f)
Fix the xor cursor again..
Made the backspace key generate del as default
Made CTRL-space generate nul as default.
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/syscons.c | 17 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.h | 14 |
2 files changed, 17 insertions, 14 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 71906d6..ddcd5df 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -1761,10 +1761,10 @@ draw_cursor(scr_stat *scp, int show) if ((cursor_image & 0x7000) == 0x7000) { cursor_image &= 0x8fff; if(!(cursor_image & 0x0700)) - cursor_image |= 0x0f00; + cursor_image |= 0x0700; } else { cursor_image |= 0x7000; - if ((cursor_image & 0x0f00) == 0x0f00) + if ((cursor_image & 0x0700) == 0x0700) cursor_image &= 0xf0ff; } } @@ -1798,11 +1798,16 @@ outloop: len--; } else if (PRINTABLE(*ptr)) { /* Print only printables */ + int cnt = len <= (scp->xsize-scp->xpos) ? len : (scp->xsize-scp->xpos); + u_short cur_attr = scp->term.cur_attr; + u_short *cursor_pos = scp->cursor_pos; do { - *scp->cursor_pos++ = (scp->term.cur_attr | scr_map[*ptr++]); - scp->xpos++; - len--; - } while (len && PRINTABLE(*ptr) && (scp->xpos < scp->xsize)); + *cursor_pos++ = (scr_map[*ptr++] | cur_attr); + cnt--; + } while (cnt && PRINTABLE(*ptr)); + len -= (cursor_pos - scp->cursor_pos); + scp->xpos += (cursor_pos - scp->cursor_pos); + scp->cursor_pos = cursor_pos; if (scp->xpos >= scp->xsize) { scp->xpos = 0; scp->ypos++; diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h index 7b94bf5..9e6083f 100644 --- a/sys/dev/syscons/syscons.h +++ b/sys/dev/syscons/syscons.h @@ -28,12 +28,8 @@ * $Id: syscons.h,v 1.2 1995/02/25 20:09:21 pst Exp $ */ -/* - * The APM stuff is -not- under conditional compilation because we don't want - * the size of the scr_stat structure to vary depending upon if APM has been - * compiled in or not, that can cause utilities and lkms to crash! - */ -#include <machine/apm_bios.h> +#ifndef SYSCONS_H +#define SYSCONS_H /* vm things */ #define ISMAPPED(pa, width) \ @@ -42,7 +38,7 @@ #define pa_to_va(pa) (KERNBASE + (pa)) /* works if ISMAPPED(pa...) */ /* printable chars */ -#define PRINTABLE(ch) (ch>0x1B || (ch>0x0d && ch<0x1b) || ch<0x07) +#define PRINTABLE(ch) ((ch)>0x1B || ((ch)>0x0d && (ch)<0x1b) || (ch)<0x07) /* status flags */ #define LOCK_KEY_MASK 0x0000F @@ -175,7 +171,7 @@ void scintr(int unit); int pcmmap(dev_t dev, int offset, int nprot); static void scinit(void); static u_int scgetc(int noblock); -struct tty *scdevtotty(dev_t dev); + struct tty *scdevtotty(dev_t dev); static scr_stat *get_scr_stat(dev_t dev); static scr_stat *alloc_scp(); static void init_scp(scr_stat *scp); @@ -206,3 +202,5 @@ static void save_palette(void); void load_palette(void); static void do_bell(scr_stat *scp, int pitch, int duration); static void blink_screen(scr_stat *scp); + +#endif /* SYSCONS_H */ |