Beispiel #1
0
/**************************************************************************
                        f i c l S e t V e r s i o n E n v
** Create a double ficlCell environment constant for the version ID
**************************************************************************/
static void ficlSystemSetVersion(ficlSystem *system)
{
    int major = 0;
    int minor = 0;
	ficl2Integer combined;
	ficlDictionary *environment = ficlSystemGetEnvironment(system);
    sscanf(FICL_VERSION, "%d.%d", &major, &minor);
	FICL_2INTEGER_SET(major, minor, combined);
    ficlDictionarySet2Constant(environment, "ficl-version", combined);
    ficlDictionarySetConstant(environment, "ficl-robust",  FICL_ROBUST);
    return;
}
Beispiel #2
0
ficlWord *
ficlDictionarySetConstantString(ficlDictionary *dictionary, char *name,
    char *value)
{
	ficlString s;
	ficl2Integer valueAs2Integer;
	FICL_2INTEGER_SET(strlen(value), (intptr_t)value, valueAs2Integer);
	FICL_STRING_SET_FROM_CSTRING(s, name);

	return (ficlDictionarySet2ConstantInstruction(dictionary, s,
	    ficlInstruction2ConstantParen, valueAs2Integer));
}