Please don't reply to this thread. The other one please. Looks horrible in the archive view.
It may also crash some people's mail clients. Your points taken. But the dl() function ain't long. -Girish On Wed, Nov 16, 2011 at 8:03 AM, Shakthi Kannan <[email protected]> wrote: > 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 > -- G3 Tech Networking appliance company web: http://g3tech.in mail: [email protected] _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
