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

Diff for /OpenXM_contrib2/asir2000/builtin/print.c between version 1.9 and 1.11

version 1.9, 2001/09/03 08:52:38 version 1.11, 2001/09/04 03:12:20
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/builtin/print.c,v 1.8 2001/08/31 09:17:12 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/print.c,v 1.10 2001/09/04 02:45:32 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 53 
Line 53 
 void Pprint();  void Pprint();
 void Pquotetolist();  void Pquotetolist();
 void Peval_variables_in_quote();  void Peval_variables_in_quote();
   void Pset_print_function();
 FNODE eval_pvar_in_fnode();  FNODE eval_pvar_in_fnode();
   
 struct ftab print_tab[] = {  struct ftab print_tab[] = {
         {"print",Pprint,-2},          {"print",Pprint,-2},
         {"quotetolist",Pquotetolist,1},          {"quotetolist",Pquotetolist,1},
         {"eval_variables_in_quote",Peval_variables_in_quote,1},          {"eval_variables_in_quote",Peval_variables_in_quote,1},
           {"set_print_function",Pset_print_function,-1},
         {0,0,0},          {0,0,0},
 };  };
   
Line 278  Obj *rp;
Line 280  Obj *rp;
                         break;                          break;
   
                 case I_PVAR:                  case I_PVAR:
                           if ( FA1(f) )
                                   error("fnodetotree : not implemented yet");
                         MKSTR(head,"variable");                          MKSTR(head,"variable");
                         GETPVNAME(FA0(f),opname);                          GETPVNAME(FA0(f),opname);
                         MKSTR(op,opname);                          MKSTR(op,opname);
Line 297  FNODE f;
Line 301  FNODE f;
         FNODE a1,a2,a3;          FNODE a1,a2,a3;
         pointer r;          pointer r;
         NODE n,t,t0;          NODE n,t,t0;
           QUOTE q;
   
         if ( !f )          if ( !f )
                 return 0;                  return 0;
Line 355  FNODE f;
Line 360  FNODE f;
                 case I_PVAR: case I_INDEX:                  case I_PVAR: case I_INDEX:
                 case I_POSTSELF: case I_PRESELF:                  case I_POSTSELF: case I_PRESELF:
                         r = eval(f);                          r = eval(f);
                         return mkfnode(1,I_FORMULA,r);                          objtoquote(r,&q);
                           return BDY(q);
   
                 default:                  default:
                         error("eval_pvar_in_fnode : not implemented yet");                          error("eval_pvar_in_fnode : not implemented yet");
Line 392  FNODE *f;
Line 398  FNODE *f;
         }          }
 }  }
   
   FUNC user_print_function;
   
   void Pset_print_function(arg,rp)
   NODE arg;
   pointer *rp;
   {
           if ( !arg )
                   user_print_function = 0;
           else {
                   gen_searchf(BDY((STRING)ARG0(arg)),&user_print_function);
           }
           *rp = 0;
   }

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

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