Renamed termkey_{set,get}waittime() to termkey_{set,get}_waittime() to be more consistent

This commit is contained in:
Paul LeoNerd Evans 2008-11-06 20:29:50 +00:00
parent 023943c738
commit 9cd46fcea3
9 changed files with 33 additions and 33 deletions

View File

@ -59,4 +59,4 @@ install-man:
done
ln -sf termkey_new.3.gz $(DESTDIR)$(MAN3DIR)/termkey_destroy.3.gz
ln -sf termkey_getkey.3.gz $(DESTDIR)$(MAN3DIR)/termkey_getkey_force.3.gz
ln -sf termkey_setwaittime.3.gz $(DESTDIR)$(MAN3DIR)/termkey_getwaittime.3.gz
ln -sf termkey_set_waittime.3.gz $(DESTDIR)$(MAN3DIR)/termkey_get_waittime.3.gz

View File

@ -49,7 +49,7 @@ int main(int argc, char *argv[]) {
}
if(ret == TERMKEY_RES_AGAIN)
nextwait = termkey_getwaittime(tk);
nextwait = termkey_get_waittime(tk);
else
nextwait = -1;
}

View File

@ -229,12 +229,12 @@ void termkey_destroy(termkey_t *tk)
termkey_free(tk);
}
void termkey_setwaittime(termkey_t *tk, int msec)
void termkey_set_waittime(termkey_t *tk, int msec)
{
tk->waittime = msec;
}
int termkey_getwaittime(termkey_t *tk)
int termkey_get_waittime(termkey_t *tk)
{
return tk->waittime;
}

View File

@ -129,8 +129,8 @@ termkey_t *termkey_new(int fd, int flags);
void termkey_free(termkey_t *tk);
void termkey_destroy(termkey_t *tk);
void termkey_setwaittime(termkey_t *tk, int msec);
int termkey_getwaittime(termkey_t *tk);
void termkey_set_waittime(termkey_t *tk, int msec);
int termkey_get_waittime(termkey_t *tk);
termkey_result termkey_getkey(termkey_t *tk, termkey_key *key);
termkey_result termkey_getkey_force(termkey_t *tk, termkey_key *key);

View File

@ -27,4 +27,4 @@ No nore bytes were read.
.BR termkey_new (3),
.BR termkey_getkey (3),
.BR termkey_waitkey (3),
.BR termkey_setwaittime (3)
.BR termkey_set_waittime (3)

View File

@ -79,7 +79,7 @@ The following example program prints details of every keypress until the user pr
.BR termkey_new (3),
.BR termkey_advisereadable (3),
.BR termkey_waitkey (3),
.BR termkey_setwaittime (3),
.BR termkey_set_waittime (3),
.BR termkey_get_keyname (3),
.BR termkey_snprint_key (3)
EOF

23
termkey_set_waittime.3 Normal file
View File

@ -0,0 +1,23 @@
.TH TERMKEY_SET_WAITTIME 3
.SH NAME
termkey_set_waittime, termkey_get_waittime \- control the wait time for multibyte sequences
.SH SYNOPSIS
.nf
.B #include <termkey.h>
.sp
.BI "void termkey_set_waittime(termkey_t *" tk ", int " msec );
.br
.BI "int termkey_get_waittime(termkey_t *" tk );
.fi
.sp
Link with \fI-ltermkey\fP.
.SH DESCRIPTION
\fBtermkey_set_waittime\fP sets the number of miliseconds that \fBtermkey_wait\fP(3) will wait for the remaining bytes of a multibyte sequence if it detects the start of a partially-complete one.
.PP
\fBtermkey_get_waittime\fP returns the value set by the last call to \fBtermkey_set_waittime\fP(), or the default value if a different has not been set.
.SH "RETURN VALUE"
\fBtermkey_set_waittime\fP() returns no value. \fBtermkey_get_waittime\fP() returns the current wait time in miliseconds.
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_getkey (3),
.BR termkey_waitkey (3)

View File

@ -1,23 +0,0 @@
.TH TERMKEY_SETWAITTIME 3
.SH NAME
termkey_setwaittime, termkey_getwaittime \- control the wait time for multibyte sequences
.SH SYNOPSIS
.nf
.B #include <termkey.h>
.sp
.BI "void termkey_setwaittime(termkey_t *" tk ", int " msec );
.br
.BI "int termkey_getwaittime(termkey_t *" tk );
.fi
.sp
Link with \fI-ltermkey\fP.
.SH DESCRIPTION
\fBtermkey_setwaittime\fP sets the number of miliseconds that \fBtermkey_wait\fP(3) will wait for the remaining bytes of a multibyte sequence if it detects the start of a partially-complete one.
.PP
\fBtermkey_getwaittime\fP returns the value set by the last call to \fBtermkey_setwaittime\fP(), or the default value if a different has not been set.
.SH "RETURN VALUE"
\fBtermkey_setwaittime\fP() returns no value. \fBtermkey_getwaittime\fP() returns the current wait time in miliseconds.
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_getkey (3),
.BR termkey_waitkey (3)

View File

@ -16,7 +16,7 @@ Link with \fI-ltermkey\fP.
.PP
For details of the \fBtermkey_key\fP structure, see \fBtermkey_getkey\fP(3).
.PP
Some keypresses generate multiple bytes from the terminal. Because there may be network or other delays between the terminal and an application using termkey, \fBtermkey_waitkey\fP() will attempt to wait for the remaining bytes to arrive if it detects the start of a multibyte sequence. If no more bytes arrive within a certain time, then the bytes will be reported as they stand, even if this results in interpreting a partially-complete Escape sequence as a literal Escape key followed by some normal letters or other symbols. The amount of time to wait can be set by \fBtermkey_setwaittime\fP(3).
Some keypresses generate multiple bytes from the terminal. Because there may be network or other delays between the terminal and an application using termkey, \fBtermkey_waitkey\fP() will attempt to wait for the remaining bytes to arrive if it detects the start of a multibyte sequence. If no more bytes arrive within a certain time, then the bytes will be reported as they stand, even if this results in interpreting a partially-complete Escape sequence as a literal Escape key followed by some normal letters or other symbols. The amount of time to wait can be set by \fBtermkey_set_waittime\fP(3).
.SH "RETURN VALUE"
\fBtermkey_waitkey\fP() returns one of the following constants:
.TP
@ -36,7 +36,7 @@ The following example program prints details of every keypress until the user pr
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_getkey (3),
.BR termkey_setwaittime (3),
.BR termkey_set_waittime (3),
.BR termkey_get_keyname (3),
.BR termkey_snprint_key (3)
EOF