mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Toy now fits into the C spec. Fixed #158 Addendum: MacOS test caught an error: error: a function declaration without a prototype is deprecated in all versions of C That took 3 attempts to fix correctly. Addendum: 'No new line at the end of file' are you shitting me?
20 lines
655 B
C
20 lines
655 B
C
#pragma once
|
|
|
|
#include "toy_common.h"
|
|
|
|
//handle callbacks for printing to the terminal, or elsewhere
|
|
typedef void (*Toy_callbackType)(const char*);
|
|
|
|
TOY_API void Toy_print(const char* msg); //print keyword
|
|
TOY_API void Toy_error(const char* msg); //runtime errors
|
|
TOY_API void Toy_assertFailure(const char* msg); //assert keyword failures
|
|
|
|
TOY_API void Toy_setPrintCallback(Toy_callbackType cb);
|
|
TOY_API void Toy_setErrorCallback(Toy_callbackType cb);
|
|
TOY_API void Toy_setAssertFailureCallback(Toy_callbackType cb);
|
|
|
|
TOY_API void Toy_resetPrintCallback(void);
|
|
TOY_API void Toy_resetErrorCallback(void);
|
|
TOY_API void Toy_resetAssertFailureCallback(void);
|
|
|