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 |
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 |
*/ |
*/ |
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; |
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); |
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 |
|
|
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"); |