[BACK]Return to ox_launch.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / io

Diff for /OpenXM_contrib2/asir2018/io/ox_launch.c between version 1.4 and 1.5

version 1.4, 2019/12/14 12:34:02 version 1.5, 2020/10/06 06:31:20
Line 44 
Line 44 
  * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY   * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
  * 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/asir2018/io/ox_launch.c,v 1.3 2019/12/13 14:40:50 fujimoto Exp $   * $OpenXM: OpenXM_contrib2/asir2018/io/ox_launch.c,v 1.4 2019/12/14 12:34:02 fujimoto Exp $
 */  */
 #include <setjmp.h>  #include <setjmp.h>
 #include <signal.h>  #include <signal.h>
Line 166  char **argv;
Line 166  char **argv;
   
   /* XXX a dirty hack */    /* XXX a dirty hack */
   if ( !getenv("LD_LIBRARY_PATH") ) {    if ( !getenv("LD_LIBRARY_PATH") ) {
     if ( e = getenv("OpenXM_HOME") ) {      if ( ( e = getenv("OpenXM_HOME") ) != 0 ) {
       s = (char *)alloca(strlen(e)+100);        s = (char *)alloca(strlen(e)+100);
       sprintf(s,"LD_LIBRARY_PATH=%s/lib",e);        sprintf(s,"LD_LIBRARY_PATH=%s/lib",e);
       putenv(s);        putenv(s);
Line 392  char *s;
Line 392  char *s;
   exit(0);    exit(0);
 }  }
   
   #define asir_OperandStackSize BUFSIZ
   
 static void ox_io_init(sock)  static void ox_io_init(sock)
 int sock;  int sock;
 {  {
   endian_init();    endian_init();
   /* server mode */    /* server mode */
   sindex = get_iofp(sock,0,1);    sindex = get_iofp(sock,0,1);
   asir_OperandStack = (Obj *)CALLOC(BUFSIZ,sizeof(Obj));    asir_OperandStack = (Obj *)CALLOC(asir_OperandStackSize,sizeof(Obj));
   asir_OperandStackPtr = -1;    asir_OperandStackPtr = -1;
 }  }
   
 static void push_one(obj)  static void push_one(obj)
 Obj obj;  Obj obj;
 {  {
     if ( asir_OperandStackPtr == asir_OperandStackSize-1 )
       return;
   if ( !obj || OID(obj) != O_VOID )    if ( !obj || OID(obj) != O_VOID )
     asir_OperandStack[++asir_OperandStackPtr] = obj;      asir_OperandStack[++asir_OperandStackPtr] = obj;
 }  }
Line 412  Obj obj;
Line 416  Obj obj;
 static Obj pop_one() {  static Obj pop_one() {
   if ( asir_OperandStackPtr >= 0 ) {    if ( asir_OperandStackPtr >= 0 ) {
     return asir_OperandStack[asir_OperandStackPtr--];      return asir_OperandStack[asir_OperandStackPtr--];
   }    } else
       return 0;
 }  }
   
 static void terminate_server(int sig)  static void terminate_server(int sig)

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

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