#ifndef ka_error_h
#define ka_error_h

#include <stdarg.h>
#include "kernel.h"

#define ka_error_t _kernel_oserror
#define ka_error_nomem "error8"

char* report_vstring(char* str, int len, const char *format, va_list arg);
#ifdef __CC_NORCROFT
#pragma -v1 // hint to the compiler to check f/s/printf format
#endif
void ka_error_fill(ka_error_t* error_block, const char* format, ...);
void report_error(int fatal, const char* format, ...);
char* report_string(char* str, int len, const char* format, ...);
#ifdef __CC_NORCROFT
#pragma -v0 // return to default
#endif

#endif
