Re: Working on the install-mh change questions

2002-11-19 Thread Earl Hood
On November 18, 2002 at 20:43, Jon Steinhart wrote: Oh, some details. 1. A second getenv() call would not break the code. The copy was really unnecessary. As pointed out earlier, making the copy may be needed depending on the implementation of getenv() for a given platform. And for all

Re: Working on the install-mh change questions

2002-11-18 Thread Eric Gillespie
Jon Steinhart [EMAIL PROTECTED] writes: 3.If the $HOME environment variable is set, mypath is copied from the getenv return. Why? It's never changed. 4.If the $HOME environment variable is not set, mypath is copied from the pw_dir member of the returned passwd

Re: Working on the install-mh change questions

2002-11-18 Thread Jon Steinhart
Jon Steinhart [EMAIL PROTECTED] writes: 3. If the $HOME environment variable is set, mypath is copied from the getenv return. Why? It's never changed. 4. If the $HOME environment variable is not set, mypath is copied from the pw_dir member of the returned passwd

Re: Working on the install-mh change questions

2002-11-18 Thread Greg Hudson
On Mon, 2002-11-18 at 22:47, Eric Gillespie wrote: Jon Steinhart [EMAIL PROTECTED] writes: 3. If the $HOME environment variable is set, mypath is copied from the getenv return. Why? It's never changed. 4. If the $HOME environment variable is not set, mypath is copied from the

Re: Working on the install-mh change questions

2002-11-18 Thread Eric Gillespie
Greg Hudson [EMAIL PROTECTED] writes: The return value of getenv() is a pointer into the environment; a future getenv() call will not overwrite it. So it's safe not to copy it unless you anticipate a putenv(). (And I think it's safe even in the face of a putenv(), actually.) A judgement

Re: Working on the install-mh change questions

2002-11-18 Thread Eric Gillespie
Eric Gillespie [EMAIL PROTECTED] writes: I just checked Harbison Steele, and according to them ISO C does not allow calls to putenv to modify the getenv return value, and as seen above, nor does POSIX (though the XSI extension does). Maybe i'm just not very imaginative at this late hour,

Re: Working on the install-mh change questions

2002-11-17 Thread Bill Wohler
Jon Steinhart [EMAIL PROTECTED] wrote: 5.There's code that removes a trailing / from mypath if mypath is more than one character long. Seems completely unnecessary; the definition of path names means that // is interpreted as /. And if that wasn't the case, this code

Working on the install-mh change questions

2002-11-16 Thread Jon Steinhart
I've started working on the changes for the mh installation thing discussed earlier. My plan is to modify context_read() to print a message instead of invoking install-mh, and to add a -check option to install-mh that allows it to silently check for installation, returning the status via the exit