Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax Rectify the jumbled naming scheme of routines ...



details:   https://anonhg.NetBSD.org/src/rev/3b73f1ac3d26
branches:  trunk
changeset: 479857:3b73f1ac3d26
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Dec 23 15:34:17 1999 +0000

description:
Rectify the jumbled naming scheme of routines in lk201.c. Function names
are now lower case and prefixed by 'lk_'. XXX lk_mouseinit() is bogus. It
belongs somewhere else.

diffstat:

 sys/arch/pmax/dev/dc.c        |  10 +++++-----
 sys/arch/pmax/dev/dtop.c      |  10 +++++-----
 sys/arch/pmax/dev/fb_usrreq.c |   4 ++--
 sys/arch/pmax/dev/findcons.c  |  10 +++++-----
 sys/arch/pmax/dev/lk201.c     |  32 ++++++++++++++++----------------
 sys/arch/pmax/dev/lk201var.h  |  10 +++++-----
 sys/arch/pmax/tc/scc.c        |  10 +++++-----
 7 files changed, 43 insertions(+), 43 deletions(-)

diffs (truncated from 335 to 300 lines):

diff -r 57e51ed87fca -r 3b73f1ac3d26 sys/arch/pmax/dev/dc.c
--- a/sys/arch/pmax/dev/dc.c    Thu Dec 23 15:27:14 1999 +0000
+++ b/sys/arch/pmax/dev/dc.c    Thu Dec 23 15:34:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dc.c,v 1.53 1999/12/03 13:07:35 simonb Exp $   */
+/*     $NetBSD: dc.c,v 1.54 1999/12/23 15:34:17 ad Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dc.c,v 1.53 1999/12/03 13:07:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dc.c,v 1.54 1999/12/23 15:34:17 ad Exp $");
 
 /*
  * devDC7085.c --
@@ -399,7 +399,7 @@
        (void) cold_dcparam(&ctty, &cterm, sc);
        DELAY(10000);
 
-       KBDReset(ctty.t_dev, dcPutc);
+       lk_reset(ctty.t_dev, dcPutc);
        DELAY(10000);
 
        splx(s);
@@ -427,7 +427,7 @@
         * mouse tracking required by Xservers.
         */
        DELAY(10000);
-       MouseInit(ctty.t_dev, dcPutc, dcGetc);
+       lk_mouseinit(ctty.t_dev, dcPutc, dcGetc);
        DELAY(10000);
 
        splx(s);
@@ -802,7 +802,7 @@
                                        return;
                                }
 #if NRASTERCONSOLE > 0
-                               if ((cp = kbdMapChar(cc, &cl)) == NULL)
+                               if ((cp = lk_mapchar(cc, &cl)) == NULL)
                                        return;
                                while (cl--)
                                        rcons_input(0, *cp++);
diff -r 57e51ed87fca -r 3b73f1ac3d26 sys/arch/pmax/dev/dtop.c
--- a/sys/arch/pmax/dev/dtop.c  Thu Dec 23 15:27:14 1999 +0000
+++ b/sys/arch/pmax/dev/dtop.c  Thu Dec 23 15:34:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtop.c,v 1.41 1999/11/29 15:02:38 ad Exp $     */
+/*     $NetBSD: dtop.c,v 1.42 1999/12/23 15:34:17 ad Exp $     */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -94,7 +94,7 @@
 ********************************************************/
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dtop.c,v 1.41 1999/11/29 15:02:38 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtop.c,v 1.42 1999/12/23 15:34:17 ad Exp $");
 
 #include "rasterconsole.h"
 
