This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Anyone knows of problems with strcspn

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)


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).
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]