OK, I'm fairly happy with this, except that so far I've only lightly tested it.
Summary of changes:
Move the getaddrinfo/socket/connect dance to dial(), replacing
memset(&hints) with hints={0}
Replace read(1)*n with fgets()
Replace snprintf(), strlen(), write() with fprintf(), and
corresponding simplifications in parsein()
Replace snprintf(), strlen(), printl() with variadic printl(), and
corresponding simplifications in parsesrv()
Now 226 lines.
The majority of the credit for these changes goes to Kris.
-Mark
This archive was generated by hypermail 2.2.0 : Thu Sep 24 2009 - 00:48:02 UTC