Fix warning about strdup being implicitely defined
Fix warning about lndebug's rest arguments being unused
Cleanup whitespace and long line
[CPPCheck] Limit scanf field widths to prevent crashes on some versions of libc

I think 6 digit row and column sizes should be enough for every
human. We can change this when androids start roaming the earth.
[CPPCheck] Limit the scope of nread and nwritten in completeLine()
Expand the scope of  in completeLine()
[CPPCheck] Limit the scope of count in linenoise()