Ejemplo n.º 1
0
/*
 * W I D - G E T - N A M E
 * Ficl  ( wid -- c-addr u )
 * Get wid's (optional) name and push onto stack as a counted string
 */
static void
ficlPrimitiveWidGetName(ficlVm *vm)
{
	ficlHash *hash;
	char *name;
	ficlInteger length;
	ficlCell c;

	hash = ficlVmPop(vm).p;
	name = hash->name;

	if (name != NULL)
		length = strlen(name);
	else
		length = 0;

	c.p = name;
	ficlVmPush(vm, c);

	c.i = length;
	ficlVmPush(vm, c);
}
Ejemplo n.º 2
0
FICL_PLATFORM_EXTERN void        vmPush         (ficlVm *vm, ficlCell cell) { ficlVmPush(vm, cell); }