2010-07-05 01:48:58 -04:00
|
|
|
/* string.h library for large systems - small embedded systems use clibrary.c instead */
|
2011-02-17 02:11:20 -05:00
|
|
|
#include "../interpreter.h"
|
2010-07-05 01:48:58 -04:00
|
|
|
|
|
|
|
#ifndef BUILTIN_MINI_STDLIB
|
|
|
|
|
|
|
|
static int trueValue = 1;
|
|
|
|
static int falseValue = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/* structure definitions */
|
|
|
|
const char StdboolDefs[] = "typedef int bool;";
|
|
|
|
|
|
|
|
/* creates various system-dependent definitions */
|
|
|
|
void StdboolSetupFunc(void)
|
|
|
|
{
|
|
|
|
/* defines */
|
|
|
|
VariableDefinePlatformVar(NULL, "true", &IntType, (union AnyValue *)&trueValue, FALSE);
|
|
|
|
VariableDefinePlatformVar(NULL, "false", &IntType, (union AnyValue *)&falseValue, FALSE);
|
|
|
|
VariableDefinePlatformVar(NULL, "__bool_true_false_are_defined", &IntType, (union AnyValue *)&trueValue, FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* !BUILTIN_MINI_STDLIB */
|