From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6397 invoked by alias); 10 Apr 2003 06:45:49 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 6390 invoked from network); 10 Apr 2003 06:45:47 -0000 Received: from unknown (HELO gnuftp.gnu.org) (199.232.41.6) by sources.redhat.com with SMTP; 10 Apr 2003 06:45:47 -0000 Received: from lantana.tenet.res.in ([202.144.28.166] helo=lantana.iitm.ernet.in) by gnuftp.gnu.org with esmtp (Exim 4.10.13) id 193Vod-0007RC-00 for gcc-help@gcc.gnu.org; Thu, 10 Apr 2003 02:45:44 -0400 Received: from lantana.tenet.res.in (IDENT:aWJEt9FuiAr075bMOpXfeDYrEDIt4XLv@lantana.tenet.res.in [202.144.28.166]) by lantana.iitm.ernet.in (8.11.6/8.11.6) with ESMTP id h3A6j6u25529 for ; Thu, 10 Apr 2003 12:15:06 +0530 Date: Thu, 10 Apr 2003 06:45:00 -0000 From: Bharathi S To: GNU GCC Subject: Re: Fgets is not working on linux/gcc3.2.1 In-Reply-To: <2B721C6525F0D411B1E900B0D0226BDD027DCC6D@mohmsg01.ad.infosys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-04/txt/msg00118.txt.bz2 On Thu, 10 Apr 2003, Ajay Bansal wrote: > Following program is not working on linux. Ideally it should read > all the lines from "/tmp/log.txt" and print them on to the screen. > Instead it breals after it encounters fgets for the first time. File is opened in Append mode. Bcoz of this file pointer may positioned in the end of file. Try it by opening in Read mode. HTH :) -- Bharathi S, IndLinuX Team, (__) DON Lab, TeNeT Group, oo ) IIT-Madras, Chennai-INDIA. (_/\