--- rxvt-unicode/src/rxvtd.C 2006/08/18 23:06:48 1.32 +++ rxvt-unicode/src/rxvtd.C 2007/11/11 04:08:00 1.34 @@ -38,13 +38,12 @@ #include "rxvt.h" #include "rxvtdaemon.h" #include "libptytty.h" -#include "iom.h" struct server : rxvt_connection { log_callback log_cb; getfd_callback getfd_cb; - void read_cb (io_watcher &w, short revents); io_watcher read_ev; + void read_cb (ev::io &w, int revents); ev::io read_ev; void log_msg (const char *msg); int getfd (int remote_fd); @@ -54,7 +53,7 @@ getfd_cb (this, &server::getfd) { this->fd = fd; - read_ev.start (fd, EVENT_READ); + read_ev.start (fd, ev::READ); } void err (const char *format = 0, ...); @@ -63,7 +62,7 @@ struct unix_listener { int fd; - void accept_cb (io_watcher &w, short revents); io_watcher accept_ev; + void accept_cb (ev::io &w, int revents); ev::io accept_ev; unix_listener (const char *sockname); }; @@ -72,7 +71,7 @@ : accept_ev (this, &unix_listener::accept_cb) { sockaddr_un sa; - + if (strlen (sockname) >= sizeof(sa.sun_path)) { fputs ("socket name too long, aborting.\n", stderr); @@ -108,10 +107,10 @@ exit (EXIT_FAILURE); } - accept_ev.start (fd, EVENT_READ); + accept_ev.start (fd, ev::READ); } -void unix_listener::accept_cb (io_watcher &w, short revents) +void unix_listener::accept_cb (ev::io &w, int revents) { int fd2 = accept (fd, 0, 0); @@ -153,7 +152,7 @@ delete this; } -void server::read_cb (io_watcher &w, short revents) +void server::read_cb (ev::io &w, int revents) { auto_str tok; @@ -163,7 +162,7 @@ { stringvec *argv = new stringvec; stringvec *envv = new stringvec; - + for (;;) { if (!recv (tok)) @@ -193,12 +192,12 @@ { rxvt_term *term = new rxvt_term; - + term->log_hook = &log_cb; term->getfd_hook = &getfd_cb; bool success; - + try { success = term->init (argv, envv); @@ -246,7 +245,7 @@ return EXIT_FAILURE; } } - + chdir ("/"); if (opt_opendisplay) @@ -276,7 +275,7 @@ _exit (EXIT_SUCCESS); } - io_manager::loop (); + ev::ev_loop (0); return EXIT_SUCCESS; }