source: bootcd/isolinux/syslinux-6.03/com32/lib/sys/vesa/debug.h @ dd1be7c

Last change on this file since dd1be7c was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 561 bytes
Line 
1#ifndef LIB_SYS_VESA_DEBUG_H
2#define LIB_SYS_VESA_DEBUG_H
3
4#if 0
5
6#include <stdio.h>
7#include <unistd.h>
8
9ssize_t __serial_write(void *fp, const void *buf, size_t count);
10
11static void debug(const char *str, ...)
12{
13    va_list va;
14    char buf[65536];
15    size_t len;
16
17    va_start(va, str);
18    len = vsnprintf(buf, sizeof buf, str, va);
19    va_end(va);
20
21    if (len >= sizeof buf)
22        len = sizeof buf - 1;
23
24    __serial_write(NULL, buf, len);
25}
26
27#else
28
29static inline void debug(const char *str, ...)
30{
31    (void)str;
32}
33
34#endif
35
36#endif /* LIB_SYS_VESA_DEBUG_H */
Note: See TracBrowser for help on using the repository browser.