[Cs-dev] textfile.csd
Date | 2012-08-13 09:02 |
From | Tito Latini |
Subject | [Cs-dev] textfile.csd |
Attachments | None |
Date | 2012-08-13 09:08 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] textfile.csd |
I see the sense but this is an incompatible change. Csound originally took two files -- the first an orchestra and the second a score. Names did/does not matter. One file is thus an error. This check allowed one file as long as it was a .csd file. As long as we are happy with this minor lack of backwards.... > I think that the check for the csd extension in Top/main.c:202 > is a useless limit. It works: > > csound text.csd > ... > UnifiedCSD: text.csd > ... > > but it fails > > cp text.csd text > csound text > ... > orchname: text > ... > > The follow is better (csound->orchname is non-NULL): > > else if ((csound->scorename == NULL || csound->scorename[0] == (char) 0) > && csound->orchname[0] != '\0') { > > instead of the current > > else if (csound->scorename == NULL || csound->scorename[0] == (char) 0) > { > int tmp = (int) strlen(csound->orchname) - 4; > if (tmp >= 0 && csound->orchname[tmp] == '.' && > tolower(csound->orchname[tmp + 1]) == 'c' && > tolower(csound->orchname[tmp + 2]) == 's' && > tolower(csound->orchname[tmp + 3]) == 'd') { > > After this change, I can suggest a solution to Peter in csnd-ml. > > tito > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > > > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-08-13 11:03 |
From | Tito Latini |
Subject | Re: [Cs-dev] textfile.csd |
Attachments | None |
Date | 2012-08-13 11:25 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] textfile.csd |
OK; go ahead >> I see the sense but this is an incompatible change. Csound originally >> took two files -- the first an orchestra and the second a score. Names >> did/does not matter. One file is thus an error. This check allowed one >> file as long as it was a .csd file. >> >> As long as we are happy with this minor lack of backwards.... > > One file is an error but we have a segfault (all parsers) with > > csound orcfile > > caused by `strlen(csound->scorename)' in main.c. The change also fixes it. > There is not a segfault with a csdfile without extension because the > parser signals an error > > error: syntax error, unexpected S_LT (token "<") line 0: > > * Some free thoughts > > Discarded solution: a xml file begins with a tag, so the '<' char is > the first char and it is an error in an orc file. Therefore it is > enough a check for the first non-blank character; if it is '<', the > file is 'csd'. But it is too late because there are some csd files > that begin with > > some text bla bla > bla bla ... > |
Date | 2012-08-13 11:45 |
From | Tito Latini |
Subject | Re: [Cs-dev] textfile.csd |
Attachments | None |
Date | 2012-08-13 17:58 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] textfile.csd |
Hi, I think Cosund6 should attempt a cleanup of command line options, to settle on -+ or -- but having both can be confusing... Cheers, Andrés On 8/13/12, Tito Latini |
Date | 2012-08-13 18:12 |
From | Tito Latini |
Subject | Re: [Cs-dev] textfile.csd |
Attachments | None |
Date | 2012-08-13 18:13 |
From | Toby |
Subject | Re: [Cs-dev] textfile.csd |
On 08/13/2012 09:58 AM, Andres Cabrera wrote: > Hi, > > I think Cosund6 should attempt a cleanup of command line options, to > settle on -+ or -- but having both can be confusing... I always wondered about that. Where did the -+ thing come from? Toby ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-08-13 18:53 |
From | Justin Smith |
Subject | Re: [Cs-dev] textfile.csd |
On Mon, Aug 13, 2012 at 10:13 AM, Toby |
Date | 2012-08-13 19:16 |
From | Justin Smith |
Subject | Re: [Cs-dev] textfile.csd |
On Mon, Aug 13, 2012 at 10:53 AM, Justin Smith |
Date | 2012-08-13 20:58 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] textfile.csd |
> On 08/13/2012 09:58 AM, Andres Cabrera wrote: >> Hi, >> >> I think Cosund6 should attempt a cleanup of command line options, to >> settle on -+ or -- but having both can be confusing... > > I always wondered about that. Where did the -+ thing come from? > > Toby > The -- form was in csound with a different meaning from before the GNU use. It came from the Codemist interface much earlier. The -+ form was ibtroduced by Istvan Varga at some stage as -- waqs already used ==John ff ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-08-13 22:06 |
From | Michael Gogins |
Subject | Re: [Cs-dev] textfile.csd |
The tags are not XML, and the restrictions on placement are deliberate. If the tags were XML, it would not be clear to a non programmer how to edit a CSD file. That said, the CSD files will (or least, used to) load into an XML editor just fine. Regards, Mike On Mon, Aug 13, 2012 at 3:58 PM, |