[net.sources] ARC bug, all UNIX versions

allbery@ncoast.UUCP (04/04/87)

[Yes, I know there is a *bugs* newsgroup, but ncoast's news system is a bit
screwed up at present, and inews can't find it.  ++bsa]

Well, this is the third version of ARC that I have received here, and the
third version that has a bug in arcio.c.

People, if you fputc() a '\377' on some machines, the return value compares
equal to EOF.  (I didn't notice -- is fputc() being defined as returning a
char?  They're signed on this system.)  Please apply the following diff
(not -c, we're System III) to arcio.c to assure UNIX compatibility.  (It will
probably have to be ifdef'ed out for MS-DOS; not all MesS-DOS C compilers
implement ferror()....)

160,161c160,162
<     if (t)
<         if (fputc(c,t)==EOF)
---
>     if (t != NULL) {
>         fputc(c, t);
>         if (ferror(t))
165a167
>     }

++Brando
-- 
 ____   ______________
/    \ / __   __   __ \   Brandon S. Allbery		|      /^\      USS
 ___  | /__> /  \ /  \    aXcess Company		|     A A A  CHALLENGER
/   \ | |    `--, `--,    6615 Center St. #A1-105	|     H V H
|     | \__/ \__/ \__/    Mentor, OH 44060-4101		|     H . H    SEVEN
\____/ \______________/   +1 216 974 9210		|    /  |  \    WHO
________________________________________________________|   /___|___\  DARED
As long as there is the spirit to dare new frontiers, the dream will never die.
cbatt!cwruecmp!ncoast!allbery ncoast!allbery%case.CSNET@relay.CS.NET BALLBERY
	    (UUCP)                      (CSNET/Internet)             (MCIMail)