I can't see any correlation between an FTP program that makes a point of stating its written in C and saying that's for 'humans'. Also, why on earth are people still using FTP in 2015?!
>Also, why on earth are people still using FTP in 2015?!
Why are people still using the command line in 2015? Why do we still use HTTP? Because as with FTP, there are use cases for which it still works perfectly well.
You mean FTP/S aka RFC4217? You ain't kidding about being a nasty hack. When it recently came up in my world, the only place it seemed to be really well supported was in the AS/400 world, where IBM seems to have standardized on it. Everywhere else there seemed to be any number of weirdnesses, incompatibilities and decrepit features. YMMV.
I don't understand the reason for two `tcp_connect` functions. One just adds the option to pass "w" to the fd mode. Both functions are otherwise identical. Despite the "IPv4 only" comment, both structure pack with `getnameinfo()` so both appear IPv6-capable. Looks like this could be optimised to remove the first connect function.
ftp_getdataport() should return a char with sprintf, not an int. The port member of ftp_t could then be the same as the port member of skod_t, negating the need for two different tcp_connect functions.