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: Fri, 23 May 2003 11:18:17 -0400
From: Jon LaBadie <jcyg@jgcomp.com>
To: cygwin@cygwin.com
Subject: Re: Anyone knows of problems with strcspn
Message-ID: <20030523111817.A7577@butch.jgcomp.com>
References: <004301c3212f$d4ce1140$6401a8c0@ritedvnlpt>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <004301c3212f$d4ce1140$6401a8c0@ritedvnlpt>; from jwillemsen@remedy.nl on Fri, May 23, 2003 at 03:33:00PM +0200

On Fri, May 23, 2003 at 03:33:00PM +0200, Johnny Willemsen wrote:
> Hi,
> 
> I am porting an app to Cygwin. I now get strange errors. The code is as
> below, with all other compilers this works, but with Cygwin I have to
> substract 1 from len, because, when I copy then the string from the buffer
> from the given place I get a strange character when printing the string. 
> 
> Johnny
> 
> Len = strcspn (buffer, delimiter)

Maybe a '\r\n' for dos-style files and '\n' for unix-style files problem?

-- 
Jon H. LaBadie                  jcyg@jgcomp.com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

