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

Diff for /OpenXM_contrib2/asir2000/io/ox_asir.c between version 1.67 and 1.72

version 1.67, 2010/04/23 04:44:52 version 1.72, 2014/05/09 19:35:51
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/asir2000/io/ox_asir.c,v 1.66 2008/11/27 08:27:04 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.71 2013/06/13 18:42:11 ohara Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 55 
Line 55 
 #include "genpari.h"  #include "genpari.h"
 #endif  #endif
   
   char *find_asirrc();
 void ox_usr1_handler();  void ox_usr1_handler();
 int asir_ox_init();  int asir_ox_init();
   
Line 122  void ox_mpi_master_init() {
Line 123  void ox_mpi_master_init() {
                 /* ordering information is not exchanged */                  /* ordering information is not exchanged */
                 /* idx should be equal to i */                  /* idx should be equal to i */
                 idx = get_iofp(i,0,0);                  idx = get_iofp(i,0,0);
                 register_server(0,idx,idx);                  register_server(0,idx,idx,-1);
         }          }
 }  }
   
Line 135  void ox_mpi_slave_init() {
Line 136  void ox_mpi_slave_init() {
                 /* ordering information is not exchanged */                  /* ordering information is not exchanged */
                 /* idx should be equal to i */                  /* idx should be equal to i */
                 idx = get_iofp(i,0,0);                  idx = get_iofp(i,0,0);
                 register_server(0,idx,idx);                  register_server(0,idx,idx,-1);
         }          }
         asir_OperandStackSize = BUFSIZ;          asir_OperandStackSize = BUFSIZ;
         asir_OperandStack = (Obj *)CALLOC(asir_OperandStackSize,sizeof(Obj));          asir_OperandStack = (Obj *)CALLOC(asir_OperandStackSize,sizeof(Obj));