@@ -905,7 +905,7 @@
        ls = &dev->keyboard.last_codes[dev->keyboard.last_codes_count - 1];
        for ( ; ls >= le; ls--)
            if ((c = *ls) != 0) {
-               (void) kbdMapChar(c, &cl);
+               (void) lk_mapchar(c, &cl);
 
                if (outc == 0 && dtopDivertXInput &&
                    (keymodes[(c >> 5) & 0x7] & (1 << (c & 0x1f))))
@@ -919,7 +919,7 @@
        retc = 0;
        for ( ; ns >= ne; ns--)
            if (*ns) {
-               cp = kbdMapChar(*ns, &cl);
+               cp = lk_mapchar(*ns, &cl);
 #ifdef DDB
                if (*ns == LK_DO) {
                        spl0();
@@ -986,7 +986,7 @@
                                continue;
                        }
 
-                       if ((cp = kbdMapChar(KEY_REPEAT, &cl)) != NULL) {
+                       if ((cp = lk_mapchar(KEY_REPEAT, &cl)) != NULL) {
                                for (; cl; cl--, cp++) {
 #if 0
                                        (*linesw[tp->t_line].l_rint)(*cp, tp);
diff -r 57e51ed87fca -r 3b73f1ac3d26 sys/arch/pmax/dev/fb_usrreq.c
--- a/sys/arch/pmax/dev/fb_usrreq.c     Thu Dec 23 15:27:14 1999 +0000
+++ b/sys/arch/pmax/dev/fb_usrreq.c     Thu Dec 23 15:34:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fb_usrreq.c,v 1.17 1999/11/08 18:41:32 mhitch Exp $    */
+/*     $NetBSD: fb_usrreq.c,v 1.18 1999/12/23 15:34:18 ad Exp $        */
 
 /*ARGSUSED*/
 int
@@ -74,7 +74,7 @@
         * was using the framebuffer) did to the keyboard.  The X11R6 server
         * changes the keyboard state, and doesn't reset it.
         */
-       KBDReset(fbtty->kbddev, fbtty->KBDPutc);
+       lk_mapchar(fbtty->kbddev, fbtty->KBDPutc);
 
        bzero((caddr_t)fi->fi_pixels, fi->fi_pixelsize);
        (*fi->fi_driver->fbd_poscursor)
diff -r 57e51ed87fca -r 3b73f1ac3d26 sys/arch/pmax/dev/findcons.c
--- a/sys/arch/pmax/dev/findcons.c      Thu Dec 23 15:27:14 1999 +0000
+++ b/sys/arch/pmax/dev/findcons.c      Thu Dec 23 15:34:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: findcons.c,v 1.21 1999/12/08 02:56:17 simonb Exp $     */
+/*     $NetBSD: findcons.c,v 1.22 1999/12/23 15:34:18 ad Exp $ */
 
 /*
  * Copyright (c) 1998 Jonathan Stone
@@ -34,7 +34,7 @@
 
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: findcons.c,v 1.21 1999/12/08 02:56:17 simonb Exp $$");
+__KERNEL_RCSID(0, "$NetBSD: findcons.c,v 1.22 1999/12/23 15:34:18 ad Exp $$");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -163,13 +163,13 @@
 
 #if NDC > 0 && NWS > 0
        if (systype == DS_PMAX) {
-               cd.cn_getc = LKgetc;
+               cd.cn_getc = lk_getc;
                lk_divert(dcGetc, makedev(DCDEV, DCKBD_PORT));
                return 1;
        }
        else if (systype == DS_3MAX && kbd_slot == 7) {
                cd.cn_dev = makedev(DCDEV, DCKBD_PORT);
-               cd.cn_getc = LKgetc;
+               cd.cn_getc = lk_getc;
                lk_divert(dcGetc, makedev(DCDEV, DCKBD_PORT));
                return 1;
        }
@@ -188,7 +188,7 @@
        if (kbd_slot == 3) {
                cd.cn_dev =  makedev(SCCDEV, SCCKBD_PORT);
                lk_divert(sccGetc, makedev(SCCDEV, SCCKBD_PORT));
-               cd.cn_getc = LKgetc;
+               cd.cn_getc = lk_getc;
                return 1;
        }
 #endif /* NSCC */
diff -r 57e51ed87fca -r 3b73f1ac3d26 sys/arch/pmax/dev/lk201.c
--- a/sys/arch/pmax/dev/lk201.c Thu Dec 23 15:27:14 1999 +0000
+++ b/sys/arch/pmax/dev/lk201.c Thu Dec 23 15:34:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lk201.c,v 1.15 1999/11/29 15:02:38 ad Exp $    */
+/*     $NetBSD: lk201.c,v 1.16 1999/12/23 15:34:18 ad Exp $    */
 
 /*
  * The LK201 keycode mapping routine is here, along with initialization
@@ -214,23 +214,23 @@
  * Initialize the keyboard.
  */
 void
-KBDReset(kbddev, putc)
+lk_reset(kbddev, putc)
        dev_t kbddev;
        void (*putc) __P((dev_t, int));
 {
-       static int inKBDReset;
+       static int inlk_reset;
        int i;
 
-       if (inKBDReset)
+       if (inlk_reset)
                return;
-       inKBDReset = 1;
+       inlk_reset = 1;
 
        for (i = 0; i < sizeof(kbdInitString); i++) {
                (*putc)(kbddev, (int)kbdInitString[i]);
                DELAY(20000);
        }
 
-       inKBDReset = 0;
+       inlk_reset = 0;
        raw_kbd_putc = putc;
        lk_out_dev = kbddev;
 }
@@ -255,7 +255,7 @@
  * string is not NUL terminated, as NUL is a valid code.
  */
 char *
-kbdMapChar(cc, len)
+lk_mapchar(cc, len)
        int cc, *len;
 {
        static u_char shiftDown, ctrlDown, capsLock;
@@ -398,7 +398,7 @@
  * ASCII.
  */
 int
-LKgetc(dev)
+lk_getc(dev)
        dev_t dev;      /* ignored */
 {
        static char *cp;
@@ -424,7 +424,7 @@
                if (c == 0)
                        return (-1);
 
-               cp = kbdMapChar(c & 0xff, &len);
+               cp = lk_mapchar(c & 0xff, &len);
        }
 
        return (c);
@@ -434,7 +434,7 @@
  * Initialize the mouse.  (Doesn't really belong here.)
  */
 void
-MouseInit(mdev, putc, getc)
+lk_mouseinit(mdev, putc, getc)
        dev_t mdev;
        void (*putc) __P((dev_t, int));
        int (*getc) __P((dev_t));
@@ -447,34 +447,34 @@
        (*putc)(mdev, MOUSE_SELF_TEST);
        id_byte1 = (*getc)(mdev);
        if (id_byte1 == MOUSE_SELF_TEST) {
-               printf("MouseInit: mouse loopback connector.\n");
+               printf("lk_mouseinit: mouse loopback connector.\n");
                return;
        }
        if (id_byte1 < 0) {
-               printf("MouseInit: Timeout on %s byte of self-test report\n", 
+               printf("lk_mouseinit: Timeout on %s byte of self-test report\n", 
                    "1st");
                return;
        }
        id_byte2 = (*getc)(mdev);
        if (id_byte2 < 0) {
-               printf("MouseInit: Timeout on %s byte of self-test report\n", 
+               printf("lk_mouseinit: Timeout on %s byte of self-test report\n", 
                    "2nd");
                return;
        }
        id_byte3 = (*getc)(mdev);
        if (id_byte3 < 0) {
-               printf("MouseInit: Timeout on %s byte of self-test report\n", 
+               printf("lk_mouseinit: Timeout on %s byte of self-test report\n", 
                    "3rd");
                return;
        }
        id_byte4 = (*getc)(mdev);
        if (id_byte4 < 0) {
-               printf("MouseInit: Timeout on %s byte of self-test report\n", 
+               printf("lk_mouseinit: Timeout on %s byte of self-test report\n", 
                    "4th");
                return;
        }
        if ((id_byte2 & 0x0f) != 0x2)
-               printf("MouseInit: We don't have a mouse!!!\n");
+               printf("lk_mouseinit: We don't have a mouse!!!\n");
        /*
         * For some reason, the mouse doesn't see this command if it comes
         * too soon after a self test.
diff -r 57e51ed87fca -r 3b73f1ac3d26 sys/arch/pmax/dev/lk201var.h
--- a/sys/arch/pmax/dev/lk201var.h      Thu Dec 23 15:27:14 1999 +0000
+++ b/sys/arch/pmax/dev/lk201var.h      Thu Dec 23 15:34:17 1999 +0000
@@ -1,15 +1,15 @@
-/*     $NetBSD: lk201var.h,v 1.6 1999/12/23 15:27:14 ad Exp $  */
+/*     $NetBSD: lk201var.h,v 1.7 1999/12/23 15:34:18 ad Exp $  */
 
 #ifndef _LK201VAR_H_
 #define _LK201VAR_H_
 
 #ifdef _KERNEL
 
-char   *kbdMapChar __P((int, int *));
-void   KBDReset __P((dev_t, void (*)(dev_t, int)));
-void   MouseInit __P((dev_t, void (*)(dev_t, int), int (*)(dev_t)));
+char   *lk_mapchar __P((int, int *));
+void   lk_reset __P((dev_t, void (*)(dev_t, int)));
+void   lk_mouseinit __P((dev_t, void (*)(dev_t, int), int (*)(dev_t)));
 
-int    LKgetc __P((dev_t dev));
+int    lk_getc __P((dev_t dev));
 void   lk_divert __P((int (*getfn) __P ((dev_t dev)), dev_t in_dev));
 void   lk_bell __P ((int ring));
 
diff -r 57e51ed87fca -r 3b73f1ac3d26 sys/arch/pmax/tc/scc.c
--- a/sys/arch/pmax/tc/scc.c    Thu Dec 23 15:27:14 1999 +0000
+++ b/sys/arch/pmax/tc/scc.c    Thu Dec 23 15:34:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scc.c,v 1.54 1999/12/08 01:29:11 simonb Exp $  */
+/*     $NetBSD: scc.c,v 1.55 1999/12/23 15:34:19 ad Exp $      */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -66,7 +66,7 @@



Home | Main Index | Thread Index | Old Index