Make internal functions static

This commit is contained in:
mlelstv 2013-01-21 19:49:15 +00:00
parent f9a45eb9c5
commit b054bec0e9
3 changed files with 49 additions and 48 deletions

View File

@ -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, vga_console_attached;
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_config *, u_int *);
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_accessops = {
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, struct egavga_font *f)
}
}
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, struct vgascreen *scr, const char *name1,
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, struct vgascreen *scr,
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 state)
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, int prot)
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 wsscreen_descr *type, void **cookiep,
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, struct vgascreen *scr)
}
}
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, int waitok,
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 *index)
}
#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 lines)
}
#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;

View File

@ -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_space_tag_t memt, int type, int check)
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, bus_space_tag_t iot,
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 offset, int prot)
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 struct wsscreen_descr *type,
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 *cookie)
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 *cookie, int waitok,
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 *vc, struct vgascreen *scr)
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, struct vga_moderegs *regs)
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, struct vga_moderegs *regs)
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, int existing)
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_int *index)
}
}
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, int col, u_int c, long attr,
}
}
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, int srccol, int dstcol, int ncols)
}
}
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, int startcol, int ncols, long fillattr)
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, int dstrow, int nrows)
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, int bg, int flags, long *attrp)
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_config *vc,
}
#ifdef WSDISPLAY_CUSTOM_OUTPUT
void
static void
vga_raster_replaceattr(void *id, long oldattr, long newattr)
{
struct vgascreen *scr = id;

View File

@ -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_handle *, u_int8_t *, int, int);
#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;