Module Name: src
Committed By: mlelstv
Date: Mon Jan 21 19:49:16 UTC 2013
Modified Files:
src/sys/dev/ic: vga.c vga_raster.c vgavar.h
Log Message:
Make internal functions static
To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/ic/vga.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/vga_raster.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/vgavar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/vga.c
diff -u src/sys/dev/ic/vga.c:1.109 src/sys/dev/ic/vga.c:1.110
--- src/sys/dev/ic/vga.c:1.109 Thu Aug 9 23:56:35 2012
+++ src/sys/dev/ic/vga.c Mon Jan 21 19:49:15 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.109 2012/08/09 23:56:35 uwe Exp $ */
+/* $NetBSD: vga.c,v 1.110 2013/01/21 19:49:15 mlelstv Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.109 2012/08/09 23:56:35 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.110 2013/01/21 19:49:15 mlelstv Exp $");
/* for WSCONS_SUPPORT_PCVTFONTS */
#include "opt_wsdisplay_compat.h"
@@ -111,23 +111,23 @@ static int vgaconsole, vga_console_type,
static struct vgascreen vga_console_screen;
static struct vga_config vga_console_vc;
-struct egavga_font *egavga_getfont(struct vga_config *, struct vgascreen *,
+static struct egavga_font *egavga_getfont(struct vga_config *, struct vgascreen *,
const char *, int);
-void egavga_unreffont(struct vga_config *, struct egavga_font *);
+static void egavga_unreffont(struct vga_config *, struct egavga_font *);
-int vga_selectfont(struct vga_config *, struct vgascreen *, const char *,
+static int vga_selectfont(struct vga_config *, struct vgascreen *, const char *,
const char *);
-void vga_init_screen(struct vga_config *, struct vgascreen *,
+static void vga_init_screen(struct vga_config *, struct vgascreen *,
const struct wsscreen_descr *, int, long *);
-void vga_init(struct vga_config *, bus_space_tag_t, bus_space_tag_t);
+static void vga_init(struct vga_config *, bus_space_tag_t, bus_space_tag_t);
static void vga_setfont(struct vga_config *, struct vgascreen *);
static int vga_mapchar(void *, int, unsigned int *);
-void vga_putchar(void *, int, int, u_int, long);
+static void vga_putchar(void *, int, int, u_int, long);
static int vga_allocattr(void *, int, int, int, long *);
static void vga_copyrows(void *, int, int, int);
#ifdef WSDISPLAY_SCROLLSUPPORT
-void vga_scroll (void *, void *, int);
+static void vga_scroll (void *, void *, int);
#endif
const struct wsdisplay_emulops vga_emulops = {
@@ -287,7 +287,10 @@ static int vga_getborder(struct vga_conf
static int vga_setborder(struct vga_config *, u_int);
#endif /* WSDISPLAY_CUSTOM_BORDER */
-void vga_doswitch(struct vga_config *);
+static void vga_doswitch(struct vga_config *);
+static void vga_save_palette(struct vga_config *);
+static void vga_restore_palette(struct vga_config *);
+
const struct wsdisplay_accessops vga_accessops = {
vga_ioctl,
@@ -315,7 +318,7 @@ const struct wsdisplay_accessops vga_acc
f->wsfont->encoding == WSDISPLAY_FONTENC_ISO7 || \
f->wsfont->encoding == WSDISPLAY_FONTENC_KOI8_R)
-struct egavga_font *
+static struct egavga_font *
egavga_getfont(struct vga_config *vc, struct vgascreen *scr, const char *name,
int primary)
{
@@ -376,7 +379,7 @@ found:
return (f);
}
-void
+static void
egavga_unreffont(struct vga_config *vc, struct egavga_font *f)
{
@@ -398,7 +401,7 @@ egavga_unreffont(struct vga_config *vc,
}
}
-int
+static int
vga_selectfont(struct vga_config *vc, struct vgascreen *scr, const char *name1,
const char *name2)
{
@@ -437,7 +440,7 @@ vga_selectfont(struct vga_config *vc, st
return (0);
}
-void
+static void
vga_init_screen(struct vga_config *vc, struct vgascreen *scr,
const struct wsscreen_descr *type, int existing, long *attrp)
{
@@ -523,7 +526,7 @@ vga_init_screen(struct vga_config *vc, s
LIST_INSERT_HEAD(&vc->screens, scr, next);
}
-void
+static void
vga_init(struct vga_config *vc, bus_space_tag_t iot, bus_space_tag_t memt)
{
struct vga_handle *vh = &vc->hdl;
@@ -775,7 +778,7 @@ vga_set_video(struct vga_config *vc, int
vga_ts_write(&vc->hdl, syncreset, 0x03);
}
-int
+static int
vga_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l)
{
struct vga_config *vc = v;
@@ -858,7 +861,7 @@ vga_mmap(void *v, void *vs, off_t offset
return ((*vf->vf_mmap)(v, offset, prot));
}
-int
+static int
vga_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
int *curxp, int *curyp, long *defattrp)
{
@@ -893,7 +896,7 @@ vga_alloc_screen(void *v, const struct w
return (0);
}
-void
+static void
vga_free_screen(void *v, void *cookie)
{
struct vgascreen *vs = cookie;
@@ -973,7 +976,7 @@ vga_setfont(struct vga_config *vc, struc
}
}
-int
+static int
vga_show_screen(void *v, void *cookie, int waitok,
void (*cb)(void *, int, int), void *cbarg)
{
@@ -998,7 +1001,7 @@ vga_show_screen(void *v, void *cookie, i
return (0);
}
-void
+static void
vga_doswitch(struct vga_config *vc)
{
struct vgascreen *scr, *oldscr;
@@ -1452,7 +1455,7 @@ vga_mapchar(void *id, int uni, u_int *in
}
#ifdef WSDISPLAY_SCROLLSUPPORT
-void
+static void
vga_scroll(void *v, void *cookie, int lines)
{
struct vga_config *vc = v;
@@ -1494,7 +1497,7 @@ vga_scroll(void *v, void *cookie, int li
}
#endif
-void
+static void
vga_putchar(void *c, int row, int col, u_int uc, long attr)
{
@@ -1550,7 +1553,7 @@ vga_resume(struct vga_softc *sc)
#endif
}
-void
+static void
vga_save_palette(struct vga_config *vc)
{
struct vga_handle *vh = &vc->hdl;
@@ -1568,7 +1571,7 @@ vga_save_palette(struct vga_config *vc)
vga_reset_state(vh); /* reset flip/flop */
}
-void
+static void
vga_restore_palette(struct vga_config *vc)
{
struct vga_handle *vh = &vc->hdl;
Index: src/sys/dev/ic/vga_raster.c
diff -u src/sys/dev/ic/vga_raster.c:1.35 src/sys/dev/ic/vga_raster.c:1.36
--- src/sys/dev/ic/vga_raster.c:1.35 Wed Jan 11 20:41:28 2012
+++ src/sys/dev/ic/vga_raster.c Mon Jan 21 19:49:15 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: vga_raster.c,v 1.35 2012/01/11 20:41:28 macallan Exp $ */
+/* $NetBSD: vga_raster.c,v 1.36 2013/01/21 19:49:15 mlelstv Exp $ */
/*
* Copyright (c) 2001, 2002 Bang Jun-Young
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.35 2012/01/11 20:41:28 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.36 2013/01/21 19:49:15 mlelstv Exp $");
#include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
@@ -372,7 +372,7 @@ vga_cnattach(bus_space_tag_t iot, bus_sp
return (0);
}
-void
+static void
vga_raster_init(struct vga_config *vc, bus_space_tag_t iot,
bus_space_tag_t memt)
{
@@ -439,7 +439,7 @@ vga_raster_init(struct vga_config *vc, b
LIST_INSERT_HEAD(&vc->vc_fontlist, vf, next);
}
-void
+static void
vga_raster_init_screen(struct vga_config *vc, struct vgascreen *scr,
const struct wsscreen_descr *type, int existing, long *attrp)
{
@@ -684,7 +684,7 @@ vga_raster_mmap(void *v, void *vs, off_t
return ((*vf->vf_mmap)(v, offset, prot));
}
-int
+static int
vga_raster_alloc_screen(void *v, const struct wsscreen_descr *type,
void **cookiep, int *curxp, int *curyp, long *defattrp)
{
@@ -715,7 +715,7 @@ vga_raster_alloc_screen(void *v, const s
return (0);
}
-void
+static void
vga_raster_free_screen(void *v, void *cookie)
{
struct vgascreen *vs = cookie;
@@ -732,7 +732,7 @@ vga_raster_free_screen(void *v, void *co
vc->active = 0;
}
-int
+static int
vga_raster_show_screen(void *v, void *cookie, int waitok,
void (*cb)(void *, int, int), void *cbarg)
{
@@ -757,7 +757,7 @@ vga_raster_show_screen(void *v, void *co
return (0);
}
-void
+static void
vga_switch_screen(struct vga_config *vc)
{
struct vgascreen *scr, *oldscr;
@@ -829,7 +829,7 @@ vga_raster_load_font(void *v, void *id,
return (0);
}
-void
+static void
vga_raster_setup_font(struct vga_config *vc, struct vgascreen *scr)
{
struct vga_raster_font *vf;
@@ -864,7 +864,7 @@ vga_raster_setup_font(struct vga_config
LIST_INSERT_HEAD(&scr->fontset, vf, next);
}
-void
+static void
vga_setup_regs(struct videomode *mode, struct vga_moderegs *regs)
{
int i;
@@ -989,7 +989,7 @@ vga_setup_regs(struct videomode *mode, s
regs->atc[20] = 0x00;
}
-void
+static void
vga_set_mode(struct vga_handle *vh, struct vga_moderegs *regs)
{
int i;
@@ -1027,7 +1027,7 @@ vga_set_mode(struct vga_handle *vh, stru
vga_ts_write(vh, mode, vga_ts_read(vh, mode) & ~VGA_TS_MODE_BLANK);
}
-void
+static void
vga_raster_cursor_init(struct vgascreen *scr, int existing)
{
struct vga_handle *vh = scr->hdl;
@@ -1058,7 +1058,7 @@ vga_raster_cursor_init(struct vgascreen
scr->cursoron = 1;
}
-void
+static void
vga_raster_cursor(void *id, int on, int row, int col)
{
struct vgascreen *scr = id;
@@ -1118,7 +1118,7 @@ vga_raster_mapchar(void *id, int uni, u_
}
}
-void
+static void
vga_raster_putchar(void *id, int row, int col, u_int c, long attr)
{
struct vgascreen *scr = id;
@@ -1251,7 +1251,7 @@ _vga_raster_putchar(void *id, int row, i
}
}
-void
+static void
vga_raster_copycols(void *id, int row, int srccol, int dstcol, int ncols)
{
struct vgascreen *scr = id;
@@ -1281,7 +1281,7 @@ vga_raster_copycols(void *id, int row, i
}
}
-void
+static void
vga_raster_erasecols(void *id, int row, int startcol, int ncols, long fillattr)
{
struct vgascreen *scr = id;
@@ -1294,7 +1294,7 @@ vga_raster_erasecols(void *id, int row,
vga_raster_putchar(id, row, i, ' ', fillattr);
}
-void
+static void
vga_raster_copyrows(void *id, int srcrow, int dstrow, int nrows)
{
struct vgascreen *scr = id;
@@ -1352,7 +1352,7 @@ vga_raster_copyrows(void *id, int srcrow
nrows * ncols * sizeof(struct vga_scrmem));
}
-void
+static void
vga_raster_eraserows(void *id, int startrow, int nrows, long fillattr)
{
struct vgascreen *scr = id;
@@ -1431,7 +1431,7 @@ vga_raster_allocattr(void *id, int fg, i
return (0);
}
-void
+static void
vga_restore_screen(struct vgascreen *scr,
const struct wsscreen_descr *type, struct vga_scrmem *mem)
{
@@ -1451,7 +1451,7 @@ vga_restore_screen(struct vgascreen *scr
scr->encoding = tmp;
}
-void
+static void
vga_raster_setscreentype(struct vga_config *vc,
const struct wsscreen_descr *type)
{
@@ -1463,7 +1463,7 @@ vga_raster_setscreentype(struct vga_conf
}
#ifdef WSDISPLAY_CUSTOM_OUTPUT
-void
+static void
vga_raster_replaceattr(void *id, long oldattr, long newattr)
{
struct vgascreen *scr = id;
Index: src/sys/dev/ic/vgavar.h
diff -u src/sys/dev/ic/vgavar.h:1.29 src/sys/dev/ic/vgavar.h:1.30
--- src/sys/dev/ic/vgavar.h:1.29 Thu Dec 9 23:33:30 2010
+++ src/sys/dev/ic/vgavar.h Mon Jan 21 19:49:15 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: vgavar.h,v 1.29 2010/12/09 23:33:30 christos Exp $ */
+/* $NetBSD: vgavar.h,v 1.30 2013/01/21 19:49:15 mlelstv Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -217,7 +217,5 @@ void vga_load_builtinfont(struct vga_ha
#endif /* !VGA_RASTERCONSOLE */
void vga_reset(struct vga_handle *, void (*)(struct vga_handle *));
void vga_initregs(struct vga_handle *);
-void vga_save_palette(struct vga_config *);
-void vga_restore_palette(struct vga_config *);
extern int vga_no_builtinfont;