/[ascend]/trunk/pygtk/library.cpp
ViewVC logotype

Diff of /trunk/pygtk/library.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1523 by jpye, Sat Jun 30 01:23:36 2007 UTC revision 1524 by jpye, Sat Jun 30 23:21:49 2007 UTC
# Line 56  Library::Library(const char *defaultpath Line 56  Library::Library(const char *defaultpath
56  #endif  #endif
57    
58          Asc_CompilerInit(1);          Asc_CompilerInit(1);
59          env_import(PATHENVIRONMENTVAR,getenv,Asc_PutEnv);          env_import(ASC_ENV_LIBRARY,getenv,Asc_PutEnv);
60          env_import(ASC_ASCENDSOLVERSVAR,getenv,Asc_PutEnv);          env_import(ASC_ENV_SOLVERS,getenv,Asc_PutEnv);
61    
62          char *x = Asc_GetEnv(PATHENVIRONMENTVAR);          char *x = Asc_GetEnv(ASC_ENV_LIBRARY);
63          if(x==NULL || strcmp(x,"")==0){          if(x==NULL || strcmp(x,"")==0){
64              if(defaultpath==NULL){              if(defaultpath==NULL){
65                  ERROR_REPORTER_NOLINE(ASC_PROG_WARNING,"Using default "                  ERROR_REPORTER_NOLINE(ASC_PROG_WARNING,"Using default "
66                      PATHENVIRONMENTVAR " = '" DEFAULT_ASCENDLIBRARY "'"                      ASC_ENV_LIBRARY " = '" DEFAULT_ASCENDLIBRARY "'"
67                  );                  );
68                  defaultpath = DEFAULT_ASCENDLIBRARY;                  defaultpath = DEFAULT_ASCENDLIBRARY;
69              }              }
70    
71              string s = string(PATHENVIRONMENTVAR "=") + defaultpath;              string s = string(ASC_ENV_LIBRARY "=") + defaultpath;
72              //ERROR_REPORTER_HERE(ASC_PROG_NOTE,"Setting %s",s.c_str());;              //ERROR_REPORTER_HERE(ASC_PROG_NOTE,"Setting %s",s.c_str());;
73              Asc_PutEnv(s.c_str());              Asc_PutEnv(s.c_str());
74          }          }
75          Asc_ImportPathList(PATHENVIRONMENTVAR);          Asc_ImportPathList(ASC_ENV_LIBRARY);
76          //cerr << PATHENVIRONMENTVAR << " = " << x << endl;          //cerr << PATHENVIRONMENTVAR << " = " << x << endl;
77          //cerr << "Created LIBRARY" << endl;          //cerr << "Created LIBRARY" << endl;
78          //cerr << "Registering solvers..." << endl;          //cerr << "Registering solvers..." << endl;

Legend:
Removed from v.1523  
changed lines
  Added in v.1524

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22