version 1.48, 2004/07/13 07:59:53 |
version 1.49, 2004/07/13 09:10:38 |
|
|
* 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/strobj.c,v 1.47 2004/07/07 07:40:19 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/strobj.c,v 1.48 2004/07/13 07:59:53 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 1310 void Pquote_to_funargs(NODE arg,LIST *rp) |
|
Line 1310 void Pquote_to_funargs(NODE arg,LIST *rp) |
|
QUOTE r; |
QUOTE r; |
int i; |
int i; |
Q id,a; |
Q id,a; |
NODE t0,t; |
LIST l; |
|
NODE t0,t,w,u,u0; |
|
|
q = (QUOTE)ARG0(arg); |
q = (QUOTE)ARG0(arg); |
if ( !q || OID(q) != O_QUOTE ) |
if ( !q || OID(q) != O_QUOTE ) |
Line 1345 void Pquote_to_funargs(NODE arg,LIST *rp) |
|
Line 1346 void Pquote_to_funargs(NODE arg,LIST *rp) |
|
case A_internal: |
case A_internal: |
BDY(t) = (pointer)f->arg[i]; |
BDY(t) = (pointer)f->arg[i]; |
break; |
break; |
|
case A_node: |
|
w = (NODE)f->arg[i]; |
|
for ( u0 = 0; w; w = NEXT(w) ){ |
|
NEXTNODE(u0,u); |
|
MKQUOTE(r,(FNODE)BDY(w)); |
|
BDY(u) = (pointer)r; |
|
} |
|
if ( u0 ) NEXT(u) = 0; |
|
MKLIST(l,u0); |
|
BDY(t) = (pointer)l; |
|
break; |
default: |
default: |
MKQUOTEARG(qa,spec->type[i],f->arg[i]); |
MKQUOTEARG(qa,spec->type[i],f->arg[i]); |
BDY(t) = (pointer)qa; |
BDY(t) = (pointer)qa; |
Line 1362 void Pfunargs_to_quote(NODE arg,QUOTE *rp) |
|
Line 1374 void Pfunargs_to_quote(NODE arg,QUOTE *rp) |
|
QUOTEARG qa; |
QUOTEARG qa; |
FNODE f; |
FNODE f; |
STRING s; |
STRING s; |
QUOTE r; |
QUOTE r,b; |
int i; |
int i; |
LIST l; |
LIST l; |
fid id; |
fid id; |
Obj a; |
Obj a; |
NODE t0,t; |
NODE t0,t,u0,u,w; |
|
|
l = (LIST)ARG0(arg); |
l = (LIST)ARG0(arg); |
if ( !l || OID(l) != O_LIST || !(t=BDY(l)) ) |
if ( !l || OID(l) != O_LIST || !(t=BDY(l)) ) |
Line 1402 void Pfunargs_to_quote(NODE arg,QUOTE *rp) |
|
Line 1414 void Pfunargs_to_quote(NODE arg,QUOTE *rp) |
|
break; |
break; |
case A_internal: |
case A_internal: |
f->arg[i] = (pointer)a; |
f->arg[i] = (pointer)a; |
|
break; |
|
case A_node: |
|
if ( !a || OID(a) != O_LIST ) |
|
error("funargs_to_quote : invalid argument"); |
|
u0 = 0; |
|
for ( w = BDY((LIST)a); w; w = NEXT(w) ) { |
|
NEXTNODE(u0,u); |
|
b = (QUOTE)BDY(w); |
|
if ( !b || OID(b) != O_QUOTE ) |
|
error("funargs_to_quote : invalid argument"); |
|
BDY(u) = BDY(b); |
|
} |
|
if ( u0 ) NEXT(u) = 0; |
|
f->arg[i] = (pointer)u0; |
break; |
break; |
default: |
default: |
if ( !a || OID(a) != O_QUOTEARG || |
if ( !a || OID(a) != O_QUOTEARG || |