Re: trim function dumping core



Chris Dollin wrote:
rkk wrote:
Chris Dollin wrote:

(fx:snip)

#include <stdio.h>
#include <ctype.h>

char *trim( char *s )

(fx:snip more)

This code doesn't work on my machine. Seems to be broken somewhere.

Hell's teeth, man, can't you be more explicit? What were the
symptoms? What implementation are you using? What, if any,
were the compiler messages? What was the output? Did you compile
the code exactly as I posted it?

If there's a mistake in it, I'd like to know where, but since
my crystal ball is back being repaired right now, I don't
know where to start ...

Seems to work fine here.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>


.



Relevant Pages

  • Re: trim function dumping core
    ... char *trim ... Hell's teeth, man, can't you be more explicit? ... were the compiler messages? ...
    (comp.lang.c)
  • const char * to char *
    ... char *the3rdpartylib; ... which gets by the compiler messages but the lint program is complaining about ... never assign a const to a non const. ... can't convert from const char * to char * ...
    (comp.lang.cpp)
  • Re: How to print a string of unsigned chars?
    ... have the same representation and alignment requirements as a pointer ... Although it isn't explicit, I'm sure that 'a' ... character type, and thus pointers to all three flavors of char must be ... and do not expect to encounter one. ...
    (comp.lang.c)
  • Re: Abstraction layer between C and CPU
    ... It is also clear that one should establish a context, ... > A char may at least be a byte or higher. ... I'll let you decide if this is explicit or not: ... The values given below shall be replaced by constant expressions ...
    (comp.lang.c)
  • Re: memory leak?
    ... when he could instead use the more robust C++ container classes like ... explicit BYTE identifier is used, instead of 'char' (I don't know if the C++ ...
    (microsoft.public.vc.mfc)