/[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 627 by johnpye, Thu May 18 16:46:52 2006 UTC revision 628 by johnpye, Wed May 24 01:45:02 2006 UTC
# Line 526  static void printenv(){ Line 526  static void printenv(){
526      use the usual names for each of these:      use the usual names for each of these:
527    
528      ASCENDDIST defaults to $PROGDIR/@ASC_DATADIR_REL_BIN@ (also in config.h)      ASCENDDIST defaults to $PROGDIR/@ASC_DATADIR_REL_BIN@ (also in config.h)
529      ASCENDTK defaults to $ASCENDDIST/@ASC_TK_SUBDIR_NAME@ (latter is from config.h)      ASCENDTK defaults to $ASCENDDIST/TK (latter is from config.h)
530      ASCENDBITMAPS defaults $ASCENDTK/bitmaps      ASCENDBITMAPS defaults $ASCENDTK/bitmaps
531      ASCENDLIBRARY defaults to $ASCENDDIST/models      ASCENDLIBRARY defaults to $ASCENDDIST/models
532    
533      Also check for the existence of the file AscendRC in $ASCENDTK      Also check for the existence of the file AscendRC in $ASCENDTK
534      and if found, export the location of that file to the Tcl      and if found, export the location of that file to the Tcl
535      variable tcl_rcFileName.      variable tcl_rcFileName.
536    
537        If you set ASC_ABSOLUTE_PATHS then ASCENDDIST defaults to @ASC_DATADIR@ and
538        the rest follows through as above.
539  */  */
540  static int AscCheckEnvironVars(Tcl_Interp *interp,const char *progname){  static int AscCheckEnvironVars(Tcl_Interp *interp,const char *progname){
541      char *distdir, *tkdir, *bitmapsdir, *librarydir;      char *distdir, *tkdir, *bitmapsdir, *librarydir;
# Line 566  static int AscCheckEnvironVars(Tcl_Inter Line 569  static int AscCheckEnvironVars(Tcl_Inter
569      if(distdir == NULL){      if(distdir == NULL){
570          CONSOLE_DEBUG("NO " ASC_ENV_DIST " VAR DEFINED");          CONSOLE_DEBUG("NO " ASC_ENV_DIST " VAR DEFINED");
571    
572  # ifdef ASC_RELATIVE_PATHS  # ifndef ASC_ABSOLUTE_PATHS
573    
574          // read the executable's name/relative path.          // read the executable's name/relative path.
575          fp = ospath_new(progname);          fp = ospath_new(progname);
# Line 591  static int AscCheckEnvironVars(Tcl_Inter Line 594  static int AscCheckEnvironVars(Tcl_Inter
594    
595  # else  # else
596          distfp = ospath_new(ASC_DATADIR);          distfp = ospath_new(ASC_DATADIR);
         fp = ospath_new("ascend");  
   
         ospath_append(distfp,fp);  
         ospath_free(fp);  
597  # endif  # endif
598          distdir = ospath_str(distfp);          distdir = ospath_str(distfp);
599          CONSOLE_DEBUG("GUESSING %s = %s",ASC_ENV_DIST,distdir);          CONSOLE_DEBUG("GUESSING %s = %s",ASC_ENV_DIST,distdir);

Legend:
Removed from v.627  
changed lines
  Added in v.628

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