Re: avoiding .scottyrc in scotty-2.1.x

Juergen Schoenwaelder (schoenw@cs.utwente.nl)
Mon, 7 Oct 1996 16:41:21 +0200

Robert Premuz <rpremuz@srce.hr> said:

Robert> Well, the Tnm extension could check an environment variable (e.g.
Robert> SCOTTYRC). If it exists and is set to 0, then ~/.scottyrc is not
Robert> sourced, otherwise it is.

I decided to add support for the environment variable TNM_RCFILE which
can overwrite the user specific initialization file. You can set this
variable to an empty string (or /dev/zero) and scotty will ignore the
initialization file. Below is a patch for tnm/generic/tnmInit.c.

Juergen

*** tnmInit.c.orig Thu Sep 19 13:12:08 1996
--- tnmInit.c Mon Oct 7 15:36:57 1996
***************
*** 206,212 ****
* about errors when we are expected to complain.
*/

! fileName = "~/.scottyrc";

if (fileName != NULL) {
Tcl_DString temp;
--- 206,215 ----
* about errors when we are expected to complain.
*/

! fileName = getenv("TNM_RCFILE");
! if (! fileName) {
! fileName = "~/.scottyrc";
! }

if (fileName != NULL) {
Tcl_DString temp;