Commit Graph

19 Commits

Author SHA1 Message Date
Tiago Cunha
dd36982ad5 Sync OpenBSD patchset 491:
Initial changes to move tmux to libevent.

This moves the client-side loops are pretty much fully over to event-based only
(tmux.c and client.c) but server-side (server.c and friends) treats libevent as
a sort of clever poll, waking up after every event to run various things.

Moving the server stuff over to bufferevents and timers and so on will come
later.
2009-11-08 22:40:36 +00:00
Tiago Cunha
cc9ef11985 Sync OpenBSD patchset 438:
Split the server code handling clients, jobs and windows off into separate
files from server.c (merging server-msg.c into the client file) and rather than
iterating over each set after poll(), allow a callback to be specified when the
fd is added and just walk once over the returned pollfds calling each callback
where needed.

More to come, getting this in so it is tested.
2009-10-23 17:49:47 +00:00
Tiago Cunha
bc236109fd Sync OpenBSD patchset 374:
Rather than running status-left, status-right and window title #() with popen
immediately every redraw, queue them up and run them in the background,
starting each once every status-interval. The actual status line uses the
output from the last run.

This brings several advantages:

- tmux itself may be called from inside #() without causing the server to hang;
- likewise, sleep or similar doesn't cause the server to block;
- commands aren't run excessively often when redrawing;
- commands shared by status-left and status-right, or used multiple times, will
  only be run once.

run-shell and if-shell still use system()/popen() but will be changed over to
use this too later.
2009-10-11 23:55:26 +00:00
Nicholas Marriott
53570b1505 Make this match OpenBSD. 2009-08-19 09:28:10 +00:00
Nicholas Marriott
620402a833 This is a better fix for OS X stupidity. 2009-08-19 09:00:06 +00:00
Nicholas Marriott
3eb1bfddd4 Sync this properly. 2009-06-25 16:22:36 +00:00
Nicholas Marriott
a5830b9603 Restore $Id$ and add script to do so. 2009-06-25 16:21:32 +00:00
Nicholas Marriott
62822b1848 Nuke unused buffer functions. Found by lint.
Also remove some old debug output which was #if 0.
2009-06-25 16:07:00 +00:00
Nicholas Marriott
c8cf438d44 Rename all feature flags to HAVE_* and move out of makefiles into a configure
script which must be run before building.

Still two makefiles but they are a hell of a lot simpler.

HAVE_* also will make it easier to move to $buildsystem if necessary later.
2009-05-13 23:27:00 +00:00
Nicholas Marriott
19a2c87f04 Initial UTF-8 support. 2008-09-09 22:16:37 +00:00
Nicholas Marriott
33aa931541 Support OS X by moving to gettimeofday(2) and adding poll compat from OpenSSH. 2008-08-28 17:45:30 +00:00
Nicholas Marriott
e5cf8594e8 long for pid. 2008-07-01 20:35:16 +00:00
Nicholas Marriott
99df48d70f Trimify. 2008-06-18 22:21:51 +00:00
Nicholas Marriott
be53d7f298 More Sun OS crap. 2008-06-18 20:11:25 +00:00
Nicholas Marriott
5569ff9723 Don't hang when window closes early; also add lots more debugging. 2008-05-31 20:04:15 +00:00
Nicholas Marriott
3962c5f706 Change window name on \ek...\e\. 2007-11-30 11:08:35 +00:00
Nicholas Marriott
76c8a590db Big internal reorganisation to move tty control into parent. 2007-11-27 19:23:34 +00:00
Nicholas Marriott
35591ecd4e Try write even if read gets signal, some other tweaks. 2007-11-07 19:41:17 +00:00
Nicholas Marriott
a41ece5ff0 Initial import to CVS. Basic functions are working, albeit with a couple of showstopper memory bugs and many missing features. Detaching, reattaching, creating new sessions, listing sessions work acceptably for using with shells. Simple curses programs (top, systat, tetris) and more complicated ones (mutt, emacs) that don't require scrolling regions (ESC[r) mostly work fine (including mutt, emacs). No status bar yet and no key remapping or other customisation. 2007-07-09 19:04:12 +00:00