Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 16 Oct 2002 17:33:25 -0400
From: Christopher Faylor <cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: starting a cygwin app from a Windows Service
Message-ID: <20021016213325.GA23673@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <9532AC3F9163F4458A2A212C4CF8A2EC2C9508@liilmtst03.mailtask.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <9532AC3F9163F4458A2A212C4CF8A2EC2C9508@liilmtst03.mailtask.com>
User-Agent: Mutt/1.4i

On Wed, Oct 16, 2002 at 04:20:41PM -0500, Madsen, Mark wrote:
>When I run an application that uses the cygwin1.dll from either a Windows Service and then from the command line I get different results when trying to read a text file.
>
>As a Windows Service:
>I use fopen and fgets to read a DOS text file and the CR/LF
>combinations are handled properly.  Meaning that I only see the single
>LF.
>
>Running from a DOS command line: Using the exact same executable image
>as above, both characters are in the buffer.

Open the file using fopen ("foo", "rt") to force reading in text mode.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

