[Developers] bug in tpl2cpp

dave fournier davef at otter-rsch.com
Fri Jan 14 16:52:14 PST 2011


Not sure what version of the source you have but for me to change
the code around line 2690 from

<IN_NAMED_THREE_ARRAY_DEF>{name} {
     if (warn_unallocated) write_unallocated("3darray()");

     strcpy(tmp_string,yytext);  // get x in x(1,4)
     fprintf(fdat,"%s",tmp_string);
     fprintf(fall,"  %s",tmp_string);
     fprintf(fall,"%s",".allocate");
     after_part(tmp_string1,yytext,'(');  // get x in x(1,4)
     before_part(tmp_string2,tmp_string1,')');
     fprintf(fall,"%s)",tmp_string2);
     fprintf(fdat,"%s",";\n");
     fprintf(fall,"%s",";\n");
     if (!params_defined)
     {
       BEGIN DEFINE_DATA;
     }
     else
     {
       BEGIN DEFINE_PARAMETERS;
     }
                             }


to

<IN_NAMED_THREE_ARRAY_DEF>{name} {
     if (warn_unallocated) write_unallocated("3darray()");

     strcpy(tmp_string,yytext);  // get x in x(1,4)
     fprintf(fdat,"%s",tmp_string);
     fprintf(fall,"  %s",tmp_string);
     fprintf(fall,"%s",".allocate()");
     fprintf(fdat,"%s",";\n");
     fprintf(fall,"%s",";\n");
     if (!params_defined)
     {
       BEGIN DEFINE_DATA;
     }
     else
     {
       BEGIN DEFINE_PARAMETERS;
     }
                             }

seems to do the trick.


More information about the Developers mailing list