From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Can I query the WWW from a DJGPP program? Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <8tu6jd$7o9$1 AT news DOT stortek DOT com> <9ld50t0bdc1j4447j7jc73k76u0pq3dg8g AT 4ax DOT com> <7ot60too6v9k256nb2854jkq9mp62igco1 AT 4ax DOT com> <9003-Sat04Nov2000083635+0200-eliz AT is DOT elta DOT co DOT il> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 28 X-Trace: /KHlxMaAODGqRDV8O9k57cbtS3Geu2/RkxgTZhJxtlsA+FzBxkyuiBSdiq3c+8uGWnlBHf3gyPzi!F2suNxCZHLcdZM/oIqt25zyEMgORRGMbFoAARZPYXwHbmDfCOEKg+c9NPIpFya8TOuaa7x8OALEh!znXYJw== X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sun, 05 Nov 2000 16:54:33 GMT Distribution: world Date: Sun, 05 Nov 2000 16:54:33 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sat, 04 Nov 2000 08:36:35 +0200, "Eli Zaretskii" wrote: >> From: Damian Yerrick >> > return system("lynx -source foo.html > temp.tmp"); > >And that cmdline[] variable seems redundant, since you don't use the >results of sprintf... While we're at it, I'll fix three more problems I saw: int pull_html(const char *url) { // I was tired when I wrote the original function. char cmdline[256]; // adds redirection and removes buffer overflow sprintf(cmdline, "lynx -source %.224s > temp.tmp", url); // oops! return system(cmdline); } --