summaryrefslogtreecommitdiffstats
path: root/usr.bin/mg/tty.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* shrink differences between ttinsl/ttdelljasper2015-11-181-5/+7
|
* More unifdef cleanup:bcallah2015-03-191-3/+1
| | | | | | | | | | | -UDIRED_XMAPS and -UFUND_XMAPS: you can't build mg the other way. -DTIOCGWINSZ: you have this if you have term.h Remove a #define TERMCAP which isn't being used. Remove defines for NDIRED_XMAPS, NFUND_XMAPS, and IMAPEXT. They are all defined to be 0 and are only ever used in addition. We don't need to add 0. Simply lines that were using those defines. ok florian@
* Clean up the includes in mg.bcallah2015-03-191-5/+7
| | | | | | | | | | 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@
* It is impossible to build mg without both -DFKEYS and -DXKEYS. So let'sbcallah2015-03-171-3/+1
| | | | | | | enforce that and remove the options. Mostly mechanical diff from unifdef with bonus removal of comments that no longer have any relevance. ok florian@
* scroll_fwd should be const char *guenther2014-11-161-2/+2
| | | | from Kamil Rytarowski (n54 (at) gmx.com)
* constipate charcost()guenther2014-11-161-3/+3
| | | | from Kamil Rytarowski (n54 (at) gmx.com)
* Enable dirty buffer detection in mg.kjell2008-09-151-1/+6
| | | | | | | | Emulate the emacs behavior: after suspend/resume, buffer switch, or at save time, warn (prompt) the user if the file has been modified on disk in the interim. This has already saved my butt numerous times. ok phessler
* Let curses handle the setup of terminal instead of doing it on our owntobias2008-06-111-9/+4
| | | | | | and leaving terminal in an inusable state if setupterm failed. ok kjell
* * move sys/queue.h inclusion to sysdef.h (it's system specific)jason2006-08-011-2/+1
| | | | | | | * add <signal.h> to sysdef.h (needed for sig_atomic_t on linux, and we get it by accident on OpenBSD) * remove <signal.h> from tty.c/spawn.c (not needed now that it's in sysdef.h) ok beck
* lint love; ok kjellderaadt2006-04-031-2/+2
|
* Fix a coredump occurring when the terminal is resized while mg isotto2006-02-251-1/+2
| | | | | suspended. Problem reported and fixed tested by reyk@; tweak by kjell@; ok kjell@
* Fix a typo (introduced in rev 1.6) that utterly broke cost calculations.kjell2005-12-131-2/+2
| | | | | | | In theory, mg should now be much more efficient on slow displays (hello, zaurus). Spotted by lint. ok millert.
* More name-clash delintingkjell2005-12-131-1/+2
|
* Clean up some lint.kjell2005-11-191-1/+2
|
* Add explicit public domain notices to all public domain files.kjell2005-06-141-1/+3
| | | | ok millert@, deraadt@
* This is a no binary change which does:db2005-04-031-17/+13
| | | | | | | | | | - spelling, punctuation fixes - variable declaration lineup - use parentheses for return and sizeof - K&R function declarations -> ANSI - other minor code beautification ok henning@
* mostly ansi cleanup; pval okderaadt2003-06-101-3/+3
|
* ANSIfication uncovers function argument bugs. How unusual.art2002-08-281-2/+2
|
* ansivincent2002-08-231-17/+15
|
* just make vtresize return TRUE/FALSE instead of 0/-1, for consistency withvincent2002-07-011-4/+2
| | | | | | the rest of the mg code. + some KNF. adapted from diff by zyrnix.
* remove a wrapper around getenv()deraadt2002-02-211-7/+2
|
* signal-safe window size changingderaadt2002-02-211-6/+4
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-2/+2
|
* some KNFderaadt2002-02-141-2/+2
|
* Get rid of signal race (and handling of SIGWINCH).art2002-02-051-1/+5
| | | | New code is almost done, but not really tested yet.
* Remove the NROW and NCOL limits. The static arrays are now replaced withart2002-01-181-19/+20
| | | | | | dynamically allocated memory. Code written by Vincent Labrecque <limitln@Psyfreaks.CA> with some minor tweaks by me.
* Clean up tty resizing code.art2002-01-101-25/+32
| | | | Catch SIGWINCH and resize and refresh the screen.
* spacesmickey2001-05-241-28/+28
|
* remove VOID. We're way beyond the point where this could build with anart2001-05-231-14/+14
| | | | ancient compiler.
* $OpenBSD$niklas2001-01-291-0/+2
|
* More -Wall anmd KNF, from op2@tomahawk.SQUiSH.orgmillert2000-09-011-124/+128
|
* The start of KNF + -Wall. The code has been run through indent butmillert2000-04-131-100/+121
| | | | needs hand fixup. I stopped at keymap.c...
* Reverse rutgers change (attachtoparent vs. spawncli)millert2000-03-031-0/+13
| | | | | | | | | New ttreinit function that enters application mode, enables the keypad and resets the tty size. New spawn module that calls tttidy() to exit application mode (and cleanup) then calls ttreinit() after resume to get back into application mode. Assumes we have job control. This takes advantage of the xterm 'alternate screen'.
* Call setttysize() from ttinit() not ttopen() since we haven'tmillert2000-02-271-2/+4
| | | | | | | 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-213/+175
| | | | | convert to terminfo in tty*.c add support for some keypad function keys (arrows, pgup, pgdown)
* initial import of mg2aderaadt2000-02-251-0/+442