[BACK]Return to pexpr.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / io

Diff for /OpenXM_contrib2/asir2000/io/pexpr.c between version 1.15 and 1.16

version 1.15, 2001/08/28 05:46:26 version 1.16, 2001/09/03 07:01:08
Line 44 
Line 44 
  * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY   * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
  * 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/io/pexpr.c,v 1.14 2001/08/06 01:48:33 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/io/pexpr.c,v 1.15 2001/08/28 05:46:26 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "al.h"  #include "al.h"
Line 99  int print_quote;
Line 99  int print_quote;
 #define PRINTEOP printeop  #define PRINTEOP printeop
 #define PRINTQOP printqop  #define PRINTQOP printqop
 #define PRINTUP printup  #define PRINTUP printup
   #define PRINTUM printum
   #define PRINTSF printsf
 #endif  #endif
   
 #ifdef SPRINT  #ifdef SPRINT
Line 142  extern int print_quote;
Line 144  extern int print_quote;
 #define PRINTEOP sprinteop  #define PRINTEOP sprinteop
 #define PRINTQOP sprintqop  #define PRINTQOP sprintqop
 #define PRINTUP sprintup  #define PRINTUP sprintup
   #define PRINTUM sprintum
   #define PRINTSF sprintsf
 #endif  #endif
   
 void PRINTEXPR();  void PRINTEXPR();
Line 446  Num q;
Line 450  Num q;
                 case N_GFS:                  case N_GFS:
                         TAIL PRINTF(OUT,"@_%d",CONT((GFS)q));                          TAIL PRINTF(OUT,"@_%d",CONT((GFS)q));
                         break;                          break;
                   case N_GFSN:
                           PRINTUM(BDY((GFSN)q));
                           break;
         }          }
 }  }
   
Line 952  UP n;
Line 959  UP n;
                         }                          }
                 }                  }
                 PUTS(")");                  PUTS(")");
           }
   }
   
   PRINTUM(n)
   UM n;
   {
           int i,d;
   
           if ( !n )
                   PUTS("0");
           else if ( !n->d )
                   PRINTSF(n->c[0]);
           else {
                   d = n->d;
                   PUTS("(");
                   if ( !d ) {
                           PRINTSF(n->c[d]);
                   } else if ( d == 1 ) {
                           PRINTSF(n->c[d]);
                           PUTS("*@s");
                   } else {
                           PRINTSF(n->c[d]);
                           PUTS("*@s"); PRINTHAT; TAIL PRINTF(OUT,"%d",d);
                   }
                   for ( i = d-1; i >= 0; i-- ) {
                           if ( n->c[i] ) {
                                   PUTS("+("); PRINTSF(n->c[i]); PUTS(")");
                                   if ( i >= 2 ) {
                                           PUTS("*@s"); PRINTHAT; TAIL PRINTF(OUT,"%d",i);
                                   } else if ( i == 1 )
                                           PUTS("*@s");
                           }
                   }
                   PUTS(")");
           }
   }
   
   PRINTSF(i)
   unsigned int i;
   {
           if ( !i ) {
                   PUTS("0");
           } else {
                   TAIL PRINTF(OUT,"@_%d",IFTOF(i));
         }          }
 }  }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>