ladybird/Kernel/kstdio.h
Andrew Kaster fe0eb04a22 Kernel: Overload dbgputstr for char array literals in C++
This just seems like something we should be able to do. The compiler
knows how long my "string literal" is, passing it along manually seems
siilly.
2020-01-13 13:03:30 +01:00

30 lines
503 B
C++

#pragma once
#include <AK/Types.h>
extern "C" {
int dbgprintf(const char* fmt, ...);
int dbgputstr(const char*, int);
int kprintf(const char* fmt, ...);
int sprintf(char* buf, const char* fmt, ...);
void set_serial_debug(bool on_or_off);
int get_serial_debug();
}
#ifdef KERNEL
# define printf dbgprintf
#endif
#ifndef __serenity__
#define dbgprintf printf
#endif
#ifdef __cplusplus
template <size_t N>
inline int dbgputstr(const char (&array)[N])
{
return ::dbgputstr(array, N);
}
#endif