2020-06-15 14:18:57 +00:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_LOG_INTERNAL_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_LOG_INTERNAL_H_
|
|
|
|
#include "libc/calls/calls.h"
|
2020-08-25 11:23:25 +00:00
|
|
|
#include "libc/calls/struct/sigaction.h"
|
|
|
|
#include "libc/log/log.h"
|
2020-06-15 14:18:57 +00:00
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
2020-08-25 11:23:25 +00:00
|
|
|
#define RED (cancolor() ? "\x1b[30;101m" : "")
|
2020-06-15 14:18:57 +00:00
|
|
|
#define UNBOLD (cancolor() ? "\x1b[22m" : "")
|
2020-08-25 11:23:25 +00:00
|
|
|
#define RED2 (cancolor() ? "\x1b[91;1m" : "")
|
|
|
|
#define BLUE1 (cancolor() ? "\x1b[94;49m" : "")
|
|
|
|
#define BLUE2 (cancolor() ? "\x1b[34m" : "")
|
|
|
|
#define RESET (cancolor() ? "\x1b[0m" : "")
|
2020-06-15 14:18:57 +00:00
|
|
|
#define SUBTLE (cancolor() ? "\x1b[35m" : "")
|
|
|
|
|
|
|
|
enum NtExceptionHandlerActions;
|
|
|
|
struct NtExceptionPointers;
|
|
|
|
|
|
|
|
extern int kCrashSigs[8];
|
|
|
|
extern struct sigaction g_oldcrashacts[8];
|
|
|
|
extern const char kCrashSigNames[8][5] aligned(1);
|
|
|
|
extern const char kGregNames[17][4] aligned(1);
|
|
|
|
extern const char kGregOrder[17] aligned(1);
|
|
|
|
|
|
|
|
void startfatal(const char *, int) hidden;
|
|
|
|
void startfatal_ndebug(void) hidden;
|
|
|
|
void oncrash(int, struct siginfo *, struct ucontext *) relegated;
|
|
|
|
enum NtExceptionHandlerActions wincrash$nt(
|
|
|
|
const struct NtExceptionPointers *) relegated;
|
|
|
|
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_LOG_INTERNAL_H_ */
|