[SeaBIOS] [PATCH 5/5] vgautil: Move definitions from cbvga.h and clext.h to vgautil.h

Kevin O'Connor kevin at koconnor.net
Fri Aug 5 18:23:20 CEST 2016


These files only need to export simple function definitions - move
them to vgautil.h.

Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 vgasrc/cbvga.c   |  1 -
 vgasrc/cbvga.h   | 20 --------------------
 vgasrc/clext.c   |  1 -
 vgasrc/clext.h   | 20 --------------------
 vgasrc/vgabios.c |  1 -
 vgasrc/vgahw.h   |  2 --
 vgasrc/vgautil.h | 31 ++++++++++++++++++++++++++++++-
 7 files changed, 30 insertions(+), 46 deletions(-)
 delete mode 100644 vgasrc/cbvga.h
 delete mode 100644 vgasrc/clext.h

diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c
index 9d0adef..b8216a9 100644
--- a/vgasrc/cbvga.c
+++ b/vgasrc/cbvga.c
@@ -5,7 +5,6 @@
 // This file may be distributed under the terms of the GNU LGPLv3 license.
 
 #include "biosvar.h" // GET_BDA
-#include "cbvga.h" // cbvga_setup
 #include "output.h" // dprintf
 #include "stdvga.h" // SEG_CTEXT
 #include "string.h" // memset16_far
diff --git a/vgasrc/cbvga.h b/vgasrc/cbvga.h
deleted file mode 100644
index fb892c8..0000000
--- a/vgasrc/cbvga.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __CBVGA_H
-#define __CBVGA_H
-
-#include "types.h" // u16
-
-struct vgamode_s *cbvga_find_mode(int mode);
-void cbvga_list_modes(u16 seg, u16 *dest, u16 *last);
-int cbvga_get_window(struct vgamode_s *vmode_g, int window);
-int cbvga_set_window(struct vgamode_s *vmode_g, int window, int val);
-int cbvga_get_linelength(struct vgamode_s *vmode_g);
-int cbvga_set_linelength(struct vgamode_s *vmode_g, int val);
-int cbvga_get_displaystart(struct vgamode_s *vmode_g);
-int cbvga_set_displaystart(struct vgamode_s *vmode_g, int val);
-int cbvga_get_dacformat(struct vgamode_s *vmode_g);
-int cbvga_set_dacformat(struct vgamode_s *vmode_g, int val);
-int cbvga_save_restore(int cmd, u16 seg, void *data);
-int cbvga_set_mode(struct vgamode_s *vmode_g, int flags);
-int cbvga_setup(void);
-
-#endif // cbvga.h
diff --git a/vgasrc/clext.c b/vgasrc/clext.c
index 45b5de3..da8b790 100644
--- a/vgasrc/clext.c
+++ b/vgasrc/clext.c
@@ -7,7 +7,6 @@
 
 #include "biosvar.h" // GET_GLOBAL
 #include "bregs.h" // struct bregs
-#include "clext.h" // clext_setup
 #include "hw/pci.h" // pci_config_readl
 #include "hw/pci_regs.h" // PCI_BASE_ADDRESS_0
 #include "output.h" // dprintf
diff --git a/vgasrc/clext.h b/vgasrc/clext.h
deleted file mode 100644
index cf47a5b..0000000
--- a/vgasrc/clext.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __CLEXT_H
-#define __CLEXT_H
-
-#include "types.h" // u16
-
-struct vgamode_s *clext_find_mode(int mode);
-void clext_list_modes(u16 seg, u16 *dest, u16 *last);
-int clext_get_window(struct vgamode_s *vmode_g, int window);
-int clext_set_window(struct vgamode_s *vmode_g, int window, int val);
-int clext_get_linelength(struct vgamode_s *vmode_g);
-int clext_set_linelength(struct vgamode_s *vmode_g, int val);
-int clext_get_displaystart(struct vgamode_s *vmode_g);
-int clext_set_displaystart(struct vgamode_s *vmode_g, int val);
-int clext_save_restore(int cmd, u16 seg, void *data);
-int clext_set_mode(struct vgamode_s *vmode_g, int flags);
-struct bregs;
-void clext_1012(struct bregs *regs);
-int clext_setup(void);
-
-#endif // clext.h
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index db4f868..3b9694c 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -7,7 +7,6 @@
 
 #include "biosvar.h" // GET_BDA
 #include "bregs.h" // struct bregs
