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

Diff for /OpenXM/src/oxc/sm.c between version 1.6 and 1.7

version 1.6, 2003/05/07 04:00:30 version 1.7, 2016/04/01 18:12:39
Line 1 
Line 1 
 /* -*- mode: C -*- */  /* -*- mode: C -*- */
 /* $OpenXM: OpenXM/src/oxc/sm.c,v 1.5 2000/12/03 14:32:40 ohara Exp $ */  /* $OpenXM: OpenXM/src/oxc/sm.c,v 1.6 2003/05/07 04:00:30 ohara Exp $ */
   
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
   #include <string.h>
 #include <unistd.h>  #include <unistd.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/time.h>  #include <sys/time.h>
Line 17  static cmo **stack = NULL;
Line 18  static cmo **stack = NULL;
 static int stack_ptr = 0;  static int stack_ptr = 0;
 static int stack_size = 0;  static int stack_size = 0;
 OXFILE *stack_oxfp = NULL;  OXFILE *stack_oxfp = NULL;
   int oxf_error(OXFILE *oxfp);
   
 #define DIFFERENCE_OF_STACK  1024  #define DIFFERENCE_OF_STACK  1024
   
Line 66  void push_error(int errcode, cmo* pushback)
Line 68  void push_error(int errcode, cmo* pushback)
 If error occurs, then  If error occurs, then
 an sm_* function, called by sm_run, pushes an error obect.  an sm_* function, called by sm_run, pushes an error obect.
 */  */
 void sm_popCMO()  int sm_popCMO()
 {  {
     cmo* m = pop();      cmo* m = pop();
     send_ox_cmo(stack_oxfp, m);      send_ox_cmo(stack_oxfp, m);
       return 0;
 }  }
   
 void sm_pops()  int sm_pops()
 {  {
     cmo* m = pop();      cmo* m = pop();
     if (m->tag == CMO_INT32) {      if (m->tag == CMO_INT32) {
Line 80  void sm_pops()
Line 83  void sm_pops()
     }else {      }else {
         push_error(-1, m); /* m is invalid. */          push_error(-1, m); /* m is invalid. */
     }      }
       return 0;
 }  }
   
 void sm_run(int code)  void sm_run(int code)
Line 134  int sm(OXFILE *oxfp)
Line 138  int sm(OXFILE *oxfp)
     while (sm_receive_ox()) {      while (sm_receive_ox()) {
     }      }
     ox_printf("oxc: socket(%d) is closed.\n", stack_oxfp->fd);      ox_printf("oxc: socket(%d) is closed.\n", stack_oxfp->fd);
       return 0;
 }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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