| delorie.com/archives/browse.cgi | search |
| From: | ovek AT arcticnet DOT no (Ove Kaaven) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: why is output different each time (2nd try) |
| Date: | Fri, 06 Nov 1998 06:31:41 GMT |
| Organization: | Arctic Net AS |
| Lines: | 14 |
| Message-ID: | <36429741.2217157@isflak.arcticnet.no> |
| References: | <01be06eb$47b9e940$5640ab95 AT JUry DOT law DOT unsw DOT edu DOT au> |
| NNTP-Posting-Host: | villager.arcticnet.no |
| X-Newsreader: | Forte Free Agent 1.11/16.235 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
"Joe Ury" <j DOT ury AT unsw DOT edu DOT au> wrote:
> do {
> x = (char *)memchr(t, '|', len);
> if (x)
> *x = '\n';
> } while (x);
> fputs(x,f2);
x==NULL after the loop. Don't expect fputs(NULL,f2); to give
meaningful results. Under a real DPMI server (cwsdpmi, not windows),
this would crash and thus pinpoint the error. Maybe you meant
fputs(t,f2);
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |