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

Diff for /OpenXM_contrib2/asir2000/parse/util.c between version 1.9 and 1.13

version 1.9, 2003/08/21 08:05:02 version 1.13, 2005/02/08 18:06:05
Line 45 
Line 45 
  * 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/parse/util.c,v 1.8 2001/10/09 01:36:25 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/parse/util.c,v 1.12 2004/12/18 16:50:10 saito Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "base.h"  #include "base.h"
 #include "parse.h"  #include "parse.h"
 #if defined(VISUAL) || (defined(__MACH__) && defined(__ppc__)) || defined(__FreeBSD__)  #if defined(__GNUC__) || defined(VISUAL) || (defined(__MACH__) && defined(__ppc__)) || defined(__FreeBSD__)
 #include <stdarg.h>  #include <stdarg.h>
 #else  #else
 #include <varargs.h>  #include <varargs.h>
Line 120  pointer a;
Line 120  pointer a;
 NODE ind;  NODE ind;
 pointer *vp;  pointer *vp;
 {  {
         Obj len,row,col;          Obj len,row,col,trg;
         int i;          int i;
         NODE n,n0;          NODE n,n0;
         VECT v;          VECT v;
Line 167  pointer *vp;
Line 167  pointer *vp;
                                         a = (pointer)v;                                          a = (pointer)v;
                                 }                                  }
                                 break;                                  break;
                           case O_IMAT:
                                   row = (Obj)BDY(ind);
                                   ind = NEXT(ind);
                                   col = (Obj)BDY(ind);
                                   if ( ((IMAT)a)->row < QTOS((Q)row) ||
                                           ((IMAT)a)->col < QTOS((Q)col) ||
                                           (QTOS((Q)row) < 0) || (QTOS((Q)col) < 0))
                                                   error("putarray : Out of range");
                                   GetIbody((IMAT)a, QTOS((Q)row), QTOS((Q)col), (Obj*)&trg);
                                   a = (pointer)trg;
                                   break;
                         case O_LIST:                          case O_LIST:
                                 n0 = BDY((LIST)a); i = QTOS((Q)BDY(ind));                                  n0 = BDY((LIST)a); i = QTOS((Q)BDY(ind));
                                 if ( i < 0 )                                  if ( i < 0 )
Line 233  pointer b;
Line 244  pointer b;
                                 } else                                  } else
                                         error("putarray : invalid assignment");                                          error("putarray : invalid assignment");
                                 break;                                  break;
                           case O_IMAT:
                                   row = (Obj)BDY(ind);
                                   ind = NEXT(ind);
                                   col = (Obj)BDY(ind);
                                   if ( ((IMAT)a)->row < QTOS((Q)row) ||
                                           ((IMAT)a)->col < QTOS((Q)col) ||
                                           (QTOS((Q)row) < 0) || (QTOS((Q)col) < 0))
                                                   error("putarray : Out of range");
                                   PutIent((IMAT)a, QTOS((Q)row), QTOS((Q)col), (Obj)b);
                                   break;
                         case O_LIST:                          case O_LIST:
                                 if ( NEXT(ind) ) {                                  if ( NEXT(ind) ) {
                                         n0 = BDY((LIST)a); i = QTOS((Q)BDY(ind));                                          n0 = BDY((LIST)a); i = QTOS((Q)BDY(ind));
Line 285  P p;
Line 306  P p;
         return ( r );          return ( r );
 }  }
   
 #if defined(VISUAL) || (defined(__MACH__) && defined(__ppc__)) || defined(__FreeBSD__)  #if defined(__GNUC__) || defined(VISUAL) || (defined(__MACH__) && defined(__ppc__)) || defined(__FreeBSD__)
 NODE mknode(int ac,...)  NODE mknode(int ac,...)
 {  {
         va_list ap;          va_list ap;
Line 415  P *p;
Line 436  P *p;
         P t;          P t;
         char *str;          char *str;
   
         for ( vl = CO, str = NAME(f); ; )          for ( vl = CO, str = f->fullname; ; )
                 if ( NAME(VR(vl)) && !strcmp(NAME(VR(vl)),str) ) {                  if ( NAME(VR(vl)) && !strcmp(NAME(VR(vl)),str) ) {
                         VR(vl)->attr = (pointer)V_SR; VR(vl)->priv = (pointer)f;                          VR(vl)->attr = (pointer)V_SR; VR(vl)->priv = (pointer)f;
                         MKV(VR(vl),t); *p = t;                          MKV(VR(vl),t); *p = t;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.13

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