version 1.4, 2001/10/09 01:36:07 |
version 1.6, 2006/08/09 10:08:46 |
|
|
* 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/var.c,v 1.3 2000/08/22 05:04:00 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/var.c,v 1.5 2005/10/26 07:33:03 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 182 void get_vars(Obj t,VL *vlp) |
|
Line 182 void get_vars(Obj t,VL *vlp) |
|
vl = vl2; |
vl = vl2; |
} |
} |
break; |
break; |
|
case O_NBP: |
|
n = BDY((NBP)t); |
|
for ( vl = 0; n; n = NEXT(n) ) { |
|
get_vars((Obj)(((NBM)BDY(n))->c),&vl1); |
|
mergev(CO,vl,vl1,&vl2); |
|
vl = vl2; |
|
} |
|
break; |
default: |
default: |
vl = 0; break; |
vl = 0; break; |
} |
} |
Line 194 void Puc(Obj *p) |
|
Line 202 void Puc(Obj *p) |
|
V v; |
V v; |
P t; |
P t; |
char buf[BUFSIZ]; |
char buf[BUFSIZ]; |
|
char *n,*nv; |
static int UCN; |
static int UCN; |
|
|
NEWV(v); v->attr = (pointer)V_UC; |
NEWV(v); v->attr = (pointer)V_UC; |
sprintf(buf,"_%d",UCN++); |
sprintf(buf,"_%d",UCN++); |
NAME(v) = (char *)CALLOC(strlen(buf)+1,sizeof(char)); |
nv = NAME(v) = (char *)CALLOC(strlen(buf)+1,sizeof(char)); |
strcpy(NAME(v),buf); |
strcpy(NAME(v),buf); |
for ( vl = CO; NEXT(vl); vl = NEXT(vl) ); |
for ( vl = CO; vl; vl = NEXT(vl) ) |
NEWVL(NEXT(vl)); VR(NEXT(vl)) = v; NEXT(NEXT(vl)) = 0; |
if ( (n=NAME(VR(vl))) && !strcmp(n,nv) ) break; |
|
else if ( !NEXT(vl) ) { |
|
NEWVL(NEXT(vl)); VR(NEXT(vl)) = v; NEXT(NEXT(vl)) = 0; |
|
break; |
|
} |
MKV(v,t); *p = (Obj)t; |
MKV(v,t); *p = (Obj)t; |
} |
} |