John Summerfield <[EMAIL PROTECTED]> writes:
>  nmh_getpass().
> > > 
> > > I think we should change the name. Our function's whole point is to
> > > obviate the need for any system-specific getpass(), so we shouldn't
> > > have to adhere to their prototypes unless we really want to. 
> > 
> > Okay, I've changed it to nmh_getpass().  The only drawback of not calling it
> > getpass() is that in the future people may accidentally use plain getpass()
> > instead of nmh_getpass() and unless they're on an OS where getpass() fails
> > to prompt, they won't know that they shouldn't have done that.
> 
> You could add a getpass() function that will collide with the system 
> definition and, when called, issue an error message and either
> a)    Call the real one
> b)    Terminate the program.

But then we're back to having to autodetect the proper declaration to get it
to compile.  Probably not worth the work for a function which, as has been
pointed out, is likely not get get called elsewhere in the code in the future.

> Compiler messages are unimportant, though an explanatory comment at the 
> function to explain why it's there would be a Good Thing.

I disagree.  Compiler warnings just pointed out two bugs in the new
getpass() function.  It's important to write code that compiles clean with
gcc -Wall if it all possible.

-----------------------------------------------------------------------
Dan Harkless                   | To prevent SPAM contamination, please 
[EMAIL PROTECTED]      | do not post this private email address
SpeedGate Communications, Inc. | to the USENET or WWW.  Thank you.     

Reply via email to