40 lines
748 B
C
40 lines
748 B
C
#include <am.h>
|
|
#include <klib.h>
|
|
#include <klib-macros.h>
|
|
#include <stdarg.h>
|
|
|
|
#if !defined(__ISA_NATIVE__) || defined(__NATIVE_USE_KLIB__)
|
|
|
|
int vprintf(const char *fmt, va_list ap) {
|
|
const char *p = fmt;
|
|
while(*p != '\0') {
|
|
putch(*p);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
int printf(const char *fmt, ...) {
|
|
va_list args;
|
|
va_start(args, fmt);
|
|
vprintf(fmt, args);
|
|
va_end(args);
|
|
return 0;
|
|
}
|
|
|
|
int vsprintf(char *out, const char *fmt, va_list ap) {
|
|
panic("Not implemented");
|
|
}
|
|
|
|
int sprintf(char *out, const char *fmt, ...) {
|
|
panic("Not implemented");
|
|
}
|
|
|
|
int snprintf(char *out, size_t n, const char *fmt, ...) {
|
|
panic("Not implemented");
|
|
}
|
|
|
|
int vsnprintf(char *out, size_t n, const char *fmt, va_list ap) {
|
|
panic("Not implemented");
|
|
}
|
|
|
|
#endif
|