Hi, --- On Wed, Nov 16, 2011 at 7:38 AM, Girish Venkatachalam <[email protected]> wrote: | int c, ret = -1, fd = -1; | int bytes, off; | struct hostent *h; | struct sockaddr_in s; \--
int c = 0; int bytes = 0; int off = 0; struct hostent *h = NULL; --- | char *p, *p2, host[1024], ip[40], outf[1024]; | char cmd[1024], buf[8192], path[1024]; \-- Would be good to avoid magic numbers. #define the values. The dl() function is too long. It can be split into functions to initialize, connect, and download. The following can be used for reference: http://queue.acm.org/detail.cfm?id=2063168 SK -- Shakthi Kannan http://www.shakthimaan.com _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
