X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/d24901e6cc51d80d30e074eba9fdb3b64d938dc2..d5cffad757d05610d796476603aaff266e6c8f50:/aseg/vga-overlay.c diff --git a/aseg/vga-overlay.c b/aseg/vga-overlay.c index d205656..7aa8b41 100644 --- a/aseg/vga-overlay.c +++ b/aseg/vga-overlay.c @@ -3,6 +3,7 @@ #include #include #include +#include static char logents[4][41] = {{0}}; @@ -34,7 +35,7 @@ void strblit(char *src, int row, int col) smram_state_t old_state = smram_save_state(); smram_aseg_set_state(SMRAM_ASEG_SMMCODE); - + while (*src) { *(destp++) = *(src++); @@ -66,13 +67,14 @@ void outlog() strblit(logents[y], y, 40); } -void dolog(char *s) +void dolog(const char *s) { memmove(logents[0], logents[1], sizeof(logents[0])*3); strcpy(logents[3], s); } +void (*output)(const char *s) = dolog; -void dologf(char *fmt, ...) +void dologf(const char *fmt, ...) { va_list va; @@ -81,3 +83,8 @@ void dologf(char *fmt, ...) vsnprintf(logents[3], 40, fmt, va); va_end(va); } +void (*outputf)(const char *s, ...) = dologf; + +void dump_log (char * target) { + memcpy(target, logents, sizeof(logents)); +}