version 1.3, 2000/08/22 05:04:00 |
version 1.4, 2018/03/29 01:32:50 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/type.c,v 1.2 2000/08/21 08:31:21 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/type.c,v 1.3 2000/08/22 05:04:00 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
|
|
void Ptype(), Pntype(); |
void Ptype(), Pntype(); |
|
|
struct ftab type_tab[] = { |
struct ftab type_tab[] = { |
{"type",Ptype,1}, |
{"type",Ptype,1}, |
{"ntype",Pntype,1}, |
{"ntype",Pntype,1}, |
{0,0,0}, |
{0,0,0}, |
}; |
}; |
|
|
void Ptype(arg,rp) |
void Ptype(arg,rp) |
NODE arg; |
NODE arg; |
Obj *rp; |
Obj *rp; |
{ |
{ |
Obj t; |
Obj t; |
Q q; |
Q q; |
|
|
if ( t = (Obj)ARG0(arg) ) { |
if ( t = (Obj)ARG0(arg) ) { |
STOQ(OID(t),q); *rp = (Obj)q; |
STOQ(OID(t),q); *rp = (Obj)q; |
} else |
} else |
*rp = 0; |
*rp = 0; |
} |
} |
|
|
void Pntype(arg,rp) |
void Pntype(arg,rp) |
NODE arg; |
NODE arg; |
Obj *rp; |
Obj *rp; |
{ |
{ |
Obj t; |
Obj t; |
Q q; |
Q q; |
|
|
if ( t = (Obj)ARG0(arg) ) { |
if ( t = (Obj)ARG0(arg) ) { |
asir_assert(t,O_N,"ntype"); |
asir_assert(t,O_N,"ntype"); |
STOQ(NID(t),q); *rp = (Obj)q; |
STOQ(NID(t),q); *rp = (Obj)q; |
} else |
} else |
*rp = 0; |
*rp = 0; |
} |
} |