Re: witekfl branch: quoting for FLITE_SYSTEM

Kalle Olavi Niemitalo <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <[email protected]>
Witold Filipczyk <[email protected]> writes:

> Thanks for the report.
> I'll use '' to quote.

I think your commit 60fc3bd04fe3f85c66d1dadbc8ba4f56f576f611
doesn't really fix this, because \ is not special inside ''.
For example:

$ cat 'begin # \'$(date)\' # end'
cat: begin # \Thu: No such file or directory
cat: Dec: No such file or directory
cat: 28: No such file or directory
cat: 20:02:33: No such file or directory
cat: EET: No such file or directory
cat: 2006': No such file or directory
$ 

To get ' inside '' you can use '\'' like this:

$ cat 'begin # '\''$(date)'\'' # end'
cat: begin # '$(date)' # end: No such file or directory
$ 

Unfortunately it quadruples the length of the string, so ARG_MAX
can be exceeded.  And who knows what shells will do on non-POSIX
systems... If you can use something like "flite -f /dev/stdin",
perhaps via popen, I think it will be safer.

_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFlAi5Hm9IGt60eMgRAmeJAKCX9x8yBViHiNGPnd9Kzpwg+NMTqgCeP+VP
Z3i5Sh85Isoe07i2OmHXS2U=
=vLhG
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.