gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
mjc2wsl - inline printing - use the new @Format instead of substringing
authorDoni Pracner <quinnuendo@gmail.com>
Fri, 1 Aug 2014 12:36:14 +0000 (14:36 +0200)
committerDoni Pracner <quinnuendo@gmail.com>
Fri, 1 Aug 2014 12:36:14 +0000 (14:36 +0200)
src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java

index 9a4493c..f5714aa 100644 (file)
@@ -676,7 +676,7 @@ public class mjc2wsl{
                                prl(createTopTwoEStack());
                                if (genInlinePrint){
                                        prl(createComment("print spacing and transformation",C_SPEC));
                                prl(createTopTwoEStack());
                                if (genInlinePrint){
                                        prl(createComment("print spacing and transformation",C_SPEC));
-                                       prl("PRINFLUSH(SUBSTR(\"          \", 0, MIN(10, MAX(0,tempa-1))), @List_To_String(< tempb >));");
+                                       prl("PRINFLUSH(@Format(tempa, @List_To_String(< tempb >)));");
                                } else
                                        prl("Print_MJ_CHAR(tempb,tempa);");
                                prl(createEndVar());
                                } else
                                        prl("Print_MJ_CHAR(tempb,tempa);");
                                prl(createEndVar());
@@ -688,7 +688,7 @@ public class mjc2wsl{
                                prl(createTopTwoEStack());
                                if (genInlinePrint){
                                        prl(createComment("print spacing",C_SPEC));
                                prl(createTopTwoEStack());
                                if (genInlinePrint){
                                        prl(createComment("print spacing",C_SPEC));
-                                       prl("PRINFLUSH(SUBSTR(\"          \", 0, MIN(10, MAX(0, tempa-SLENGTH(@String(tempb))))), tempb);");
+                                       prl("PRINFLUSH(@Format(tempa,tempb));");
                                }
                                else
                                        prl("Print_MJ(tempb,tempa);");
                                }
                                else
                                        prl("Print_MJ(tempb,tempa);");
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner