Annotation of OpenXM_contrib2/asir2000/io/cpexpr.c, Revision 1.11
1.3 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.4 noro 26: * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification
1.3 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.
1.11 ! noro 47: * $OpenXM: OpenXM_contrib2/asir2000/io/cpexpr.c,v 1.10 2001/03/15 05:52:12 noro Exp $
1.3 noro 48: */
1.1 noro 49: #include "ca.h"
50: #include "parse.h"
1.2 noro 51: #include "al.h"
1.1 noro 52: #include "base.h"
53:
1.8 noro 54: extern int hex_output,fortran_output,double_output,real_digit;
1.2 noro 55:
56: #define PRINTHAT (fortran_output?PUTS("**"):PUTS("^"))
57:
1.1 noro 58: #define TAIL
59: #define PUTS(s) (total_length+=strlen(s))
60: #define PRINTN length_n
1.2 noro 61: #define PRINTBF length_bf
1.1 noro 62: #define PRINTCPLX length_cplx
1.2 noro 63: #define PRINTLM length_lm
64: #define PRINTUP2 length_up2
1.1 noro 65: #define PRINTV length_v
66: #define PRINTEXPR length_expr
67: #define PRINTNUM length_num
68: #define PRINTP length_p
69: #define PRINTR length_r
70: #define PRINTLIST length_list
71: #define PRINTVECT length_vect
72: #define PRINTMAT length_mat
73: #define PRINTSTR length_str
74: #define PRINTCOMP length_comp
75: #define PRINTDP length_dp
1.2 noro 76: #define PRINTUI length_ui
77: #define PRINTGF2MAT length_gf2mat
78: #define PRINTGFMMAT length_gfmmat
1.5 noro 79: #define PRINTBYTEARRAY length_bytearray
1.11 ! noro 80: #define PRINTQUOTE length_QUOTE
1.2 noro 81: #define PRINTERR length_err
82: #define PRINTLF length_lf
83: #define PRINTLOP length_lop
84: #define PRINTFOP length_fop
85: #define PRINTEOP length_eop
86: #define PRINTQOP length_qop
87: #define PRINTUP length_up
1.1 noro 88:
89: void PRINTEXPR();
90: void PRINTNUM();
1.2 noro 91: void PRINTN();
1.1 noro 92: void PRINTV();
93: void PRINTP();
94: void PRINTR();
95: void PRINTLIST();
96: void PRINTVECT();
97: void PRINTMAT();
98: void PRINTSTR();
99: void PRINTCOMP();
100: void PRINTDP();
1.2 noro 101: void PRINTUI();
102: void PRINTGF2MAT();
103: void PRINTGFMMAT();
1.5 noro 104: void PRINTBYTEARRAY();
1.11 ! noro 105: void PRINTQUOTE();
1.2 noro 106: void PRINTERR();
1.1 noro 107: void PRINTCPLX();
1.2 noro 108: void PRINTLM();
109: void PRINTLF();
110: void PRINTUP2();
1.1 noro 111:
112: static int total_length;
113:
114: int estimate_length(vl,p)
115: VL vl;
116: pointer p;
117: {
118: total_length = 0;
119: PRINTEXPR(vl,p);
120: return total_length;
121: }
122:
1.2 noro 123: #if PARI
124: void PRINTBF(a)
125: BF a;
126: {
127: char *str;
128: char *GENtostr();
1.7 noro 129: char *GENtostr0();
130: void myoutbrute();
1.2 noro 131:
1.7 noro 132: if ( double_output ) {
133: str = GENtostr0(a->body,myoutbrute);
134: } else {
135: str = GENtostr(a->body);
136: }
1.2 noro 137: total_length += strlen(str);
138: free(str);
139: }
140: #endif
141:
1.1 noro 142: void PRINTEXPR(vl,p)
143: VL vl;
144: pointer p;
145: {
146: if ( !p ) {
147: total_length++;
148: return;
149: }
150:
151: switch ( OID(p) ) {
152: case O_N:
153: PRINTNUM((Num)p); break;
154: case O_P:
155: PRINTP(vl,(P)p); break;
156: case O_R:
157: PRINTR(vl,(R)p); break;
158: case O_LIST:
159: PRINTLIST(vl,(LIST)p); break;
160: case O_VECT:
161: PRINTVECT(vl,(VECT)p); break;
162: case O_MAT:
163: PRINTMAT(vl,(MAT)p); break;
164: case O_STR:
165: PRINTSTR((STRING)p); break;
166: case O_COMP:
167: PRINTCOMP(vl,(COMP)p); break;
168: case O_DP:
169: PRINTDP(vl,(DP)p); break;
1.2 noro 170: case O_USINT:
171: PRINTUI(vl,(USINT)p); break;
172: case O_GF2MAT:
173: PRINTGF2MAT(vl,(GF2MAT)p); break;
174: case O_ERR:
175: PRINTERR(vl,(ERR)p); break;
176: case O_MATHCAP:
177: PRINTLIST(vl,((MATHCAP)p)->body); break;
178: case O_F:
179: PRINTLF(vl,(F)p); break;
180: case O_GFMMAT:
181: PRINTGFMMAT(vl,(GFMMAT)p); break;
1.5 noro 182: case O_BYTEARRAY:
183: PRINTBYTEARRAY(vl,(BYTEARRAY)p); break;
1.11 ! noro 184: case O_QUOTE:
! 185: PRINTQUOTE(vl,(QUOTE)p); break;
1.1 noro 186: default:
187: break;
188: }
189: }
190:
191: void PRINTN(n)
192: N n;
193: {
194: double ceil();
195:
196: if ( !n )
197: PUTS("0");
1.2 noro 198: else if ( hex_output )
199: total_length += 2+(int)(PL(n)*8);
1.1 noro 200: else
201: total_length += (int)(ceil(0.31*((double)(BSH*PL(n))))+1);
202: }
203:
204: void PRINTNUM(q)
205: Num q;
206: {
207: if ( !q ) {
208: PUTS("0");
209: return;
210: }
211: switch ( NID(q) ) {
212: case N_Q:
213: if ( SGN((Q)q) == -1 )
214: PUTS("-");
215: PRINTN(NM((Q)q));
216: if ( !INT((Q)q) ) {
217: PUTS("/"); PRINTN(DN((Q)q));
218: }
219: break;
220: case N_R:
1.7 noro 221: if ( double_output )
1.8 noro 222: total_length += 400+real_digit; /* XXX */
1.7 noro 223: else
1.8 noro 224: total_length += 20+real_digit; /* XXX */
1.1 noro 225: break;
226: case N_A:
227: PUTS("("); PRINTR(ALG,(R)BDY((Alg)q)); PUTS(")");
228: break;
229: #if PARI
230: case N_B:
231: PRINTBF((BF)q); break;
232: #endif
233: case N_C:
234: PRINTCPLX((C)q); break;
235: case N_M:
1.2 noro 236: total_length += 11; /* XXX */
237: break;
238: case N_LM:
239: PRINTN(((LM)q)->body); break;
240: case N_GF2N:
241: if ( hex_output )
242: PRINTN((N)(((GF2N)q)->body));
243: else
244: PRINTUP2(((GF2N)q)->body);
245: break;
246: case N_GFPN:
247: PRINTUP((UP)(((GFPN)q)->body));
1.9 noro 248: break;
249: case N_GFS:
1.10 noro 250: total_length += 13; /* XXX */
1.2 noro 251: break;
252: default:
1.1 noro 253: break;
254: }
255: }
256:
257: void PRINTCPLX(a)
258: C a;
259: {
260: PUTS("(");
261: if ( a->r )
262: PRINTNUM(a->r);
263: if ( a->i ) {
264: if ( a->r && (compnum(0,a->i,0) > 0) )
265: PUTS("+");
266: PRINTNUM(a->i); PUTS("*@i");
267: }
268: PUTS(")");
269: }
270:
271: void PRINTP(vl,p)
272: VL vl;
273: P p;
274: {
275: V v;
276: DCP dc;
277: int t;
278:
279: if ( !p )
280: PUTS("0");
281: else if ( NUM(p) )
282: PRINTNUM((Num)p);
283: else
284: for ( dc = DC(p), v = VR(p); dc; dc = NEXT(dc) ) {
285: if ( !DEG(dc) )
286: PRINTP(vl,COEF(dc));
287: else {
288: if ( NUM(COEF(dc)) && UNIQ((Q)COEF(dc)) ) {
289: ;
290: } else if ( NUM(COEF(dc)) && MUNIQ((Q)COEF(dc)) )
291: PUTS("-");
292: else if ( NUM(COEF(dc)) || !NEXT(DC(COEF(dc)))) {
293: PRINTP(vl,COEF(dc)); PUTS("*");
294: } else {
295: PUTS("("); PRINTP(vl,COEF(dc)); PUTS(")*");
296: }
297: PRINTV(vl,v);
298: if ( cmpq(DEG(dc),ONE) ) {
1.2 noro 299: PRINTHAT;
1.1 noro 300: if ( INT(DEG(dc)) && SGN(DEG(dc))>0 )
301: PRINTNUM((Num)DEG(dc));
302: else {
303: PUTS("("); PRINTNUM((Num)DEG(dc)); PUTS(")");
304: }
305: }
306: }
307: if ( NEXT(dc) ) {
308: P t;
309:
310: t = COEF(NEXT(dc));
311: if (!DEG(NEXT(dc))) {
312: if ( NUM(t) ) {
313: if ( !mmono(t) )
314: PUTS("+");
315: } else {
316: if (!mmono(COEF(DC(t))))
317: PUTS("+");
318: }
319: } else {
320: if ( !mmono(t) )
321: PUTS("+");
322: }
323: }
324: }
325: }
326:
1.2 noro 327: extern int hideargs;
328:
1.1 noro 329: void PRINTV(vl,v)
330: VL vl;
331: V v;
332: {
333: PF pf;
334: PFAD ad;
335: int i;
336:
337: if ( NAME(v) )
338: PUTS(NAME(v));
339: else if ( (vid)v->attr == V_PF ) {
340: pf = ((PFINS)v->priv)->pf; ad = ((PFINS)v->priv)->ad;
341: if ( !strcmp(NAME(pf),"pow") ) {
1.2 noro 342: PUTS("("); PRINTR(vl,(R)ad[0].arg); PUTS(")"); PRINTHAT; PUTS("(");
1.1 noro 343: PRINTR(vl,(R)ad[1].arg); PUTS(")");
344: } else if ( !pf->argc )
345: PUTS(NAME(pf));
346: else {
1.2 noro 347: if ( hideargs ) {
348: for ( i = 0; i < pf->argc; i++ )
349: if ( ad[i].d )
350: break;
351: if ( i < pf->argc ) {
352: PUTS(NAME(pf));
1.1 noro 353: total_length += 11; /* XXX */
1.2 noro 354: for ( i = 1; i < pf->argc; i++ ) {
355: total_length += 11; /* XXX */
356: }
357: PUTS("}");
358: } else {
359: PUTS(NAME(pf));
360: total_length += 1; /* XXX */
1.1 noro 361: }
362: } else {
1.2 noro 363: for ( i = 0; i < pf->argc; i++ )
364: if ( ad[i].d )
365: break;
366: if ( i < pf->argc ) {
367: PUTS(NAME(pf));
368: total_length += 11; /* XXX */
369: for ( i = 1; i < pf->argc; i++ ) {
370: total_length += 11; /* XXX */
371: }
372: PUTS(")(");
373: } else {
374: PUTS(NAME(pf));
375: total_length += 1; /* XXX */
376: }
377: PRINTR(vl,(R)ad[0].arg);
378: for ( i = 1; i < pf->argc; i++ ) {
379: PUTS(","); PRINTR(vl,(R)ad[i].arg);
380: }
381: PUTS(")");
1.1 noro 382: }
383: }
384: }
385: }
386:
387: void PRINTR(vl,a)
388: VL vl;
389: R a;
390: {
391: if ( !a )
392: PUTS("0");
393: else
394: switch (OID(a)) {
395: case O_N: case O_P:
396: PRINTP(vl,(P)a); break;
397: default:
398: PUTS("("); PRINTP(vl,NM((R)a)); PUTS(")/("); PRINTP(vl,DN((R)a)); PUTS(")");
399: break;
400: }
401: }
402:
403: void PRINTVECT(vl,vect)
404: VL vl;
405: VECT vect;
406: {
407: int i;
408: pointer *ptr;
409:
410: PUTS("[ ");
411: for ( i = 0, ptr = BDY(vect); i < vect->len; i++ ) {
412: PRINTEXPR(vl,ptr[i]); PUTS(" ");
413: }
414: PUTS("]");
415: }
416:
417: void PRINTMAT(vl,mat)
418: VL vl;
419: MAT mat;
420: {
421: int i,j,r,c;
422: pointer *ptr;
423:
424: for ( i = 0, r = mat->row, c = mat->col; i < r; i++ ) {
425: PUTS("[ ");
426: for ( j = 0, ptr = BDY(mat)[i]; j < c; j++ ) {
427: PRINTEXPR(vl,ptr[j]); PUTS(" ");
428: }
429: PUTS("]");
430: if ( i < r - 1 )
431: PUTS("\n");
432: }
433: }
434:
435: void PRINTLIST(vl,list)
436: VL vl;
437: LIST list;
438: {
439: NODE tnode;
440:
441: PUTS("[");
442: for ( tnode = (NODE)list->body; tnode; tnode = NEXT(tnode) ) {
443: PRINTEXPR(vl,tnode->body);
444: if ( NEXT(tnode) )
445: PUTS(",");
446: }
447: PUTS("]");
448: }
449:
450: void PRINTSTR(str)
451: STRING str;
452: {
453: char *p;
454:
455: for ( p = BDY(str); *p; p++ )
456: if ( *p == '"' )
457: PUTS("\"");
458: else {
459: total_length += 1;
460: }
461: }
462:
463: void PRINTCOMP(vl,c)
464: VL vl;
465: COMP c;
466: {
467: int n,i;
468:
469: n = getcompsize((int)c->type);
470: PUTS("{");
471: for ( i = 0; i < n; i++ ) {
472: PRINTEXPR(vl,(pointer)c->member[i]);
473: if ( i < n-1 )
474: PUTS(",");
475: }
476: PUTS("}");
477: }
478:
479: void PRINTDP(vl,d)
480: VL vl;
481: DP d;
482: {
483: int n,i;
484: MP m;
485: DL dl;
486:
487: for ( n = d->nv, m = BDY(d); m; m = NEXT(m) ) {
488: PUTS("("); PRINTEXPR(vl,(pointer)m->c); PUTS(")*<<");
489: for ( i = 0, dl = m->dl; i < n-1; i++ ) {
490: total_length += 11;
491: }
492: total_length += 10;
493: PUTS(">>");
494: if ( NEXT(m) )
495: PUTS("+");
1.2 noro 496: }
497: }
498:
499: void PRINTUI(vl,u)
500: VL vl;
501: USINT u;
502: {
503: total_length += 10;
504: }
505:
506: void PRINTGF2MAT(vl,mat)
507: VL vl;
508: GF2MAT mat;
509: {
510: int row,col,w,i,j,k,m;
511: unsigned int t;
512: unsigned int **b;
513:
514: row = mat->row;
515: col = mat->col;
516: w = (col+BSH-1)/BSH;
517: b = mat->body;
518: for ( i = 0; i < row; i++ ) {
519: for ( j = 0, m = 0; j < w; j++ ) {
520: t = b[i][j];
521: for ( k = 0; m < col && k < BSH; k++, m++ )
522: if ( t & (1<<k) )
523: PUTS("1");
524: else
525: PUTS("0");
526: }
527: PUTS("\n");
528: }
529: }
530:
531: void PRINTGFMMAT(vl,mat)
532: VL vl;
533: GFMMAT mat;
534: {
535: int row,col,i,j;
536: unsigned int t;
537: unsigned int **b;
538:
539: row = mat->row;
540: col = mat->col;
541: b = mat->body;
542: for ( i = 0; i < row; i++ ) {
543: PUTS("[");
544: for ( j = 0; j < col; j++ ) {
545: total_length += 10; /* XXX */
546: }
547: PUTS("]\n");
548: }
1.5 noro 549: }
550:
551: void PRINTBYTEARRAY(vl,array)
552: VL vl;
553: BYTEARRAY array;
554: {
555: /* |xx xx ... xx| */
1.6 noro 556: total_length += 1+3*array->len;
1.11 ! noro 557: }
! 558:
! 559: void PRINTQUOTE(vl,quote)
! 560: VL vl;
! 561: QUOTE quote;
! 562: {
! 563: /* <...quoted...> */
! 564: total_length += 20;
1.2 noro 565: }
566:
567: void PRINTERR(vl,e)
568: VL vl;
569: ERR e;
570: {
571: PUTS("error("); PRINTEXPR(vl,e->body); PUTS(")");
572: }
573:
574: void PRINTUP2(p)
575: UP2 p;
576: {
577: int d,i;
578:
579: if ( !p ) {
580: PUTS("0");
581: } else {
582: d = degup2(p);
583: PUTS("(");
584: if ( !d ) {
585: PUTS("1");
586: } else if ( d == 1 ) {
587: PUTS("@");
588: } else {
589: PRINTHAT;
590: total_length += 11;
591: }
592: for ( i = d-1; i >= 0; i-- ) {
593: if ( p->b[i/BSH] & (1<<(i%BSH)) )
594: if ( !i ) {
595: PUTS("+1");
596: } else if ( i == 1 ) {
597: PUTS("+@");
598: } else {
599: PRINTHAT;
600: total_length += 12;
601: }
602: }
603: PUTS(")");
604: }
605: }
606:
607: void PRINTLF(vl,f)
608: VL vl;
609: F f;
610: {
611: switch ( FOP(f) ) {
612: case AL_TRUE:
613: PUTS("@true");
614: break;
615: case AL_FALSE:
616: PUTS("@false");
617: break;
618:
619: case AL_OR: case AL_AND:
620: PRINTFOP(vl,f); break;
621: case AL_NOT: case AL_IMPL: case AL_REPL: case AL_EQUIV:
622: PRINTEOP(vl,f); break;
623:
624: case AL_EQUAL: case AL_NEQ: case AL_LESSP:
625: case AL_GREATERP: case AL_LEQ: case AL_GEQ:
626: PRINTLOP(vl,f); break;
627:
628: case AL_EX: case AL_ALL:
629: PRINTQOP(vl,f); break;
630: default:
631: break;
632: }
633: }
634:
635: PRINTFOP(vl,f)
636: VL vl;
637: F f;
638: {
639: char *op;
640: NODE n;
641:
642: op = FOP(f)==AL_OR?" @|| ":" @&& ";
643: n = FJARG(f);
644: PUTS("("); PRINTEXPR(vl,BDY(n)); PUTS(")");
645: for ( n = NEXT(n); n; n = NEXT(n) ) {
646: PUTS(op); PUTS("("); PRINTEXPR(vl,BDY(n)); PUTS(")");
647: }
648: }
649:
650: PRINTEOP(vl,f)
651: VL vl;
652: F f;
653: {
654: oFOP op;
655: char *sop;
656:
657: if ( (op = FOP(f)) == AL_NOT ) {
658: PUTS("(@! "); PRINTEXPR(vl,(Obj)FARG(f)); PUTS(")"); return;
659: }
660: switch ( op ) {
661: case AL_IMPL:
662: sop = " @impl "; break;
663: case AL_REPL:
664: sop = " @repl "; break;
665: case AL_EQUIV:
666: sop = " @equiv "; break;
667: default:
668: break;
669: }
670: PUTS("(");
671: PRINTEXPR(vl,(Obj)FLHS(f));
672: PUTS(sop);
673: PRINTEXPR(vl,(Obj)FRHS(f));
674: PUTS(")");
675: }
676:
677: PRINTLOP(vl,f)
678: VL vl;
679: F f;
680: {
681: char *op;
682:
683: switch ( FOP(f) ) {
684: case AL_EQUAL:
685: op = " @== "; break;
686: case AL_NEQ:
687: op = " @!= "; break;
688: case AL_LESSP:
689: op = " @< "; break;
690: case AL_GREATERP:
691: op = " @> "; break;
692: case AL_LEQ:
693: op = " @<= "; break;
694: case AL_GEQ:
695: op = " @>= "; break;
696: default:
697: error("PRINTLOP : invalid operator");
698: break;
699: }
700: PRINTEXPR(vl,(Obj)FPL(f)); PUTS(op); PUTS("0");
701: }
702:
703: PRINTQOP(vl,f)
704: VL vl;
705: F f;
706: {
707: char *op;
708:
709: op = FOP(f)==AL_EX?"ex":"all";
710: PUTS(op); PUTS(NAME(FQVR(f)));
711: total_length += 2;
712: PRINTEXPR(vl,(Obj)FQMAT(f)); PUTS(")");
713: }
714:
715: PRINTUP(n)
716: UP n;
717: {
718: int i,d;
719:
720: if ( !n )
721: PUTS("0");
722: else if ( !n->d )
723: PRINTNUM(n->c[0]);
724: else {
725: d = n->d;
726: PUTS("(");
727: if ( !d ) {
728: PRINTNUM(n->c[d]);
729: } else if ( d == 1 ) {
730: PRINTNUM(n->c[d]);
731: PUTS("*@p");
732: } else {
733: PRINTNUM(n->c[d]);
734: PRINTHAT;
735: total_length += 13;
736: }
737: for ( i = d-1; i >= 0; i-- ) {
738: if ( n->c[i] ) {
739: PUTS("+("); PRINTNUM(n->c[i]); PUTS(")");
740: if ( i >= 2 ) {
741: PRINTHAT;
742: total_length += 13;
743: } else if ( i == 1 )
744: PUTS("*@p");
745: }
746: }
747: PUTS(")");
1.1 noro 748: }
749: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>