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

Diff for /OpenXM_contrib2/asir2000/parse/pvar.c between version 1.3 and 1.5

version 1.3, 2000/08/22 05:04:28 version 1.5, 2000/12/05 01:24:57
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/pvar.c,v 1.2 2000/08/21 08:31:47 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/parse/pvar.c,v 1.4 2000/09/21 09:19:27 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 175  void closecurrentinput()
Line 175  void closecurrentinput()
         if ( asir_infile && !asir_infile->fp )          if ( asir_infile && !asir_infile->fp )
                 return;                  return;
   
 #if defined(THINK_C) || defined(VISUAL)  #if defined(VISUAL)
 #if defined(THINK_C)  
         void setDir(short);  
   
         fclose(asir_infile->fp);          fclose(asir_infile->fp);
         setDir(asir_infile->vol);  
         unlink(asir_infile->tname);          unlink(asir_infile->tname);
         resetDir();  
 #else  #else
         fclose(asir_infile->fp);  
         unlink(asir_infile->tname);  
 #endif  
 #else  
         PCLOSE(asir_infile->fp);          PCLOSE(asir_infile->fp);
 #endif  #endif
         asir_infile = NEXT(asir_infile);          asir_infile = NEXT(asir_infile);
Line 231  pointer p;
Line 222  pointer p;
                 reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV));                  reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV));
         APVS->va[APVS->n++].priv = p;          APVS->va[APVS->n++].priv = p;
 }  }
   
 #if 1  
 pointer evalpv(id,expr,f)  
 int id;  
 FNODE expr;  
 pointer f;  
 {  
         pointer a,val = 0;  
         pointer *addr;  
   
         if ( expr->id != I_PVAR && expr->id != I_CAST )  
                 error("evalpv : invalid assignment");  
         switch ( id ) {  
                 case I_PRESELF:  
                         getmemberp((FNODE)expr,(Obj **)&addr);  
                         (*((ARF)f)->fp)(CO,*addr,ONE,&val); *addr = val; break;  
                 case I_POSTSELF:  
                         getmemberp((FNODE)expr,(Obj **)&addr);  
                         val = *addr; (*((ARF)f)->fp)(CO,*addr,ONE,&a); *addr = a; break;  
                 case I_PVAR:  
                         getmember((FNODE)expr,(Obj *)&val); break;  
                 case I_ASSPVAR:  
                         getmemberp((FNODE)expr,(Obj **)&addr); *addr = val = eval((FNODE)f); break;  
         }  
         return val;  
 }  
 #endif  
   
 #if 0  #if 0
 pointer evalpv(id,tree,f)  pointer evalpv(id,tree,f)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

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