Annotation of OpenXM_contrib2/asir2000/plot/plotf.c, Revision 1.10
1.4 noro 1: /*
2: * Copyright (c) 1994-2000 FUJITSU LABORATORIES LIMITED
3: * All rights reserved.
4: *
5: * FUJITSU LABORATORIES LIMITED ("FLL") hereby grants you a limited,
6: * non-exclusive and royalty-free license to use, copy, modify and
7: * redistribute, solely for non-commercial and non-profit purposes, the
8: * computer program, "Risa/Asir" ("SOFTWARE"), subject to the terms and
9: * conditions of this Agreement. For the avoidance of doubt, you acquire
10: * only a limited right to use the SOFTWARE hereunder, and FLL or any
11: * third party developer retains all rights, including but not limited to
12: * copyrights, in and to the SOFTWARE.
13: *
14: * (1) FLL does not grant you a license in any way for commercial
15: * purposes. You may use the SOFTWARE only for non-commercial and
16: * non-profit purposes only, such as academic, research and internal
17: * business use.
18: * (2) The SOFTWARE is protected by the Copyright Law of Japan and
19: * international copyright treaties. If you make copies of the SOFTWARE,
20: * with or without modification, as permitted hereunder, you shall affix
21: * to all such copies of the SOFTWARE the above copyright notice.
22: * (3) An explicit reference to this SOFTWARE and its copyright owner
23: * shall be made on your publication or presentation in any form of the
24: * results obtained by use of the SOFTWARE.
25: * (4) In the event that you modify the SOFTWARE, you shall notify FLL by
1.5 noro 26: * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification
1.4 noro 27: * for such modification or the source code of the modified part of the
28: * SOFTWARE.
29: *
30: * THE SOFTWARE IS PROVIDED AS IS WITHOUT ANY WARRANTY OF ANY KIND. FLL
31: * MAKES ABSOLUTELY NO WARRANTIES, EXPRESSED, IMPLIED OR STATUTORY, AND
32: * EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
33: * FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT OF THIRD PARTIES'
34: * RIGHTS. NO FLL DEALER, AGENT, EMPLOYEES IS AUTHORIZED TO MAKE ANY
35: * MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS WARRANTY.
36: * UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT,
37: * OR OTHERWISE, SHALL FLL BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY
38: * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
39: * DAMAGES OF ANY CHARACTER, INCLUDING, WITHOUT LIMITATION, DAMAGES
40: * ARISING OUT OF OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, DAMAGES
41: * FOR LOSS OF GOODWILL, WORK STOPPAGE, OR LOSS OF DATA, OR FOR ANY
42: * DAMAGES, EVEN IF FLL SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
43: * SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. EVEN IF A PART
44: * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
45: * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
46: * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
47: *
1.10 ! noro 48: * $OpenXM: OpenXM_contrib2/asir2000/plot/plotf.c,v 1.9 2001/06/04 02:49:49 noro Exp $
1.4 noro 49: */
1.1 noro 50: #include "ca.h"
51: #include "parse.h"
52: #include "ox.h"
53: #include "ifplot.h"
54:
55: void Pifplot(), Pconplot(), Pplotover(), Pplot(), Parrayplot(), Pdrawcircle();
1.10 ! noro 56: void Pmemory_ifplot();
1.6 noro 57: void Popen_canvas(), Pclear_canvas(), Pdraw_obj();
1.1 noro 58:
59: struct ftab plot_tab[] = {
60: {"ifplot",Pifplot,-7},
1.10 ! noro 61: {"memory_ifplot",Pmemory_ifplot,-7},
1.1 noro 62: {"conplot",Pconplot,-8},
63: {"plot",Pplot,-6},
64: {"plotover",Pplotover,3},
65: {"drawcircle",Pdrawcircle,5},
1.6 noro 66: {"open_canvas",Popen_canvas,-3},
67: {"clear_canvas",Pclear_canvas,2},
1.7 noro 68: {"draw_obj",Pdraw_obj,-4},
1.1 noro 69: /*
70: {"arrayplot",Parrayplot,2},
71: */
72: {0,0,0},
73: };
74:
75: int current_s;
76:
1.6 noro 77: void Popen_canvas(arg,rp)
78: NODE arg;
79: Obj *rp;
80: {
1.9 noro 81: Q w300,s_id;
1.6 noro 82: LIST geom;
83: int stream,id,i;
84: NODE n,n0;
85: STRING fname,wname;
86:
87: geom = 0; wname = 0; stream = -1;
88: for ( ; arg; arg = NEXT(arg) )
89: if ( !BDY(arg) )
90: stream = 0;
91: else
92: switch ( OID(BDY(arg)) ) {
93: case O_LIST:
94: geom = (LIST)BDY(arg);
95: break;
96: case O_N:
97: stream = QTOS((Q)BDY(arg)); break;
98: case O_STR:
99: wname = (STRING)BDY(arg); break;
100: default:
101: error("open_canvas : invalid argument"); break;
102: }
103: /* open_canvas in ox_plot requires
1.9 noro 104: [s_id (Q),
1.6 noro 105: geom=[xsize,ysize] (LIST),
106: wname=name (STRING)]
107: */
108:
109: if ( stream < 0 )
110: stream = current_s;
111: else
112: current_s = stream;
1.9 noro 113: STOQ(stream,s_id);
1.6 noro 114: if ( !geom ) {
115: STOQ(300,w300);
116: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
117: }
118: MKSTR(fname,"open_canvas");
1.9 noro 119: arg = mknode(4,s_id,fname,geom,wname);
1.6 noro 120: Pox_cmo_rpc(arg,rp);
121: }
122:
1.1 noro 123: void Pifplot(arg,rp)
124: NODE arg;
125: Obj *rp;
126: {
1.9 noro 127: Q m2,p2,w300,s_id;
1.1 noro 128: NODE defrange;
129: LIST xrange,yrange,range[2],list,geom;
130: VL vl,vl0;
131: V v[2],av[2];
132: int stream,ri,id,i;
133: P poly;
134: P var;
135: NODE n,n0;
136: STRING fname,wname;
137:
138: STOQ(-2,m2); STOQ(2,p2);
139: MKNODE(n,p2,0); MKNODE(defrange,m2,n);
140: poly = 0; vl = 0; geom = 0; wname = 0; stream = -1; ri = 0;
141: for ( ; arg; arg = NEXT(arg) )
142: if ( !BDY(arg) )
143: stream = 0;
144: else
145: switch ( OID(BDY(arg)) ) {
146: case O_P:
147: poly = (P)BDY(arg);
148: get_vars_recursive(poly,&vl);
149: for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) )
150: if ( vl0->v->attr == V_IND )
151: if ( i >= 2 )
152: error("ifplot : invalid argument");
153: else
154: v[i++] = vl0->v;
155: break;
156: case O_LIST:
157: list = (LIST)BDY(arg);
158: if ( OID(BDY(BDY(list))) == O_P )
159: if ( ri > 1 )
160: error("ifplot : invalid argument");
161: else
162: range[ri++] = list;
163: else
164: geom = list;
165: break;
166: case O_N:
167: stream = QTOS((Q)BDY(arg)); break;
168: case O_STR:
169: wname = (STRING)BDY(arg); break;
170: default:
171: error("ifplot : invalid argument"); break;
172: }
173: if ( !poly )
174: error("ifplot : invalid argument");
175: switch ( ri ) {
176: case 0:
177: if ( !v[1] )
178: error("ifplot : please specify all variables");
179: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
180: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
181: break;
182: case 1:
183: if ( !v[1] )
184: error("ifplot : please specify all variables");
185: av[0] = VR((P)BDY(BDY(range[0])));
186: if ( v[0] == av[0] ) {
187: xrange = range[0];
188: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
189: } else if ( v[1] == av[0] ) {
190: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
191: yrange = range[0];
192: } else
193: error("ifplot : invalid argument");
194: break;
195: case 2:
196: av[0] = VR((P)BDY(BDY(range[0])));
197: av[1] = VR((P)BDY(BDY(range[1])));
198: if ( ((v[0] == av[0]) && (!v[1] || v[1] == av[1])) ||
199: ((v[0] == av[1]) && (!v[1] || v[1] == av[0])) ) {
200: xrange = range[0]; yrange = range[1];
201: } else
202: error("ifplot : invalid argument");
203: break;
204: default:
205: error("ifplot : cannot happen"); break;
206: }
207: /* ifplot in ox_plot requires
1.9 noro 208: [s_id (Q),
1.1 noro 209: formula (Obj),
210: xrange=[x,xmin,xmax] (LIST),
211: yrange=[y,ymin,ymax] (LIST),
212: zrange=0,
213: geom=[xsize,ysize] (LIST),
214: wname=name (STRING)]
215: */
216:
217: if ( stream < 0 )
218: stream = current_s;
219: else
220: current_s = stream;
1.9 noro 221: STOQ(stream,s_id);
1.1 noro 222: if ( !geom ) {
223: STOQ(300,w300);
224: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
225: }
226: MKSTR(fname,"plot");
1.9 noro 227: arg = mknode(8,s_id,fname,poly,xrange,yrange,0,geom,wname);
1.10 ! noro 228: Pox_rpc(arg,rp);
! 229: }
! 230:
! 231: void Pmemory_ifplot(arg,rp)
! 232: NODE arg;
! 233: Obj *rp;
! 234: {
! 235: Q m2,p2,w300,s_id;
! 236: NODE defrange;
! 237: LIST xrange,yrange,range[2],list,geom;
! 238: VL vl,vl0;
! 239: V v[2],av[2];
! 240: int stream,ri,id,i;
! 241: P poly;
! 242: P var;
! 243: NODE n,n0;
! 244: STRING fname,wname;
! 245:
! 246: STOQ(-2,m2); STOQ(2,p2);
! 247: MKNODE(n,p2,0); MKNODE(defrange,m2,n);
! 248: poly = 0; vl = 0; geom = 0; stream = -1; ri = 0;
! 249: for ( ; arg; arg = NEXT(arg) )
! 250: if ( !BDY(arg) )
! 251: stream = 0;
! 252: else
! 253: switch ( OID(BDY(arg)) ) {
! 254: case O_P:
! 255: poly = (P)BDY(arg);
! 256: get_vars_recursive(poly,&vl);
! 257: for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) )
! 258: if ( vl0->v->attr == V_IND )
! 259: if ( i >= 2 )
! 260: error("ifplot : invalid argument");
! 261: else
! 262: v[i++] = vl0->v;
! 263: break;
! 264: case O_LIST:
! 265: list = (LIST)BDY(arg);
! 266: if ( OID(BDY(BDY(list))) == O_P )
! 267: if ( ri > 1 )
! 268: error("ifplot : invalid argument");
! 269: else
! 270: range[ri++] = list;
! 271: else
! 272: geom = list;
! 273: break;
! 274: case O_N:
! 275: stream = QTOS((Q)BDY(arg)); break;
! 276: default:
! 277: error("memory_ifplot : invalid argument"); break;
! 278: }
! 279: if ( !poly )
! 280: error("memory_ifplot : invalid argument");
! 281: switch ( ri ) {
! 282: case 0:
! 283: if ( !v[1] )
! 284: error("memory_ifplot : please specify all variables");
! 285: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
! 286: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
! 287: break;
! 288: case 1:
! 289: if ( !v[1] )
! 290: error("memory_ifplot : please specify all variables");
! 291: av[0] = VR((P)BDY(BDY(range[0])));
! 292: if ( v[0] == av[0] ) {
! 293: xrange = range[0];
! 294: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
! 295: } else if ( v[1] == av[0] ) {
! 296: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
! 297: yrange = range[0];
! 298: } else
! 299: error("memory_ifplot : invalid argument");
! 300: break;
! 301: case 2:
! 302: av[0] = VR((P)BDY(BDY(range[0])));
! 303: av[1] = VR((P)BDY(BDY(range[1])));
! 304: if ( ((v[0] == av[0]) && (!v[1] || v[1] == av[1])) ||
! 305: ((v[0] == av[1]) && (!v[1] || v[1] == av[0])) ) {
! 306: xrange = range[0]; yrange = range[1];
! 307: } else
! 308: error("memory_ifplot : invalid argument");
! 309: break;
! 310: default:
! 311: error("memory_ifplot : cannot happen"); break;
! 312: }
! 313: /* memory_ifplot in ox_plot requires
! 314: [s_id (Q),
! 315: formula (Obj),
! 316: xrange=[x,xmin,xmax] (LIST),
! 317: yrange=[y,ymin,ymax] (LIST),
! 318: zrange=0,
! 319: geom=[xsize,ysize] (LIST)]
! 320: */
! 321:
! 322: if ( stream < 0 )
! 323: stream = current_s;
! 324: else
! 325: current_s = stream;
! 326: STOQ(stream,s_id);
! 327: if ( !geom ) {
! 328: STOQ(300,w300);
! 329: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
! 330: }
! 331: MKSTR(fname,"memory_plot");
! 332: arg = mknode(7,s_id,fname,poly,xrange,yrange,0,geom);
1.3 noro 333: Pox_rpc(arg,rp);
1.1 noro 334: }
335:
336: void Pconplot(arg,rp)
337: NODE arg;
338: Obj *rp;
339: {
1.9 noro 340: Q m2,p2,w300,s_id;
1.1 noro 341: NODE defrange;
342: LIST xrange,yrange,zrange,range[3],list,geom;
343: VL vl,vl0;
344: V v[2],av[2];
345: int stream,ri,id,i;
346: P poly;
347: P var;
348: NODE n,n0;
349: STRING fname,wname;
350:
351: STOQ(-2,m2); STOQ(2,p2);
352: MKNODE(n,p2,0); MKNODE(defrange,m2,n);
353: poly = 0; vl = 0; geom = 0; wname = 0; stream = -1; ri = 0;
354: for ( ; arg; arg = NEXT(arg) )
355: if ( !BDY(arg) )
356: stream = 0;
357: else
358: switch ( OID(BDY(arg)) ) {
359: case O_P:
360: poly = (P)BDY(arg);
361: get_vars_recursive(poly,&vl);
362: for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) )
363: if ( vl0->v->attr == V_IND )
364: if ( i >= 2 )
365: error("ifplot : invalid argument");
366: else
367: v[i++] = vl0->v;
368: break;
369: case O_LIST:
370: list = (LIST)BDY(arg);
371: if ( OID(BDY(BDY(list))) == O_P )
372: if ( ri > 2 )
373: error("ifplot : invalid argument");
374: else
375: range[ri++] = list;
376: else
377: geom = list;
378: break;
379: case O_N:
380: stream = QTOS((Q)BDY(arg)); break;
381: case O_STR:
382: wname = (STRING)BDY(arg); break;
383: default:
384: error("ifplot : invalid argument"); break;
385: }
386: if ( !poly )
387: error("ifplot : invalid argument");
388: switch ( ri ) {
389: case 0:
390: if ( !v[1] )
391: error("ifplot : please specify all variables");
392: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
393: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
394: MKNODE(n,0,defrange); MKLIST(zrange,n);
395: break;
396: case 1:
397: if ( !v[1] )
398: error("ifplot : please specify all variables");
399: av[0] = VR((P)BDY(BDY(range[0])));
400: if ( v[0] == av[0] ) {
401: xrange = range[0];
402: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
403: MKNODE(n,0,defrange); MKLIST(zrange,n);
404: } else if ( v[1] == av[0] ) {
405: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
406: yrange = range[0];
407: MKNODE(n,0,defrange); MKLIST(zrange,n);
408: } else {
409: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
410: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
411: zrange = range[0];
412: }
413: break;
414: case 2: case 3:
415: av[0] = VR((P)BDY(BDY(range[0])));
416: av[1] = VR((P)BDY(BDY(range[1])));
417: if ( ((v[0] == av[0]) && (!v[1] || v[1] == av[1])) ||
418: ((v[0] == av[1]) && (!v[1] || v[1] == av[0])) ) {
419: xrange = range[0]; yrange = range[1];
420: if ( ri == 3 )
421: zrange = range[2];
422: else {
423: MKNODE(n,0,defrange); MKLIST(zrange,n);
424: }
425: } else
426: error("ifplot : invalid argument");
427: break;
428: default:
429: error("ifplot : cannot happen"); break;
430: }
431: if ( stream < 0 )
432: stream = current_s;
433: else
434: current_s = stream;
435:
436: /* conplot in ox_plot requires
1.9 noro 437: [s_id (Q),
1.1 noro 438: formula (Obj),
439: xrange=[x,xmin,xmax] (LIST),
440: yrange=[y,ymin,ymax] (LIST),
441: zrange=[z,zmin,zmax] (LIST),
442: geom=[xsize,ysize] (LIST),
443: wname=name (STRING)]
444: */
445:
446: if ( stream < 0 )
447: stream = current_s;
448: else
449: current_s = stream;
1.9 noro 450: STOQ(stream,s_id);
1.1 noro 451: if ( !geom ) {
452: STOQ(300,w300);
453: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
454: }
455: MKSTR(fname,"plot");
1.9 noro 456: arg = mknode(8,s_id,fname,poly,xrange,yrange,zrange,geom,wname);
1.3 noro 457: Pox_rpc(arg,rp);
1.1 noro 458: }
459:
460: void Pplot(arg,rp)
461: NODE arg;
462: Obj *rp;
463: {
1.9 noro 464: Q m2,p2,w300,s_id;
1.1 noro 465: NODE defrange;
466: LIST xrange,range[1],list,geom;
467: VL vl,vl0;
468: V v[1],av[1];
469: int stream,ri,id,i;
470: P poly;
471: P var;
472: NODE n,n0;
473: STRING fname,wname;
474:
475: STOQ(-2,m2); STOQ(2,p2);
476: MKNODE(n,p2,0); MKNODE(defrange,m2,n);
477: poly = 0; vl = 0; geom = 0; wname = 0; stream = -1; ri = 0;
478: for ( ; arg; arg = NEXT(arg) )
479: if ( !BDY(arg) )
480: stream = 0;
481: else
482: switch ( OID(BDY(arg)) ) {
483: case O_P: case O_R:
484: poly = (P)BDY(arg);
485: get_vars_recursive(poly,&vl);
486: for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) )
487: if ( vl0->v->attr == V_IND )
488: if ( i >= 1 )
489: error("ifplot : invalid argument");
490: else
491: v[i++] = vl0->v;
1.8 noro 492: if ( i != 1 )
493: error("ifplot : invalid argument");
1.1 noro 494: break;
495: case O_LIST:
496: list = (LIST)BDY(arg);
497: if ( OID(BDY(BDY(list))) == O_P )
498: if ( ri > 0 )
499: error("plot : invalid argument");
500: else
501: range[ri++] = list;
502: else
503: geom = list;
504: break;
505: case O_N:
506: stream = QTOS((Q)BDY(arg)); break;
507: case O_STR:
508: wname = (STRING)BDY(arg); break;
509: default:
510: error("plot : invalid argument"); break;
511: }
512: if ( !poly )
513: error("plot : invalid argument");
514: switch ( ri ) {
515: case 0:
516: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
517: break;
518: case 1:
519: av[0] = VR((P)BDY(BDY(range[0])));
520: if ( v[0] == av[0] )
521: xrange = range[0];
522: else
523: error("plot : invalid argument");
524: break;
525: default:
526: error("plot : cannot happen"); break;
527: }
528: /* conplot in ox_plot requires
1.9 noro 529: [s_id (Q),
1.1 noro 530: formula (Obj),
531: xrange=[x,xmin,xmax] (LIST),
532: yrange=0,
533: zrange=0,
534: geom=[xsize,ysize] (LIST),
535: wname=name (STRING)]
536: */
537: if ( stream < 0 )
538: stream = current_s;
539: else
540: current_s = stream;
1.9 noro 541: STOQ(stream,s_id);
1.1 noro 542: if ( !geom ) {
543: STOQ(300,w300);
544: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
545: }
546: MKSTR(fname,"plot");
1.9 noro 547: arg = mknode(8,s_id,fname,poly,xrange,0,0,geom,wname);
1.3 noro 548: Pox_rpc(arg,rp);
1.1 noro 549: }
550:
551: void Pplotover(arg,rp)
552: NODE arg;
553: Obj *rp;
554: {
1.9 noro 555: Q s_id,index;
1.1 noro 556: P poly;
557: STRING fname;
558:
559: poly = (P)ARG0(arg);
1.9 noro 560: s_id = (Q)ARG1(arg);
1.1 noro 561: index = (Q)ARG2(arg);
562: MKSTR(fname,"plotover");
1.9 noro 563: arg = mknode(4,s_id,fname,index,poly);
1.3 noro 564: Pox_rpc(arg,rp);
1.1 noro 565: }
566:
1.9 noro 567: /* arg = [x,y,r,s_id,index] */
1.1 noro 568:
569: void Pdrawcircle(arg,rp)
570: NODE arg;
571: Obj *rp;
572: {
1.9 noro 573: Q s_id,index;
1.1 noro 574: Obj x,y,r;
575: STRING fname;
576: NODE n;
577: LIST pos;
578:
579: x = (Obj)ARG0(arg);
580: y = (Obj)ARG1(arg);
581: r = (Obj)ARG2(arg);
1.9 noro 582: s_id = (Q)ARG3(arg);
1.1 noro 583: index = (Q)ARG4(arg);
584: MKSTR(fname,"drawcircle");
585: n = mknode(3,x,y,r); MKLIST(pos,n);
1.9 noro 586: arg = mknode(4,s_id,fname,index,pos);
1.3 noro 587: Pox_rpc(arg,rp);
1.6 noro 588: }
589:
1.9 noro 590: /* draw_obj(s_id,cindex,point|line); point = [x,y], line = [xa,ya,xb,yb] */
1.6 noro 591: void Pdraw_obj(arg,rp)
592: NODE arg;
593: Obj *rp;
594: {
595: static STRING fname;
1.9 noro 596: Q s_id,index;
1.6 noro 597: LIST obj;
598:
599: if ( !fname ) {
600: MKSTR(fname,"draw_obj");
601: }
1.9 noro 602: s_id = (Q)ARG0(arg);
1.6 noro 603: index = (Q)ARG1(arg);
604: obj = (LIST)ARG2(arg);
1.7 noro 605: /* ARG3(arg) = color */
606: if ( argc(arg) == 4 )
1.9 noro 607: arg = mknode(5,s_id,fname,index,obj,ARG3(arg));
1.7 noro 608: else
1.9 noro 609: arg = mknode(4,s_id,fname,index,obj);
1.6 noro 610: Pox_cmo_rpc(arg,rp);
611: }
612:
613: void Pclear_canvas(arg,rp)
614: NODE arg;
615: Obj *rp;
616: {
617: static STRING fname;
1.9 noro 618: Q s_id,index;
1.6 noro 619: LIST obj;
620:
621: if ( !fname ) {
622: MKSTR(fname,"clear_canvas");
623: }
1.9 noro 624: s_id = (Q)ARG0(arg);
1.6 noro 625: index = (Q)ARG1(arg);
1.9 noro 626: arg = mknode(3,s_id,fname,index);
1.6 noro 627: Pox_cmo_rpc(arg,rp);
1.1 noro 628: }
629:
630: #if 0
631: void Parrayplot(arg,rp)
632: NODE arg;
633: Obj *rp;
634: {
635: int s;
636: int id;
637:
638: if ( ID((Obj)ARG0(arg)) == O_VECT && ID((Obj)ARG1(arg)) == O_LIST ) {
639: s = current_s;
640: gensend(s,C_APLOT,0);
641: gensend(s,C_OBJ,ARG0(arg)); gensend(s,C_OBJ,ARG1(arg)); genflush(s);
642: }
643: genrecv(s,&id,rp);
644: }
645: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>