aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-09-14 21:55:26 -0400
committerKevin O'Connor <kevin@koconnor.net>2013-09-18 20:48:34 -0400
commit2d2fa31b377444991e7993c37f6d6900c6051aca (patch)
tree0d37e45165d29fe4aae15d17f5d19bcf795ea51d /src/util.h
parent9dea59025f8aa3742ff5b27d1772e1651066ffb9 (diff)
downloadseabios-2d2fa31b377444991e7993c37f6d6900c6051aca.tar.gz
Move function definitions for output.c from util.h to new file output.h.
Also, sort the order of include files in the c files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h63
1 files changed, 1 insertions, 62 deletions
diff --git a/src/util.h b/src/util.h
index dffc4440..2712f465 100644
--- a/src/util.h
+++ b/src/util.h
@@ -4,70 +4,9 @@
#include "types.h" // u32
-// output.c
-extern u16 DebugOutputPort;
-void debug_serial_preinit(void);
-void panic(const char *fmt, ...)
- __attribute__ ((format (printf, 1, 2))) __noreturn;
-void printf(const char *fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-int snprintf(char *str, size_t size, const char *fmt, ...)
- __attribute__ ((format (printf, 3, 4)));
-char * znprintf(size_t size, const char *fmt, ...)
- __attribute__ ((format (printf, 2, 3)));
-void __dprintf(const char *fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-struct bregs;
-void __debug_enter(struct bregs *regs, const char *fname);
-void __debug_isr(const char *fname);
-void __debug_stub(struct bregs *regs, int lineno, const char *fname);
-void __warn_invalid(struct bregs *regs, int lineno, const char *fname);
-void __warn_unimplemented(struct bregs *regs, int lineno, const char *fname);
-void __warn_internalerror(int lineno, const char *fname);
-void __warn_noalloc(int lineno, const char *fname);
-void __warn_timeout(int lineno, const char *fname);
-void __set_invalid(struct bregs *regs, int lineno, const char *fname);
-void __set_unimplemented(struct bregs *regs, int lineno, const char *fname);
-void __set_code_invalid(struct bregs *regs, u32 linecode, const char *fname);
-void __set_code_unimplemented(struct bregs *regs, u32 linecode
- , const char *fname);
-void hexdump(const void *d, int len);
-
-#define dprintf(lvl, fmt, args...) do { \
- if (CONFIG_DEBUG_LEVEL && (lvl) <= CONFIG_DEBUG_LEVEL) \
- __dprintf((fmt) , ##args ); \
- } while (0)
-#define debug_enter(regs, lvl) do { \
- if ((lvl) && (lvl) <= CONFIG_DEBUG_LEVEL) \
- __debug_enter((regs), __func__); \
- } while (0)
-#define debug_isr(lvl) do { \
- if ((lvl) && (lvl) <= CONFIG_DEBUG_LEVEL) \
- __debug_isr(__func__); \
- } while (0)
-#define debug_stub(regs) \
- __debug_stub((regs), __LINE__, __func__)
-#define warn_invalid(regs) \
- __warn_invalid((regs), __LINE__, __func__)
-#define warn_unimplemented(regs) \
- __warn_unimplemented((regs), __LINE__, __func__)
-#define warn_internalerror() \
- __warn_internalerror(__LINE__, __func__)
-#define warn_noalloc() \
- __warn_noalloc(__LINE__, __func__)
-#define warn_timeout() \
- __warn_timeout(__LINE__, __func__)
-#define set_invalid(regs) \
- __set_invalid((regs), __LINE__, __func__)
-#define set_code_invalid(regs, code) \
- __set_code_invalid((regs), (code) | (__LINE__ << 8), __func__)
-#define set_unimplemented(regs) \
- __set_unimplemented((regs), __LINE__, __func__)
-#define set_code_unimplemented(regs, code) \
- __set_code_unimplemented((regs), (code) | (__LINE__ << 8), __func__)
-
// kbd.c
void kbd_init(void);
+struct bregs;
void handle_15c2(struct bregs *regs);
void process_key(u8 key);