.SH SYNOPSIS
.nf
.B "#include <mLib/sel.h>"
-
+.PP
.ta 2n
.B "enum {"
.B " SEL_READ = ...,"
.B " SEL_EXC = ...,"
.B " SEL_MODES = ..."
.B "};"
-
+.PP
.B "typedef struct { ...\& } sel_state;"
.B "typedef struct { ...\& } sel_timer;"
.B "typedef struct { ...\& } sel_hook;"
-
+.PP
.B "typedef struct {"
.B " int fd;"
.B " ..."
.B "} sel_file;"
-
+.PP
.B "typedef struct {"
.B " int maxfd;"
.B " fd_set fd[SEL_MODES];"
.B " struct timeval tv, *tvp;"
.B " struct timeval now;"
.B "} sel_args;"
-
+.PP
.BI "typedef void (*sel_hookfn)(sel_state *" s ", sel_args *" a ", void *" p );
-
+.PP
.BI "void sel_init(sel_state *" s );
-
+.PP
.ta \w'\fBvoid sel_initfile('u
.BI "void sel_initfile(sel_state *" s ", sel_file *" f ,
.BI " int " fd ", unsigned " mode ,
.BI "void sel_addfile(sel_file *" f );
.BI "void sel_force(sel_file *" f );
.BI "void sel_rmfile(sel_file *" f );
-
+.PP
.ta \w'\fBvoid sel_addtimer('u
.BI "void sel_addtimer(sel_state *" s ", sel_timer *" t ,
.BI " struct timeval *" tv ,
.BI " void (*" func ")(struct timeval *" tv ", void *" p ),
.BI " void *" p );
.BI "void sel_rmtimer(sel_timer *" t );
-
+.PP
.ta \w'\fBvoid sel_addhook('u
.BI "void sel_addtimer(sel_state *" s ", sel_hook *" h ,
.BI " sel_hookfn " before ", sel_hookfn " after ,
.BI " void *" p );
.BI "void sel_rmhook(sel_hook *" h );
-
+.PP
.BI "int sel_fdmerge(fd_set *" dest ", fd_set *" fd ", int " maxfd );
-
+.PP
.BI "int sel_select(sel_state *" s );
.fi
.SH "OVERVIEW"