Source-Changes-HG archive

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

[.joined/src/trunk]: .joined/src/sys/dev/wscons wsemul_vt100.c - make static ...



details:   https://anonhg.NetBSD.org/.joined/src/rev/e51f33571c09
branches:  trunk
changeset: 359411:e51f33571c09
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Jan 02 23:46:21 2022 +0000

description:
wsemul_vt100.c - make static everything that can be static

Externally, wsdisplay only needs wsemul_vt100_ops.  Internally (as
vt100 emulation is split into several files) wsemul_vt100_subr.c needs
wsemul_vt100_reset().

diffstat:

 sys/dev/wscons/wsemul_vt100.c |  33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diffs (103 lines):

diff -r 1e6885c9276c -r e51f33571c09 sys/dev/wscons/wsemul_vt100.c
--- a/sys/dev/wscons/wsemul_vt100.c     Sun Jan 02 23:10:37 2022 +0000
+++ b/sys/dev/wscons/wsemul_vt100.c     Sun Jan 02 23:46:21 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsemul_vt100.c,v 1.48 2021/06/07 16:37:34 christos Exp $       */
+/*     $NetBSD: wsemul_vt100.c,v 1.49 2022/01/02 23:46:21 uwe Exp $    */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.48 2021/06/07 16:37:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.49 2022/01/02 23:46:21 uwe Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_wsmsgattrs.h"
@@ -45,13 +45,14 @@
 #include <dev/wscons/wsemul_vt100var.h>
 #include <dev/wscons/ascii.h>
 
-void   *wsemul_vt100_cnattach(const struct wsscreen_descr *, void *,
-                              int, int, long);
-void   *wsemul_vt100_attach(int console, const struct wsscreen_descr *,
-                            void *, int, int, void *, long);
-void   wsemul_vt100_output(void *cookie, const u_char *data, u_int count, int);
-void   wsemul_vt100_detach(void *cookie, u_int *crowp, u_int *ccolp);
-void   wsemul_vt100_resetop(void *, enum wsemul_resetops);
+static void *wsemul_vt100_cnattach(const struct wsscreen_descr *, void *,
+                                  int, int, long);
+static void *wsemul_vt100_attach(int console, const struct wsscreen_descr *,
+                                void *, int, int, void *, long);
+static void wsemul_vt100_output(void *cookie, const u_char *data, u_int count,
+                               int kernel);
+static void wsemul_vt100_detach(void *cookie, u_int *crowp, u_int *ccolp);
+static void wsemul_vt100_resetop(void *, enum wsemul_resetops);
 #ifdef WSDISPLAY_CUSTOM_OUTPUT
 static void wsemul_vt100_getmsgattrs(void *, struct wsdisplay_msgattrs *);
 static void wsemul_vt100_setmsgattrs(void *, const struct wsscreen_descr *,
@@ -77,7 +78,7 @@
        .resize = wsemul_vt100_resize
 };
 
-struct wsemul_vt100_emuldata wsemul_vt100_console_emuldata;
+static struct wsemul_vt100_emuldata wsemul_vt100_console_emuldata;
 
 static void wsemul_vt100_init(struct wsemul_vt100_emuldata *,
                              const struct wsscreen_descr *,
@@ -118,7 +119,7 @@
 #define        VT100_EMUL_STATE_DCS            11      /* got DCS (ESC P) */
 #define        VT100_EMUL_STATE_DCS_DOLLAR     12      /* got DCS<p>$ */
 
-vt100_handler *vt100_output[] = {
+static vt100_handler *vt100_output[] = {
        wsemul_vt100_output_esc,
        wsemul_vt100_output_csi,
        wsemul_vt100_output_scs94,
@@ -208,7 +209,7 @@
        edp->kernattr = vd->defattr;
 }
 
-void *
+static void *
 wsemul_vt100_cnattach(const struct wsscreen_descr *type, void *cookie,
        int ccol, int crow, long defattr)
 {
@@ -233,7 +234,7 @@
        return edp;
 }
 
-void *
+static void *
 wsemul_vt100_attach(int console, const struct wsscreen_descr *type,
        void *cookie, int ccol, int crow, void *cbcookie, long defattr)
 {
@@ -266,7 +267,7 @@
        return edp;
 }
 
-void
+static void
 wsemul_vt100_detach(void *cookie, u_int *crowp, u_int *ccolp)
 {
        struct wsemul_vt100_emuldata *edp = cookie;
@@ -298,7 +299,7 @@
        wsemul_vt100_resetop(cookie, WSEMUL_CLEARSCREEN);
 }
 
-void
+static void
 wsemul_vt100_resetop(void *cookie, enum wsemul_resetops op)
 {
        struct wsemul_vt100_emuldata *edp = cookie;
@@ -972,7 +973,7 @@
        return VT100_EMUL_STATE_CSI;
 }
 
-void
+static void
 wsemul_vt100_output(void *cookie, const u_char *data, u_int count, int kernel)
 {
        struct wsemul_vt100_emuldata *edp = cookie;



Home | Main Index | Thread Index | Old Index