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

Diff for /OpenXM/src/ox_math/mlo.c between version 1.13 and 1.14

version 1.13, 2003/01/15 10:46:09 version 1.14, 2003/01/17 11:31:10
Line 1 
Line 1 
 /* -*- mode: C -*- */  /* -*- mode: C -*- */
 /* $OpenXM: OpenXM/src/ox_math/mlo.c,v 1.12 2003/01/15 05:08:10 ohara Exp $ */  /* $OpenXM: OpenXM/src/ox_math/mlo.c,v 1.13 2003/01/15 10:46:09 ohara Exp $ */
   
 /*  /*
    Copyright (C) Katsuyoshi OHARA, 2000.     Copyright (C) Katsuyoshi OHARA, 2000.
Line 41  static unsigned state = 0;
Line 41  static unsigned state = 0;
   
 static int ml_current_packet = -1;  static int ml_current_packet = -1;
   
   static double mathkernel_version;
   
 /* If this flag sets then we identify MLTKSYM to CMO_INDETERMINATE. */  /* If this flag sets then we identify MLTKSYM to CMO_INDETERMINATE. */
 int flag_mlo_symbol = FLAG_MLTKSYM_IS_INDETERMINATE;  int flag_mlo_symbol = FLAG_MLTKSYM_IS_INDETERMINATE;
   
Line 51  mlo *receive_mlo_real()
Line 53  mlo *receive_mlo_real()
 {  {
     char *s;      char *s;
     cmo *ob;      cmo *ob;
   
   #if 1
       double d;
       MLGetReal(stdlink, &d);
       ox_printf("MLTKREAL(%lf)", d);
       ob = new_cmo_double(d);
   #else
     /* Yet we have no implementation of CMO_DOUBLE... */      /* Yet we have no implementation of CMO_DOUBLE... */
     MLGetString(stdlink, &s);      MLGetString(stdlink, &s);
     ox_printf("MLTKREAL(%s)", s);      ox_printf("MLTKREAL(%s)", s);
     ob = (cmo *)new_cmo_string(s);      ob = (cmo *)new_cmo_string(s);
     MLDisownString(stdlink, s);      MLDisownString(stdlink, s);
   #endif
     return ob;      return ob;
 }  }
   
Line 186  int ml_init()
Line 196  int ml_init()
         ox_printf("Mathematica Kernel not found.\n");          ox_printf("Mathematica Kernel not found.\n");
         exit(1);          exit(1);
     }      }
       /* set the version of Mathematica kernel. */
       ml_evaluateStringByLocalParser("$VersionNumber");
       mathkernel_version = ((cmo_double *)ml_return())->d;
       ox_printf("Kernel Version = %lf\n", mathkernel_version);
     return 0;      return 0;
 }  }
   

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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