Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Fri, 23 May 2003 09:46:16 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Johnny Willemsen cc: cygwin AT cygwin DOT com Subject: Re: Anyone knows of problems with strcspn In-Reply-To: <004301c3212f$d4ce1140$6401a8c0@ritedvnlpt> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 23 May 2003, 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) Johnny, FYI, strcspn() is used within the code for Cygwin itself (properly), so it can hardly be faulty in such a broad way. You will have to provide more of the code that exhibits the problem, the exact compilation flags you used, and, perhaps, the data that resulted in this behavior (a complete *simple* testcase with instructions on how to reproduce this would be perfect). Once people can reproduce your problem, they can start figuring out why it happens. It would also help if you mentioned which versions of Cygwin and gcc you are using (the output of "cygcheck -svr" *attached*, as per , will contain this information). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/