=== modified file 'man/termkey.7' --- man/termkey.7 2016-11-30 17:51:58 +0000 +++ man/termkey.7 2012-11-30 17:06:14 +0000 @@ -103,9 +103,6 @@ .TP .B TERMKEY_FLAG_EINTR Without this flag, IO operations are retried when interrupted by a signal (\fBEINTR\fP). With this flag the \fBTERMKEY_RES_ERROR\fP result is returned instead. -.TP -.B TERMKEY_FLAG_NOSTART -This flag is only meaningful to the constructor functions \fBtermkey_new\fP(3) and \fBtermkey_new_abstract\fP(3). If set, the constructor will not call \fBtermkey_start\fP(3) as part of the construction process. The user must call that at some future time before the instance will be usable. .PP The following canonicalisation flags are recognised. .TP === modified file 'man/termkey_new.3' --- man/termkey_new.3 2016-11-30 17:51:58 +0000 +++ man/termkey_new.3 2012-04-24 23:59:13 +0000 @@ -24,8 +24,6 @@ aware or not, and sets either the \fBTERMKEY_FLAG_UTF8\fP or \fBTERMKEY_FLAG_RAW\fP flag. One of these two bits will always be in effect. The current flags in effect can be obtained by \fBtermkey_get_flags\fP(3). .PP If a file handle is provided, the terminfo driver may send a string to initialise or set the state of the terminal before \fBtermkey_new\fP() returns. This will not be done if no file handle is provided, or if the file handle is a pipe (\fBS_ISFIFO\fP()). In this case it will be the caller's responsibility to ensure the terminal is in the correct mode. Once initialised, the terminal can be stopped by \fBtermkey_stop\fP(3), and started again by \fBtermkey_start\fP(3). -.PP -This behaviour is modified by the \fBTERMKEY_FLAG_NOSTART\fP flag. If passed in the \fIflags\fP argument then the instance will not be started yet by the constructor; the caller must invoke \fBtermkey_start\fP() at some future point before the instance will be usable. .SH VERSION CHECK MACRO Before calling any functions in the \fBtermkey\fP library, an application should use the \fBTERMKEY_CHECK_VERSION\fP macro to check that the loaded version of the library is compatible with the version it was compiled against. This should be done early on, ideally just after entering its \fBmain\fP() function. .SH "RETURN VALUE" === modified file 'termkey.c' --- termkey.c 2016-11-30 17:51:58 +0000 +++ termkey.c 2016-10-11 20:30:36 +0000 @@ -404,7 +404,7 @@ if(!termkey_init(tk, term)) goto abort; - if(!(flags & TERMKEY_FLAG_NOSTART) && !termkey_start(tk)) + if(!termkey_start(tk)) goto abort; return tk; @@ -429,14 +429,9 @@ return NULL; } - if(!(flags & TERMKEY_FLAG_NOSTART) && !termkey_start(tk)) - goto abort; + termkey_start(tk); return tk; - -abort: - free(tk); - return NULL; } void termkey_free(TermKey *tk) === modified file 'termkey.h.in' --- termkey.h.in 2016-11-30 17:51:58 +0000 +++ termkey.h.in 2014-03-04 13:59:53 +0000 @@ -151,8 +151,7 @@ TERMKEY_FLAG_NOTERMIOS = 1 << 4, /* Do not make initial termios calls on construction */ TERMKEY_FLAG_SPACESYMBOL = 1 << 5, /* Sets TERMKEY_CANON_SPACESYMBOL */ TERMKEY_FLAG_CTRLC = 1 << 6, /* Allow Ctrl-C to be read as normal, disabling SIGINT */ - TERMKEY_FLAG_EINTR = 1 << 7, /* Return ERROR on signal (EINTR) rather than retry */ - TERMKEY_FLAG_NOSTART = 1 << 8 /* Do not call termkey_start() in constructor */ + TERMKEY_FLAG_EINTR = 1 << 7 /* Return ERROR on signal (EINTR) rather than retry */ }; enum {