added isatty & ttynam & global def for 'lpr'. DLW