summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail/tty.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace usage of TIOCSTI in mail while editing headers using a more commonanton2017-06-281-125/+203
| | | | | | | | IO-loop where ICANON is disabled and a single char of input is read at a time. This requires the line editing capabilities provided when ICANON is enabled to be implemented. ok deraadt@
* ctype and other sign extension fixes.okan2014-01-171-3/+3
| | | | with deraadt and millert, ok millert
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-9/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* Fix off-by-one bug in readtty() and don't assume BUFSIZ == 1024.millert2005-07-111-8/+5
| | | | Based on a patch from Ulf Harnhammar.
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Fix typo; SIGTTIN where SIGINT meant and rename a variable for clarity.millert2001-11-281-5/+5
|
* o kill strcpy()millert2001-11-211-3/+3
| | | | | o check return values of malloc and friends o use strdup() when sensible
* o ANSIfymillert2001-11-211-18/+11
| | | | | | | | | o Style nits o Use const to silent stupid -Wall warnings o strnc{py,at} -> strlc{py,at} o Use strpbrk() instead of homegrown anyof() o Use NULL instead of #defines with 0 cast to a pointer This still could use a proper audit
* Major signal overhaul. We no longer longjmp all over the place.millert2001-11-201-53/+99
| | | | | | | | | | | Instead, routines responsible to gathering user input (or in some cases outputting data) catch the signals and set flags as needed. Because of this some handlers are install without the SA_RESTART flag so syscalls are not restarted and we can check the flag. All signal handlers are now safe. This should make the flow of control a bit more grokable but the code is still ugly.
* Remove evil #ifdef __GNUC__ garbage to avoid longjmp clobbering andmillert2001-06-231-21/+9
| | | | use volatile instead.
* NetBSD changes (mostly comsmetic):millert1997-11-141-2/+5
| | | | | | | | replace panic() with calls to err()/errx() use S_IS* instead of doing by hand with S_IF*. Use TIMESPEC_TO_TIMEVAL() and gettimeofday instead of time(2) Use _POSIX_VDISABLE, not 0 Kill register
* Add back EXTPROC code now that tty_pty.c has the lite2 fix.millert1997-11-131-2/+22
|
* Remove TIOCEXT added in lite2 merge for now. Causes problems whenmillert1997-07-311-23/+2
| | | | mail(1) is used over a telnet session.
* Fix one possible oflow (not exploitable) and do a wee bit of KNF.millert1997-07-301-21/+21
| | | | Much more remains to be done.
* grabh() now returns SIGINT if it was interrupted (previously alwaysmillert1997-07-221-4/+7
| | | | | | | | | returned 0 and the return val was always ignored). Add gethfromtty() to get a header (using grabh) from the tty and quit on two ^C's. Use gethfromtty() when getting Subject, Cc, and Bcc headers so we can quit nicely. Closes PR #291. Don't use longs where it doesn't make sense.
* Convert remaining sigsetmask() -> sigprocmask() (POSIX style)millert1997-07-141-4/+4
| | | | in collect.c and fix up some signal botches elsewhere.
* NOSTR -> NULLmillert1997-07-141-21/+21
| | | | Use sigsetjmp/siglongjmp instead of sigjmp/longjmp for portability.
* bcopy() -> memcpy() and fix some casts.millert1997-07-131-6/+6
|
* Merge in NetBSD and 4.4BSD-lite2 changes as well as some of my own.millert1997-07-131-6/+27
| | | | | | | | - handle long lines safely (from NetBSD) - use puts/fputs and putchar/putc when it makes sense - use err/errx and warn/warnx when it makes sense - make return() and sizeof() style consisten - some more buffer safety
* from christos;deraadt1996-06-111-8/+25
| | | | | | | | - Fix PR/105: Implement dot locking protocol and check return value of flock. - Fix PR/2247: Don't call unknown users "ubluit". Issue an error message. - Fix/add prototypes. - Fix warnings. - Use POSIX signal mask calls.
* initial import of NetBSD treederaadt1995-10-181-0/+275