Remove an unnecessary call to put stdin into non-blocking mode. On
termux/android, xmppipe is aborted when the fd capability set is
changed:
```
FORTIFY: fcntl(F_SETFD) passed non-FD_CLOEXEC flag: 0x800
libc: FORTIFY: fcntl(F_SETFD) passed non-FD_CLOEXEC flag: 0x800
libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 32292
(xmppipe), pid 32292 (<unknown>)
libc: failed to spawn debuggerd dispatch thread: Try again
```
Input is percent-encoded when colon separated values mode is
enabled. Account for the percent encoding overhead (each character is
encoded as 3 characters) in the default buffer size.
Work around for message boundary bugs in csv mode, e.g.,
* only the first lihe delimited value is read: multiple lines may be in
the buffer
* a buffer may contain a partial message
TIL XMPP JIDs can be bare domain names:
xmppipe --chat example.com
xmppipe parses that as: example.com@yourdomain.com
As a hacky workaround, for chats only, check if the JID contains a
period. JIDs containing a period such as firstname.lastname need to use
the full JID:
xmppipe --chat firstname.lastname@example.com
The ctype functions are error prone. The argument is an int which must
be in the range of an unsigned char and is interpreted based on the
locale:
These functions check whether c, which must have the value of
an unsigned char or EOF, falls into a certain character class
according to the specified locale. The functions without the
"_l" suffix perform the check based on the current locale.
Fix rlimit process restriction in commit 29d29f21:
* fd 1 is opened by the parent: enforce restrictions at startup
* enable RLIMIT_FSIZE if fd 2 is not a regular file
* fix compile error
libstrophe 0.12 supports (and enables by default) stream management. The
xmppipe session disconnects when strophe and xmppipe both try to handle
the stream acknowledgement.
* disable strophe stream management
* TODO: if strophe SM is available, disable xmppipe SM