aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Cosmetic modifications.Quentin Carbonneaux2012-03-111-13/+12
| | | | | | | | Tried to beautify the code by aligning some related code and renaming lb in tgetch to l which is more consistent with the rest of the file. In tgetch, the invariant changed from len<=BufSz to len<=BufSz-1, this allows to trivially nul terminate the line being processed.
* Use ioctl to retreive screen's size in tresize.Quentin Carbonneaux2012-03-111-3/+8
| | | | | | The curses (ncurses) library does not automatically get the new size of the terminal, thus, we must rely on an ioctl to retreive it and inform ncurses with a resizeterm call.
* Handle terminal resizes.Quentin Carbonneaux2012-03-111-8/+26
| | | | | | | | | | | | The KEY_RESIZE feature of ncurses is not used since it is not possible to detect if a KEY_RESIZE was queued by selecting on stdin. Hence, tinit now installs a SIGWINCH handler which will set the winchg variable to 1. I rely on the fact that select will be interrupted by the signal which pops after a terminal resize to be able to redraw the screen instantaneously. tresize does all the job of resizing the three used curses windows.
* Fixed the 'r' command.Quentin Carbonneaux2012-03-101-1/+2
| | | | | This command kept sending the 'r' before the actual string we wanted to send.
* Factoring of pushf and pushm, plus minor changes.Quentin Carbonneaux2012-03-101-37/+33
| | | | | | | | | | | Pushm was no used in the current code, I inlined it in pushf to save lines and factor logic. I removed the call for tredraw to avoid blinking and only redrawn the last line. Some minor changes were done: * NOTICE, and motd are now handled by the scmd function. * Tredraw was slightly modified to make use of the last line of scr.mw. * The sz element of channels was moved from int to size_t.
* Initial import in Git.Quentin Carbonneaux2012-03-103-0/+523