| www.delorie.com/archives/browse.cgi | search |
| From: | Kevin Ashley <k DOT ashley AT ulcc DOT ac DOT uk> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: why is output different each time? |
| Date: | Thu, 12 Nov 1998 19:04:38 +0000 |
| Organization: | Posted via ULCC Internet Services |
| Lines: | 25 |
| Message-ID: | <364B3146.41C6@ulcc.ac.uk> |
| References: | <01be06da$d35edfc0$5640ab95 AT JUry DOT law DOT unsw DOT edu DOT au> |
| NNTP-Posting-Host: | silver.ulcc.ac.uk |
| Mime-Version: | 1.0 |
| X-Mailer: | Mozilla 3.01 (X11; I; IRIX 5.3 IP22) |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Joe Ury wrote:
>
> Why do I get differing output each time.
...snip...
in this loop:
> do {
> x = (char *)memchr(t, '|', len);
> if (x)
> *x = '\n';
> } while (x);
you exit when x is a NULL pointer. You then immediately use x
to do output:
> fputs(x,f2);
I'm not saying there aren't other problems, but that certainly
looks like one to me.
------------------------------------------------------------------------
Kevin Ashley K DOT Ashley AT Ulcc DOT ac DOT uk
Special Projects Manager http://www.ulcc.ac.uk/staff/Kevin+Ashley
ULCC ...ukc!ncdlab!K.Ashley (but probably not any more)
This is not a signature
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |