[BACK]Return to type.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

File: [local] / OpenXM_contrib2 / asir2000 / builtin / type.c (download)

Revision 1.1, Fri Dec 3 07:39:07 1999 UTC (24 years, 5 months ago) by noro
Branch: MAIN

Initial revision

/* $OpenXM: OpenXM_contrib2/asir2000/builtin/type.c,v 1.1 1999/12/03 07:39:07 noro Exp $ */
#include "ca.h"
#include "parse.h"

void Ptype(), Pntype();

struct ftab type_tab[] = {
	{"type",Ptype,1},
	{"ntype",Pntype,1},
	{0,0,0},
};

void Ptype(arg,rp)
NODE arg;
Obj *rp;
{
	Obj t;
	Q q;

	if ( t = (Obj)ARG0(arg) ) {
		STOQ(OID(t),q); *rp = (Obj)q;
	} else 
		*rp = 0;
}

void Pntype(arg,rp)
NODE arg;
Obj *rp;
{
	Obj t;
	Q q;

	if ( t = (Obj)ARG0(arg) ) {
		asir_assert(t,O_N,"ntype");
		STOQ(NID(t),q); *rp = (Obj)q;
	} else 
		*rp = 0;
}