Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys - Setting initial position of cursor is up to caller.



details:   https://anonhg.NetBSD.org/src/rev/85d5bf45a4ef
branches:  trunk
changeset: 473175:85d5bf45a4ef
user:      ad <ad%NetBSD.org@localhost>
date:      Sun May 23 17:59:39 1999 +0000

description:
- Setting initial position of cursor is up to caller.
- Set cursor position properly for SPARC. From Juergen Hannken-Illjes.

diffstat:

 sys/arch/pmax/dev/rcons.c  |   6 +++++-
 sys/arch/sparc/dev/fb.c    |  14 +++++++++++---
 sys/arch/sparc64/dev/fb.c  |   4 +++-
 sys/dev/rcons/rcons.h      |   6 +++---
 sys/dev/rcons/rcons_kern.c |   9 +++++----
 5 files changed, 27 insertions(+), 12 deletions(-)

diffs (126 lines):

diff -r 99f765f24844 -r 85d5bf45a4ef sys/arch/pmax/dev/rcons.c
--- a/sys/arch/pmax/dev/rcons.c Sun May 23 17:49:07 1999 +0000
+++ b/sys/arch/pmax/dev/rcons.c Sun May 23 17:59:39 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcons.c,v 1.28 1999/05/19 20:34:19 ad Exp $    */
+/*     $NetBSD: rcons.c,v 1.29 1999/05/23 17:59:39 ad Exp $    */
 
 /*
  * Copyright (c) 1995
@@ -161,6 +161,8 @@
        rc.rc_bell = lk_bell;
        rc.rc_width = ri.ri_width;
        rc.rc_height = ri.ri_height;
+       rc.rc_row = 0;
+       rc.rc_col = 0;
        rcons_init(&rc, 1);
 }
 #endif
@@ -197,6 +199,8 @@
        rc.rc_height = width;
        rc.rc_maxcol = cols;
        rc.rc_maxrow = rows;
+       rc.rc_row = 0;
+       rc.rc_col = 0;
        rcons_init(&rc, 1);
 }
 #endif
diff -r 99f765f24844 -r 85d5bf45a4ef sys/arch/sparc/dev/fb.c
--- a/sys/arch/sparc/dev/fb.c   Sun May 23 17:49:07 1999 +0000
+++ b/sys/arch/sparc/dev/fb.c   Sun May 23 17:59:39 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fb.c,v 1.36 1999/05/19 21:05:59 ad Exp $ */
+/*     $NetBSD: fb.c,v 1.37 1999/05/23 17:59:39 ad Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -371,7 +371,7 @@
 {
        struct rconsole *rc = &fb->fb_rcons;
        struct rasops_info *ri = &fb->fb_rinfo;
-       int maxrow, maxcol;
+       int maxrow, maxcol, *row, *col;
 
        /* Set up what rasops needs to know about */
        bzero(ri, sizeof *ri);
@@ -415,7 +415,15 @@
        /* Get operations set and connect to rcons */
        if (rasops_init(ri, maxrow, maxcol, 0, 1))
                panic("fbrcons_init: rasops_init failed!");
-       
+
+       rc->rc_row = rc->rc_col = 0;
+#if !defined(RASTERCONS_FULLSCREEN)
+       /* Determine addresses of prom emulator row and column */
+       if (!CPU_ISSUN4 && !romgetcursoraddr(&row, &col)) {
+               rc->rc_row = *row;
+               rc->rc_col = *col;
+       }
+#endif
        rc->rc_ops = &ri->ri_ops;
        rc->rc_cookie = ri;
        rc->rc_bell = fb_bell;
diff -r 99f765f24844 -r 85d5bf45a4ef sys/arch/sparc64/dev/fb.c
--- a/sys/arch/sparc64/dev/fb.c Sun May 23 17:49:07 1999 +0000
+++ b/sys/arch/sparc64/dev/fb.c Sun May 23 17:59:39 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fb.c,v 1.14 1999/05/23 02:45:19 eeh Exp $ */
+/*     $NetBSD: fb.c,v 1.15 1999/05/23 17:59:39 ad Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -282,6 +282,8 @@
        rc->rc_maxrow = ri->ri_rows;
        rc->rc_width = ri->ri_emuwidth;
        rc->rc_height = ri->ri_emuheight;
+       rc->rc_row = 0;
+       rc->rc_col = 0;
        rcons_init(rc, 0);
 
        /* Hook up virtual console */
diff -r 99f765f24844 -r 85d5bf45a4ef sys/dev/rcons/rcons.h
--- a/sys/dev/rcons/rcons.h     Sun May 23 17:49:07 1999 +0000
+++ b/sys/dev/rcons/rcons.h     Sun May 23 17:59:39 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcons.h,v 1.7 1999/05/20 19:56:49 thorpej Exp $ */
+/*     $NetBSD: rcons.h,v 1.8 1999/05/23 17:59:39 ad Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -67,10 +67,10 @@
        void    *rc_cookie;             /* cookie thereof */
        u_int   rc_width;               /* width in pixels */
        u_int   rc_height;              /* height in pixels */
+       u_int   rc_row;                 /* emulator row */
+       u_int   rc_col;                 /* emulator column */
 
        /* Bits maintained by the raster routines */
-       u_int   rc_row;                 /* emulator row */
-       u_int   rc_col;                 /* emulator column */
        u_int   rc_bits;                /* see defines below */
        int     rc_ringing;             /* bell currently ringing */
        int     rc_belldepth;           /* audible bell depth */
diff -r 99f765f24844 -r 85d5bf45a4ef sys/dev/rcons/rcons_kern.c
--- a/sys/dev/rcons/rcons_kern.c        Sun May 23 17:49:07 1999 +0000
+++ b/sys/dev/rcons/rcons_kern.c        Sun May 23 17:59:39 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcons_kern.c,v 1.9 1999/05/19 20:34:19 ad Exp $ */
+/*     $NetBSD: rcons_kern.c,v 1.10 1999/05/23 17:59:40 ad Exp $ */
 
 /*
  * Copyright (c) 1991, 1993
@@ -189,10 +189,11 @@
 
        /* Initialize operations set, clear screen and turn cursor on */
        rcons_init_ops(rc);
-       rc->rc_col = 0;
-       rc->rc_row = 0;
-       if (clear)
+       if (clear) {
+               rc->rc_col = 0;
+               rc->rc_row = 0;
                rcons_clear2eop(rc);
+       }
        rcons_cursor(rc);
 
        /* Initialization done; hook us up */



Home | Main Index | Thread Index | Old Index