This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Re: diag_printf refuses to print ANSI escape sequences?
- From: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 28 May 2007 13:32:58 -0700
- Subject: RE: [ECOS] Re: diag_printf refuses to print ANSI escape sequences?
> From: Sergei Gavrikov [mailto:w3sg@SoftHome.net]
>
> It seems, that isn't good idea to turn off string checking at
> all in the diagnostic function. LF, CR, BS and TAB are the
> essentials of the text formating. So, those chars are there.
> The '\b' quite could produce a bold printing, in past, for
> example :-) Sometimes, it needs to expand TAB to spaces and
> etc. Other non-printed characters are optional things. This
> is just _my_ opinion. I think that minimalist set ('\n',
> '\r', '\b', '\t') was the enough set for the diag_print() application.
Fine, that's what CDL items are for. It seems odd, though, that diag_printf
would make such checks, while printf doesn't. Furthermore, it seems less odd
that it would make such a check on an argument string substituted for %s,
than on the format string itself, the latter almost always being a literal
string passed directly to the function by the caller.
Anyway, I don't have a dog in this fight. I was just musing that a CDL
option to take out the checking seemed more sensible than a CDL option to
add yet another check to it.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss