/[ascend]/trunk/tcltk/generic/interface/Driver.c
ViewVC logotype

Diff of /trunk/tcltk/generic/interface/Driver.c

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

revision 1523 by jpye, Mon Apr 23 13:55:28 2007 UTC revision 1524 by jpye, Sat Jun 30 23:21:49 2007 UTC
# Line 355  int AscDriver(int argc, CONST char **arg Line 355  int AscDriver(int argc, CONST char **arg
355      Asc_Panic(2, "Asc_CompilerInit",      Asc_Panic(2, "Asc_CompilerInit",
356                "Insufficient memory to initialize compiler.");                "Insufficient memory to initialize compiler.");
357    }    }
   SlvRegisterStandardClients();  
   if( Asc_HelpInit() == TCL_ERROR ) {  
     Asc_Panic(2, "Asc_HelpInit",  
               "Insufficient memory to initialize help system.");  
   }  
   Asc_CreateCommands(interp);  
   Asc_RegisterBitmaps(interp);  
358    
359    /*    /*
360     *  Set the environment, and set find the     *  Set the environment, and set find the
# Line 374  int AscDriver(int argc, CONST char **arg Line 367  int AscDriver(int argc, CONST char **arg
367                Tcl_GetStringResult(interp));                Tcl_GetStringResult(interp));
368    }    }
369    
370      SlvRegisterStandardClients();
371      if( Asc_HelpInit() == TCL_ERROR ) {
372        Asc_Panic(2, "Asc_HelpInit",
373                  "Insufficient memory to initialize help system.");
374      }
375      Asc_CreateCommands(interp);
376      Asc_RegisterBitmaps(interp);
377    
378    
379    
380    /*    /*
381     *  Evaluate the ~/.ascendrc or $ASCENDTK/AscendRC file     *  Evaluate the ~/.ascendrc or $ASCENDTK/AscendRC file
382     */     */
# Line 512  static void printenv(){ Line 515  static void printenv(){
515      the rest follows through as above.      the rest follows through as above.
516  */  */
517  static void AscCheckEnvironVars(Tcl_Interp *interp,const char *progname){  static void AscCheckEnvironVars(Tcl_Interp *interp,const char *progname){
518      char *distdir, *tkdir, *bitmapsdir, *librarydir;      char *distdir, *tkdir, *bitmapsdir, *librarydir, *solversdir;
519      struct FilePath *fp, *fp1, *distfp, *tkfp, *bitmapsfp, *libraryfp;      struct FilePath *fp, *fp1, *distfp, *tkfp, *bitmapsfp, *libraryfp, *solversfp;
520      char envcmd[MAX_ENV_VAR_LENGTH];      char envcmd[MAX_ENV_VAR_LENGTH];
521      char s1[PATH_MAX];      char s1[PATH_MAX];
522      int err;      int err;
# Line 530  static void AscCheckEnvironVars(Tcl_Inte Line 533  static void AscCheckEnvironVars(Tcl_Inte
533      env_import(ASC_ENV_TK,getenv,PUTENV);      env_import(ASC_ENV_TK,getenv,PUTENV);
534      env_import(ASC_ENV_BITMAPS,getenv,PUTENV);      env_import(ASC_ENV_BITMAPS,getenv,PUTENV);
535      env_import(ASC_ENV_LIBRARY,getenv,PUTENV);      env_import(ASC_ENV_LIBRARY,getenv,PUTENV);
536        env_import(ASC_ENV_SOLVERS,getenv,PUTENV);
537    
538      /* used for colour console output */      /* used for colour console output */
539      env_import("TERM",getenv,PUTENV);      env_import("TERM",getenv,PUTENV);
# Line 540  static void AscCheckEnvironVars(Tcl_Inte Line 544  static void AscCheckEnvironVars(Tcl_Inte
544      tkdir = GETENV(ASC_ENV_TK);      tkdir = GETENV(ASC_ENV_TK);
545      bitmapsdir = GETENV(ASC_ENV_BITMAPS);      bitmapsdir = GETENV(ASC_ENV_BITMAPS);
546      librarydir = GETENV(ASC_ENV_LIBRARY);      librarydir = GETENV(ASC_ENV_LIBRARY);
547        solversdir = GETENV(ASC_ENV_SOLVERS);
548    
549      /* Create an ASCENDDIST value if it's missing */      /* Create an ASCENDDIST value if it's missing */
550    
# Line 619  static void AscCheckEnvironVars(Tcl_Inte Line 623  static void AscCheckEnvironVars(Tcl_Inte
623          CONSOLE_DEBUG("CREATED LIBRARY VAL");          CONSOLE_DEBUG("CREATED LIBRARY VAL");
624          OSPATH_PUTENV(ASC_ENV_LIBRARY,libraryfp);          OSPATH_PUTENV(ASC_ENV_LIBRARY,libraryfp);
625          librarydir = ospath_str(libraryfp);          librarydir = ospath_str(libraryfp);
626            ospath_free(libraryfp);
627        }
628    
629        if(solversdir == NULL){
630            CONSOLE_DEBUG("NO " ASC_ENV_LIBRARY " VAR DEFINED");
631            solversfp = ospath_new_expand_env("$ASCENDDIST/solvers", &GETENV);
632            CONSOLE_DEBUG("CREATED SOLVERS VAL");
633            OSPATH_PUTENV(ASC_ENV_SOLVERS,solversfp);
634            solversdir = ospath_str(solversfp);
635            ospath_free(solversfp);
636      }      }
637    
638      CONSOLE_DEBUG("CHECKING FOR AscendRC FILE");      CONSOLE_DEBUG("CHECKING FOR AscendRC FILE");

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

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