Adding upstream version 3.62+dfsg.
[syslinux-debian/hramrach.git] / com32 / lib / sys / vesa / debug.h
blob50fed465f7aa7ca54ca0bb8e83caeb285daaf864
1 #ifndef LIB_SYS_VESA_DEBUG_H
2 #define LIB_SYS_VESA_DEBUG_H
4 #if 0
6 #include <stdio.h>
7 #include <unistd.h>
9 ssize_t __serial_write(void *fp, const void *buf, size_t count);
11 static void debug(const char *str, ...)
13 va_list va;
14 char buf[65536];
15 size_t len;
17 va_start(va, str);
18 len = vsnprintf(buf, sizeof buf, str, va);
19 va_end(va);
21 if (len >= sizeof buf)
22 len = sizeof buf - 1;
24 __serial_write(NULL, buf, len);
27 #else
29 static inline void debug(const char *str, ...)
31 (void)str;
34 #endif
36 #endif /* LIB_SYS_VESA_DEBUG_H */