1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-14 09:03:54 +01:00

Allow continuations of Nyquist control lines either with $ or with ;

This commit is contained in:
Paul Licameli
2020-05-24 11:22:35 -04:00
parent 00084a8f38
commit 55c5a5f692

View File

@@ -2275,21 +2275,21 @@ bool NyquistEffect::ParseProgram(wxInputStream & stream)
mFoundType = false;
while (!stream.Eof() && stream.IsOk())
{
bool dollar = false;
wxString line = pgm.ReadLine();
if (line.length() > 1 &&
// New in 2.3.0: allow magic comment lines to start with $
// The trick is that xgettext will not consider such lines comments
// and will extract the strings they contain
(line[0] == wxT(';') ||
((dollar = (line[0] == wxT('$'))))))
(line[0] == wxT(';') || line[0] == wxT('$')) )
{
Tokenizer tzer;
unsigned nLines = 1;
bool done;
// Allow continuations within control lines.
bool control =
line[0] == wxT('$') || line.StartsWith( wxT(";control") );
do
// Allow run-ons only for new $ format header lines
done = Parse(tzer, line, !dollar || stream.Eof(), nLines == 1);
done = Parse(tzer, line, !control || stream.Eof(), nLines == 1);
while(!done &&
(line = pgm.ReadLine(), ++nLines, true));