-#include "clext.h" // clext_1012
 #include "config.h" // CONFIG_*
 #include "output.h" // dprintf
 #include "std/vbe.h" // VBE_RETURN_STATUS_FAILED
diff --git a/vgasrc/vgahw.h b/vgasrc/vgahw.h
index 3d9ae39..dab2b4d 100644
--- a/vgasrc/vgahw.h
+++ b/vgasrc/vgahw.h
@@ -4,8 +4,6 @@
 #include "types.h" // u8
 #include "config.h" // CONFIG_*
 
-#include "cbvga.h" // cbvga_setup
-#include "clext.h" // clext_set_mode
 #include "bochsvga.h" // bochsvga_set_mode
 #include "stdvga.h" // stdvga_set_mode
 #include "geodevga.h" // geodevga_setup
diff --git a/vgasrc/vgautil.h b/vgasrc/vgautil.h
index 90fa54d..79c16be 100644
--- a/vgasrc/vgautil.h
+++ b/vgasrc/vgautil.h
@@ -4,6 +4,36 @@
 
 #include "types.h" // u8
 
+// cbvga.c
+struct vgamode_s *cbvga_find_mode(int mode);
+void cbvga_list_modes(u16 seg, u16 *dest, u16 *last);
+int cbvga_get_window(struct vgamode_s *vmode_g, int window);
+int cbvga_set_window(struct vgamode_s *vmode_g, int window, int val);
+int cbvga_get_linelength(struct vgamode_s *vmode_g);
+int cbvga_set_linelength(struct vgamode_s *vmode_g, int val);
+int cbvga_get_displaystart(struct vgamode_s *vmode_g);
+int cbvga_set_displaystart(struct vgamode_s *vmode_g, int val);
+int cbvga_get_dacformat(struct vgamode_s *vmode_g);
+int cbvga_set_dacformat(struct vgamode_s *vmode_g, int val);
+int cbvga_save_restore(int cmd, u16 seg, void *data);
+int cbvga_set_mode(struct vgamode_s *vmode_g, int flags);
+int cbvga_setup(void);
+
+// clext.c
+struct vgamode_s *clext_find_mode(int mode);
+void clext_list_modes(u16 seg, u16 *dest, u16 *last);
+int clext_get_window(struct vgamode_s *vmode_g, int window);
+int clext_set_window(struct vgamode_s *vmode_g, int window, int val);
+int clext_get_linelength(struct vgamode_s *vmode_g);
+int clext_set_linelength(struct vgamode_s *vmode_g, int val);
+int clext_get_displaystart(struct vgamode_s *vmode_g);
+int clext_set_displaystart(struct vgamode_s *vmode_g, int val);
+int clext_save_restore(int cmd, u16 seg, void *data);
+int clext_set_mode(struct vgamode_s *vmode_g, int flags);
+struct bregs;
+void clext_1012(struct bregs *regs);
+int clext_setup(void);
+
 // stdvgaio.c
 u8 stdvga_pelmask_read(void);
 void stdvga_pelmask_write(u8 val);
@@ -36,7 +66,6 @@ int stdvga_set_mode(struct vgamode_s *vmode_g, int flags);
 void stdvga_set_packed_palette(void);
 
 // swcursor.c
-struct bregs;
 void swcursor_pre_handle10(struct bregs *regs);
 void swcursor_check_event(void);
 
-- 
2.5.5




More information about the SeaBIOS mailing list