lilypond-devel
[Top][All Lists]
Advanced

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

Re: Use our own ~s ly:format placeholder, since guile is broken with wid


From: Reinhold Kainhofer
Subject: Re: Use our own ~s ly:format placeholder, since guile is broken with wide chars
Date: Sat, 22 Aug 2009 13:01:00 +0200
User-agent: KMail/1.11.4 (Linux/2.6.29-02062906-generic; KDE/4.2.4; i686; ; )

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Samstag, 22. August 2009 02:28:39 schrieb address@hidden:
> On 2009/08/22 00:11:34, Reinhold wrote:
> > http://codereview.appspot.com/109070/diff/1/2
> > File lily/general-scheme.cc (right):
> >
> > http://codereview.appspot.com/109070/diff/1/2#newcode437
> > Line 437: replace_all (&s, "\"", "\\\"");
> >
> > On 2009/08/21 22:59:33, joeneeman wrote:
> > > Don't forget to escape $. Or else use single quotes rather than
>
> double quotes.
>
> > Good catch. $ needs to be escaped, too. Using single quotes does not
>
> work with
>
> > gs.
>
> Well, it should be the shell that sees the quotes, not gs. Perhaps
> you're using cmd.exe and it doesn't like single quotes? 

I'm using bash on Linux, and that doesn't like single quotes. in particular, 
the following command does NOT work:
gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 \
- -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite \
- -sOutputFile='z\'x.pdf' -c .setpdfwrite -f 'z\'x.ps'

> Unless you use guile's system* function instead of system, which doesn't
> run a shell and hence needs no escaping or quoting. That's probably a
> safer and simpler approach.

Hmm, doesn't the -sOutputFile=.... argument still need some thought about 
wrapping in quotes and escaping quotes?
Cheers,
Reinhold
- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFKj8/tTqjEwhXvPN0RAh26AJ9/FkZ3lIP8yUIpTz9CHHsUMEefrACeO+MZ
XREjb0PoUT/pGojKw22mDj8=
=RYq3
-----END PGP SIGNATURE-----




reply via email to

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