🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9171

fgets() returns NULL at EOF??

#9171
From: BJORNDAS%CLARGRAD.BITNET
Date: Wed, 20 Aug 1986 04:02
8 lines
864 bytes
O great C gurus, help a relative greenhorn!  Why is it that fgets()
returns NULL when it reaches end of file, whereas all the other
standard i/o functions seem to return EOF at that point?  This
confuses me, especially since one would suppose fputs() to be the
partner function of fgets() and therefore to work in the same way.

Sterling Bjorndahl
BJORNDAS at CLARGRAD on BITNET
Technical Details
Message-ID: <3170@brl-smoke.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!brl-smoke!smoke!BJORNDAS%CLARGRAD.BITNET@WISCVM.WISC.EDU

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!brl-smoke!smoke!BJORNDAS%CLARGRAD.BITNET@WISCVM.WISC.EDU
From: BJORNDAS%CLARGRAD.BITNET@WISCVM.WISC.EDU
Newsgroups: net.lang.c
Subject: fgets() returns NULL at EOF??
Message-ID: <3170@brl-smoke.ARPA>
Date: Wed, 20-Aug-86 00:02:17 EDT
Article-I.D.: brl-smok.3170
Posted: Wed Aug 20 00:02:17 1986
Date-Received: Thu, 21-Aug-86 21:06:13 EDT
Sender: news@brl-smoke.ARPA
Lines: 8