Line 646  void asir_pops()
Line 647  void asir_pops()
 void asir_setName(unsigned int serial)  void asir_setName(unsigned int serial)
 {  {
         char *name;          char *name;
         int l,n;          size_t l,n;
         char *dummy = "=0;";          char *dummy = "=0;";
         SNODE snode;          SNODE snode;
         ERR err;          ERR err;
Line 668  void asir_setName(unsigned int serial)
Line 669  void asir_setName(unsigned int serial)
 void asir_evalName(unsigned int serial)  void asir_evalName(unsigned int serial)
 {  {
         char *name;          char *name;
         int l,n;          size_t l,n;
         SNODE snode;          SNODE snode;
         ERR err;          ERR err;
         pointer val;          pointer val;
Line 793  static void asir_executeFunction(int serial)
Line 794  static void asir_executeFunction(int serial)
 #endif  #endif
                 searchf(noargsysf,func,&f);                  searchf(noargsysf,func,&f);
                 if ( !f )                  if ( !f )
                         searchf(sysf,func,&f);                          gen_searchf_searchonly(func,&f);
                 if ( !f )  
                         searchf(ubinf,func,&f);  
                 if ( !f )  
                         searchf(usrf,func,&f);  
                 if ( !f ) {                  if ( !f ) {
                         sprintf(buf,"executeFunction : the function %s not found",func);                          sprintf(buf,"executeFunction : the function %s not found",func);
                         goto error;                          goto error;
Line 871  static void asir_executeFunctionSync(int serial)
Line 868  static void asir_executeFunctionSync(int serial)
 #endif  #endif
                 searchf(noargsysf,func,&f);                  searchf(noargsysf,func,&f);
                 if ( !f )                  if ( !f )
                         searchf(sysf,func,&f);                          gen_searchf_searchonly(func,&f);
                 if ( !f )  
                         searchf(ubinf,func,&f);  
                 if ( !f )  
                         searchf(usrf,func,&f);  
                 if ( !f ) {                  if ( !f ) {
                         sprintf(buf,"executeFunction : the function %s not found",func);                          sprintf(buf,"executeFunction : the function %s not found",func);
                         goto error;                          goto error;
Line 947  Obj asir_peek_one() {
Line 940  Obj asir_peek_one() {
   
 void ox_asir_init(int argc,char **argv,char *servername)  void ox_asir_init(int argc,char **argv,char *servername)
 {  {
         char ifname[BUFSIZ];          char *ifname;
         extern int GC_dont_gc;          extern int GC_dont_gc;
         extern int do_asirrc;          extern int do_asirrc;
         extern int do_server_in_X11;          extern int do_server_in_X11;
         extern char displayname[];          extern char displayname[];
         char *getenv();  
         static ox_asir_initialized = 0;          static ox_asir_initialized = 0;
         FILE *ifp;  
         char *homedir;  
         char *ptr;  
         int do_server_sav;          int do_server_sav;
 #if !defined(VISUAL)  #if !defined(VISUAL)
         int tmp;          int tmp;
Line 998  void ox_asir_init(int argc,char **argv,char *servernam
Line 987  void ox_asir_init(int argc,char **argv,char *servernam
 #if defined(UINIT)  #if defined(UINIT)
         reg_sysf();          reg_sysf();
 #endif  #endif
 /* if ASIR_CONFIG is set, execute it; else execute .asirrc */  
         if ( ptr = getenv("ASIR_CONFIG") )  
                 strcpy(ifname,ptr);  
         else {  
                 homedir = getenv("HOME");  
                 if ( !homedir ) {  
                         char rootname[BUFSIZ];  
   
                         get_rootdir(rootname,sizeof(rootname));  
                         homedir = rootname;  
                 }  
                 sprintf(ifname,"%s/.asirrc",homedir);  
         }  
   
         /* the bottom of the input stack */          /* the bottom of the input stack */
         input_init(0,"string");          input_init(0,"string");
   
         if ( do_asirrc && (ifp = fopen(ifname,"r")) ) {          if ( do_asirrc && (ifname = find_asirrc()) ) {
                 fclose(ifp);  
                 do_server_sav = do_server_in_X11;                  do_server_sav = do_server_in_X11;
                 do_server_in_X11 = 0;                  do_server_in_X11 = 0;
                 if ( !SETJMP(main_env) )                  if ( !SETJMP(main_env) )
Line 1081  void ox_io_init() {
Line 1055  void ox_io_init() {
         read_char(iofp[0].in,&rc);          read_char(iofp[0].in,&rc);
         iofp[0].conv = c == rc ? 0 : 1;          iofp[0].conv = c == rc ? 0 : 1;
         /* XXX; for raw I/O */          /* XXX; for raw I/O */
         register_server(0,0,0);          register_server(0,0,0,-1);
 }  }
   
 #if !defined(VISUAL)  #if !defined(VISUAL)
Line 1246  int asir_ox_peek_cmo_string_length()
Line 1220  int asir_ox_peek_cmo_string_length()
 int asir_ox_init(int byteorder)  int asir_ox_init(int byteorder)
 {  {
         int tmp;          int tmp;
         char ifname[BUFSIZ];          char *ifname;
         extern int GC_dont_gc;          extern int GC_dont_gc;
         extern int do_asirrc;          extern int do_asirrc;
         extern int do_server_in_X11;          extern int do_server_in_X11;
         char *getenv();  
         static ox_asir_initialized = 0;          static ox_asir_initialized = 0;
         FILE *ifp;  
   
         GC_init();          GC_init();
 #if !defined(VISUAL) && !defined(MPI)  #if !defined(VISUAL) && !defined(MPI)
Line 1285  int asir_ox_init(int byteorder)
Line 1257  int asir_ox_init(int byteorder)
         reg_sysf();          reg_sysf();
 #endif  #endif
         input_init(0,"string");          input_init(0,"string");
         sprintf(ifname,"%s/.asirrc",getenv("HOME"));          if ( do_asirrc && (ifname = find_asirrc()) ) {
         if ( do_asirrc && (ifp = fopen(ifname,"r")) ) {  
                 fclose(ifp);  
                 if ( !SETJMP(main_env) )                  if ( !SETJMP(main_env) )
                         execasirfile(ifname);                          execasirfile(ifname);
         }          }

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.72

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