Ok, here is the patch for cs6 to facilitate the objections diff -ur csound6~/Top/one_file.c csound6/Top/one_file.c --- csound6~/Top/one_file.c 2012-04-13 09:26:07.000000000 +0200 +++ csound6/Top/one_file.c 2012-04-13 11:55:10.000000000 +0200 @@ -369,20 +369,18 @@ static int createScore(CSOUND *csound, FILE *unf) { char *p; - CORFIL *incore = corfile_create_w(); char buffer[CSD_MAX_LINE_LEN]; + if (csound->scorestr == NULL) + csound->scorestr = corfile_create_w(); csound->scoLineOffset = STA(csdlinecount); while (my_fgets(csound, buffer, CSD_MAX_LINE_LEN, unf)!= NULL) { p = buffer; while (*p == ' ' || *p == '\t') p++; - if (strstr(p, "") == p) { - corfile_flush(incore); - csound->scorestr = incore; + if (strstr(p, "") == p) return TRUE; - } else - corfile_puts(buffer, incore); + corfile_puts(buffer, csound->scorestr); } csoundErrorMsg(csound, Str("Missing end tag ")); return FALSE; @@ -435,7 +433,17 @@ return FALSE; } remove(extname); - add_tmpfile(csound, STA(sconame)); /* IV - Feb 03 2005 */ + if (csound->scorestr == NULL) + csound->scorestr = corfile_create_w(); + fd = csoundFileOpen(csound, &scof, CSFILE_STD, STA(sconame), "r", NULL); + if (UNLIKELY(fd == NULL)) { + remove(STA(sconame)); + return FALSE; + } + while (my_fgets(csound, buffer, CSD_MAX_LINE_LEN, scof)!= NULL) + corfile_puts(buffer, csound->scorestr); + csoundFileClose(csound, fd); + remove(STA(sconame)); return TRUE; } else fputs(buffer, scof); @@ -733,6 +741,8 @@ } else if (strstr(p, "") == p || strstr(p, "") == p) { + if (csound->scorestr != NULL) + corfile_flush(csound->scorestr); *pname = STA(orcname); *score = STA(sconame); if (STA(midiSet)) { diff -ur csound6~/frontends/beats/beats.l csound6/frontends/beats/beats.l --- csound6~/frontends/beats/beats.l 2012-04-13 09:26:07.000000000 +0200 +++ csound6/frontends/beats/beats.l 2012-04-13 11:44:08.000000000 +0200 @@ -200,8 +200,8 @@ int yywrap(void) { - extern FILE *myout; - fprintf(myout, "e\n"); + /* extern FILE *myout; */ + /* fprintf(myout, "e\n"); */ return 1; } diff -ur csound6~/frontends/beats/beats.y csound6/frontends/beats/beats.y --- csound6~/frontends/beats/beats.y 2012-04-13 09:26:07.000000000 +0200 +++ csound6/frontends/beats/beats.y 2012-04-13 11:43:52.000000000 +0200 @@ -81,7 +81,7 @@ ; statement : S_NL { } - | T_QUIT { fprintf(myout ,"e\n"); return 0; } + | T_QUIT { return 0; } | T_BEATS S_EQ T_INTEGER S_NL { base_time = last_base_time; bpm = (double)last_integer; fprintf(myout, ";;;setting bpm=%f\n", bpm);} | T_PERMEASURE S_EQ T_INTEGER S_NL { permeasure = last_integer; fprintf(myout,";;;setting permeasure=%d\n", permeasure);} ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net