commit | 9e1c23185be2a4762feecf8107ce20483d00a5d4 | [log] [tgz] |
---|---|---|
author | antirez <antirez@gmail.com> | Thu Mar 13 12:04:36 2014 +0100 |
committer | antirez <antirez@gmail.com> | Thu Mar 13 12:04:36 2014 +0100 |
tree | 9194b2aa2d8484d031136b7b82307bc80a4f65cd | |
parent | fb015dabbd14aa2ad9274cb348cf1ab37e5acd27 [diff] |
If ioctl() fails get num of columns querying the terminal. This change makes linenoise both more robust if the ioctl() fails, and far more portable to non POSIX systems, since the ioclt() to query the terminal was probably one of the non trivial parts to replace. The code is inspired to Andreas Kupries commit 24186e99 on the win32 Linenoise port from Steve Bennett, but is a complete reimplementation.