version 1.10, 2001/08/22 09:19:21 |
version 1.11, 2001/10/09 01:36:27 |
|
|
* 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/plot/plotf.c,v 1.9 2001/06/04 02:49:49 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/plotf.c,v 1.10 2001/08/22 09:19:21 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
|
|
void Pifplot(), Pconplot(), Pplotover(), Pplot(), Parrayplot(), Pdrawcircle(); |
void Pifplot(), Pconplot(), Pplotover(), Pplot(), Parrayplot(), Pdrawcircle(); |
void Pmemory_ifplot(); |
void Pmemory_ifplot(); |
void Popen_canvas(), Pclear_canvas(), Pdraw_obj(); |
void Popen_canvas(), Pclear_canvas(), Pdraw_obj(); |
|
void Pox_rpc(); |
|
void Pox_cmo_rpc(); |
|
|
struct ftab plot_tab[] = { |
struct ftab plot_tab[] = { |
{"ifplot",Pifplot,-7}, |
{"ifplot",Pifplot,-7}, |
Line 74 struct ftab plot_tab[] = { |
|
Line 76 struct ftab plot_tab[] = { |
|
|
|
int current_s; |
int current_s; |
|
|
void Popen_canvas(arg,rp) |
void Popen_canvas(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
Q w300,s_id; |
Q w300,s_id; |
LIST geom; |
LIST geom; |
int stream,id,i; |
int stream; |
NODE n,n0; |
NODE n,n0; |
STRING fname,wname; |
STRING fname,wname; |
|
|
|
|
Pox_cmo_rpc(arg,rp); |
Pox_cmo_rpc(arg,rp); |
} |
} |
|
|
void Pifplot(arg,rp) |
void Pifplot(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
Q m2,p2,w300,s_id; |
Q m2,p2,w300,s_id; |
NODE defrange; |
NODE defrange; |
LIST xrange,yrange,range[2],list,geom; |
LIST xrange,yrange,range[2],list,geom; |
VL vl,vl0; |
VL vl,vl0; |
V v[2],av[2]; |
V v[2],av[2]; |
int stream,ri,id,i; |
int stream,ri,i; |
P poly; |
P poly; |
P var; |
P var; |
NODE n,n0; |
NODE n,n0; |
|
|
switch ( OID(BDY(arg)) ) { |
switch ( OID(BDY(arg)) ) { |
case O_P: |
case O_P: |
poly = (P)BDY(arg); |
poly = (P)BDY(arg); |
get_vars_recursive(poly,&vl); |
get_vars_recursive((Obj)poly,&vl); |
for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) ) |
for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) ) |
if ( vl0->v->attr == V_IND ) |
if ( vl0->v->attr == (pointer)V_IND ) |
if ( i >= 2 ) |
if ( i >= 2 ) |
error("ifplot : invalid argument"); |
error("ifplot : invalid argument"); |
else |
else |
|
|
Pox_rpc(arg,rp); |
Pox_rpc(arg,rp); |
} |
} |
|
|
void Pmemory_ifplot(arg,rp) |
void Pmemory_ifplot(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
Q m2,p2,w300,s_id; |
Q m2,p2,w300,s_id; |
NODE defrange; |
NODE defrange; |
LIST xrange,yrange,range[2],list,geom; |
LIST xrange,yrange,range[2],list,geom; |
VL vl,vl0; |
VL vl,vl0; |
V v[2],av[2]; |
V v[2],av[2]; |
int stream,ri,id,i; |
int stream,ri,i; |
P poly; |
P poly; |
P var; |
P var; |
NODE n,n0; |
NODE n,n0; |
STRING fname,wname; |
STRING fname; |
|
|
STOQ(-2,m2); STOQ(2,p2); |
STOQ(-2,m2); STOQ(2,p2); |
MKNODE(n,p2,0); MKNODE(defrange,m2,n); |
MKNODE(n,p2,0); MKNODE(defrange,m2,n); |
|
|
switch ( OID(BDY(arg)) ) { |
switch ( OID(BDY(arg)) ) { |
case O_P: |
case O_P: |
poly = (P)BDY(arg); |
poly = (P)BDY(arg); |
get_vars_recursive(poly,&vl); |
get_vars_recursive((Obj)poly,&vl); |
for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) ) |
for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) ) |
if ( vl0->v->attr == V_IND ) |
if ( vl0->v->attr == (pointer)V_IND ) |
if ( i >= 2 ) |
if ( i >= 2 ) |
error("ifplot : invalid argument"); |
error("ifplot : invalid argument"); |
else |
else |
|
|
Pox_rpc(arg,rp); |
Pox_rpc(arg,rp); |
} |
} |
|
|
void Pconplot(arg,rp) |
void Pconplot(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
Q m2,p2,w300,s_id; |
Q m2,p2,w300,s_id; |
NODE defrange; |
NODE defrange; |
LIST xrange,yrange,zrange,range[3],list,geom; |
LIST xrange,yrange,zrange,range[3],list,geom; |
VL vl,vl0; |
VL vl,vl0; |
V v[2],av[2]; |
V v[2],av[2]; |
int stream,ri,id,i; |
int stream,ri,i; |
P poly; |
P poly; |
P var; |
P var; |
NODE n,n0; |
NODE n,n0; |
|
|
switch ( OID(BDY(arg)) ) { |
switch ( OID(BDY(arg)) ) { |
case O_P: |
case O_P: |
poly = (P)BDY(arg); |
poly = (P)BDY(arg); |
get_vars_recursive(poly,&vl); |
get_vars_recursive((Obj)poly,&vl); |
for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) ) |
for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) ) |
if ( vl0->v->attr == V_IND ) |
if ( vl0->v->attr == (pointer)V_IND ) |
if ( i >= 2 ) |
if ( i >= 2 ) |
error("ifplot : invalid argument"); |
error("ifplot : invalid argument"); |
else |
else |
|
|
Pox_rpc(arg,rp); |
Pox_rpc(arg,rp); |
} |
} |
|
|
void Pplot(arg,rp) |
void Pplot(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
Q m2,p2,w300,s_id; |
Q m2,p2,w300,s_id; |
NODE defrange; |
NODE defrange; |
LIST xrange,range[1],list,geom; |
LIST xrange,range[1],list,geom; |
VL vl,vl0; |
VL vl,vl0; |
V v[1],av[1]; |
V v[1],av[1]; |
int stream,ri,id,i; |
int stream,ri,i; |
P poly; |
P poly; |
P var; |
P var; |
NODE n,n0; |
NODE n,n0; |
|
|
switch ( OID(BDY(arg)) ) { |
switch ( OID(BDY(arg)) ) { |
case O_P: case O_R: |
case O_P: case O_R: |
poly = (P)BDY(arg); |
poly = (P)BDY(arg); |
get_vars_recursive(poly,&vl); |
get_vars_recursive((Obj)poly,&vl); |
for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) ) |
for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) ) |
if ( vl0->v->attr == V_IND ) |
if ( vl0->v->attr == (pointer)V_IND ) |
if ( i >= 1 ) |
if ( i >= 1 ) |
error("ifplot : invalid argument"); |
error("ifplot : invalid argument"); |
else |
else |
|
|
Pox_rpc(arg,rp); |
Pox_rpc(arg,rp); |
} |
} |
|
|
void Pplotover(arg,rp) |
void Pplotover(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
Q s_id,index; |
Q s_id,index; |
P poly; |
P poly; |
|
|
|
|
/* arg = [x,y,r,s_id,index] */ |
/* arg = [x,y,r,s_id,index] */ |
|
|
void Pdrawcircle(arg,rp) |
void Pdrawcircle(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
Q s_id,index; |
Q s_id,index; |
Obj x,y,r; |
Obj x,y,r; |
|
|
} |
} |
|
|
/* draw_obj(s_id,cindex,point|line); point = [x,y], line = [xa,ya,xb,yb] */ |
/* draw_obj(s_id,cindex,point|line); point = [x,y], line = [xa,ya,xb,yb] */ |
void Pdraw_obj(arg,rp) |
void Pdraw_obj(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
static STRING fname; |
static STRING fname; |
Q s_id,index; |
Q s_id,index; |
|
|
Pox_cmo_rpc(arg,rp); |
Pox_cmo_rpc(arg,rp); |
} |
} |
|
|
void Pclear_canvas(arg,rp) |
void Pclear_canvas(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
static STRING fname; |
static STRING fname; |
Q s_id,index; |
Q s_id,index; |
LIST obj; |
|
|
|
if ( !fname ) { |
if ( !fname ) { |
MKSTR(fname,"clear_canvas"); |
MKSTR(fname,"clear_canvas"); |
|
|
} |
} |
|
|
#if 0 |
#if 0 |
void Parrayplot(arg,rp) |
void Parrayplot(NODE arg,Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
int s; |
int s; |
int id; |
int id; |