tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] How to use char "\"


From: Evan Langlois
Subject: Re: [Tinycc-devel] How to use char "\"
Date: Tue, 30 Sep 2014 12:30:03 -0500

Thomas,

On Tue, Sep 30, 2014 at 11:06 AM, Thomas Preud'homme <address@hidden> wrote:
strpbrk (file_name,"\*?") ir order to know if i have a simple file name, tcc tells me "unknown escape sequence".
The manpage doesn't say that the strings accept escape sequence. Is it even defined in the standard? Sounds like a bug in TinyCC.

I believe the compiler is supposed to perform all C escapes on quoted strings during compile time, converting them to the proper sequences before passing it to strpbrk.

However, strpbrk doesn't accept a regex or shell globs.  I don't see why you would be checking for '*' or '?' in a filename!

If TCC says \* is an unknown escape sequence then that looks like exactly what it should be doing.  There is no such escape.

Try basename() instead.

As for text[i]='\\', I'm betting when he says "do not work" its a run-time error due to a bug in his code, not a TCC bug.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]