Supress warnings about iconv prototype mismatch.
Restore the initial state at the end of line.

This matters for stateful encodings like iso-2022-jp.
Tweak the cmake file a little bit.
port "expandtab" option from NetBSD

http://mail-index.netbsd.org/source-changes/2008/12/12/msg213984.html
http://mail-index.netbsd.org/source-changes/2009/08/07/msg223768.html