summaryrefslogtreecommitdiffstats
path: root/usr.bin/mg/ttyio.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* DIFFTOOL has to be defined for mg to build. TCSASOFT is defined viabcallah2015-03-231-14/+1
| | | | | termios.h so we don't need the code for when it is not defined. ok reyk@
* Clean up the includes in mg.bcallah2015-03-191-5/+13
| | | | | | | | | | This does the following: Moves all POSIX headers from sysdef.h into the individual .c files so that each file now only includes what it needs. All headers are properly sorted. Moves the remainder of sysdef.h to other files (mostly def.h) and deletes sysdef.h now that it's no longer contains anything. Tweak a comment that references sysdef.h so that it no longer does that. ok florian@
* Add some missing dobeeps.lum2014-03-201-1/+4
| | | | ok florian@
* use poll() instead of select() [with a fixed size fd_set]deraadt2013-04-201-9/+6
| | | | ok florian
* Don't spin in ttgetc when stdin is lost (found by benno@).florian2013-01-191-2/+10
| | | | | While there prevent an unterminated recursion in panic(). ok lum@, benno@
* prevent the "ttflush write failed" panic when resizing using a windowreyk2008-02-051-2/+5
| | | | | | | | manager that that continously sends resize events. fix inspired by an older diff for vi (r1.15 of src/usr.bin/vi/cl/cl_screen.c) ok otto@ jasper@
* few more int that can become a size_tderaadt2006-04-031-2/+2
|
* lint love; ok kjellderaadt2006-04-031-3/+3
|
* More name-clash delintingkjell2005-12-131-3/+3
|
* Add explicit public domain notices to all public domain files.kjell2005-06-141-1/+3
| | | | ok millert@, deraadt@
* use STD{IN,OUT,ERR}_FILENOderaadt2005-04-131-2/+2
|
* This is a no binary change which does:db2005-04-031-12/+12
| | | | | | | | | | - spelling, punctuation fixes - variable declaration lineup - use parentheses for return and sizeof - K&R function declarations -> ANSI - other minor code beautification ok henning@
* fix sign extension bug that broke meta key supportvincent2003-12-041-2/+2
| | | | from sra@hactrn.net
* fix up terminal correctly on panic (keeps terminal state correct whenvincent2003-11-091-5/+10
| | | | | | started with an invalid $TERM) spotted by deraadt
* KNFvincent2002-09-151-32/+26
|
* knfderaadt2002-08-221-2/+2
|
* Fix bug I introduced in previous commit.millert2002-03-281-1/+2
|
* Fix write() loop in ttflush(). Pointed out by vincent@millert2002-03-271-5/+5
|
* Fixes the the following problems (from zyrnix)millert2002-03-271-8/+12
| | | | | | | 1) Mg crashes with column width of 1, rows > 2 2) Mg panics on resizing due to incomplete write 3) Mg doesn't compile with STARTUPFILE defined deraadt@ OK
* signal-safe window size changingderaadt2002-02-211-4/+13
|
* Clean up tty resizing code.art2002-01-101-29/+1
| | | | Catch SIGWINCH and resize and refresh the screen.
* spacesmickey2001-05-241-3/+3
|
* remove VOID. We're way beyond the point where this could build with anart2001-05-231-2/+2
| | | | ancient compiler.
* Add a delay (in miliseconds) argument to ttwait.art2001-05-031-8/+6
|
* $OpenBSD$niklas2001-01-291-0/+2
|
* o check that we are on a tty (and bail if not)millert2000-07-251-1/+4
| | | | o in panic() just call exit() not abort()
* The start of KNF + -Wall. The code has been run through indent butmillert2000-04-131-15/+3
| | | | needs hand fixup. I stopped at keymap.c...
* add missing return valuemillert2000-03-021-1/+2
|
* Use a char, not a char[1] in ttgetc and cast the return value to int.millert2000-03-021-3/+3
| | | | Perhaps this should really be a u_char but I don't think it really matters.
* Reorganize to be more like the BSD version + KNFmillert2000-03-021-101/+134
|
* make this compile on systems w/o TCSASOFTmillert2000-02-271-0/+14
|
* Better setting of terminal 'raw' mode, cribbed from BSD curses.millert2000-02-271-8/+7
| | | | | | We no longer try to put the terminal into 8bit, no parity mode and instead use the TCSASOFT flag to tcsetattr() as per the discussion of this in lib/libocurses/tty.c.
* Call setttysize() from ttinit() not ttopen() since we haven'tmillert2000-02-271-68/+35
| | | | | | | run setupterm() until ttinit() is called. Remove a tgetnum() I missed in the termcap -> terminfo cleanup. Merge parts of the BSD ttyio.c. The termios stuff here could use a cleanup, possibly including the flow control hack from the BSD ttyio.c.
* change WINDOW -> MGWIN to avoid curses type conflictmillert2000-02-261-43/+10
| | | | | convert to terminfo in tty*.c add support for some keypad function keys (arrows, pgup, pgdown)
* further pruningderaadt2000-02-251-1/+0
|
* make it minimally compile; millertderaadt2000-02-251-8/+7
|
* initial import of mg2aderaadt2000-02-251-0/+265