[BACK]Return to sm.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_math

Diff for /OpenXM/src/ox_math/sm.c between version 1.1 and 1.3

version 1.1, 2000/12/03 22:09:34 version 1.3, 2003/01/13 12:04:53
Line 1 
Line 1 
 /* -*- mode: C; coding: euc-japan -*- */  /* -*- mode: C; coding: euc-japan -*- */
 /* $OpenXM$ */  /* $OpenXM: OpenXM/src/ox_math/sm.c,v 1.2 2003/01/11 12:38:57 ohara Exp $ */
   
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 37  void push(cmo *ob)
Line 37  void push(cmo *ob)
     symbol_t symp;      symbol_t symp;
   
     if (ob->tag == CMO_STRING) {      if (ob->tag == CMO_STRING) {
         fprintf(stderr, "ox_math:: a CMO_STRING(%s) was pushed.\n", ((cmo_string *)ob)->s);          ox_printf("ox_math:: a CMO_STRING(%s) was pushed.\n", ((cmo_string *)ob)->s);
     }else {      }else {
         symp = lookup_by_tag(ob->tag);          symp = lookup_by_tag(ob->tag);
         fprintf(stderr, "ox_math:: a %s was pushed.\n", symbol_get_key(symp));          ox_printf("ox_math:: a %s was pushed.\n", symbol_get_key(symp));
     }      }
 #endif  #endif
     if (stack_ptr >= stack_size) {      if (stack_ptr >= stack_size) {
Line 81  void sm_popCMO()
Line 81  void sm_popCMO()
     cmo* m = pop();      cmo* m = pop();
 #ifdef DEBUG  #ifdef DEBUG
     symbol_t symp = lookup_by_tag(m->tag);      symbol_t symp = lookup_by_tag(m->tag);
     fprintf(stderr, "ox_math:: opecode = SM_popCMO. (%s)\n", symbol_get_key(symp));      ox_printf("ox_math:: opecode = SM_popCMO. (%s)\n", symbol_get_key(symp));
 #endif  #endif
     send_ox_cmo(stack_oxfp, m);      send_ox_cmo(stack_oxfp, m);
 }  }
Line 101  void sm_run(int code)
Line 101  void sm_run(int code)
     int (*func)(OXFILE *) = sm_search_f(code);      int (*func)(OXFILE *) = sm_search_f(code);
 #ifdef DEBUG  #ifdef DEBUG
     symbol_t sp = lookup_by_tag(code);      symbol_t sp = lookup_by_tag(code);
     fprintf(stderr, "ox_math:: %s received.\n", symbol_get_key(sp));      ox_printf("ox_math:: %s received.\n", symbol_get_key(sp));
 #endif  #endif
     if (func != NULL) {      if (func != NULL) {
         func(stack_oxfp);          func(stack_oxfp);
     }else {      }else {
         fprintf(stderr, "unknown command: %d.\n", code);          ox_printf("unknown command: %d.\n", code);
         push_error(ERROR_ID_UNKNOWN_SM, new_cmo_null());          push_error(ERROR_ID_UNKNOWN_SM, new_cmo_null());
     }      }
 }  }

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

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