]> git.tdb.fi Git - r2c2.git/commitdiff
Export properly formatted track statements from shoppinglist
authorMikko Rasa <tdb@tdb.fi>
Tue, 8 Apr 2014 19:56:42 +0000 (22:56 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 8 Apr 2014 19:56:42 +0000 (22:56 +0300)
source/shoppinglist/main.cpp

index 4f410f1f3649966e630f31613113a6dc6985644d..4ebd956d824e7a73976fb3000e7c63094d44c7cb 100644 (file)
@@ -65,10 +65,10 @@ int ShoppingList::main()
                if(j!=inventory.end())
                {
                        if(j->second<i->second)
-                               IO::print("track %d %d;\n", i->first, i->second-j->second);
+                               IO::print("track \\%d %d;\n", i->first, i->second-j->second);
                }
                else
-                       IO::print("track %d %d;\n", i->first, i->second);
+                       IO::print("track \\%d %d;\n", i->first, i->second);
        }
 
        IO::print("// Pre-existing:\n");
@@ -76,7 +76,7 @@ int ShoppingList::main()
        {
                map<ArticleNumber, unsigned>::iterator j=inventory.find(i->first);
                if(j!=inventory.end())
-                       IO::print("track %d %d;\n", i->first, min(i->second, j->second));
+                       IO::print("track \\%d %d;\n", i->first, min(i->second, j->second));
        }
 
        IO::print("// Unused:\n");
@@ -86,10 +86,10 @@ int ShoppingList::main()
                if(j!=layout.end())
                {
                        if(j->second<i->second)
-                               IO::print("track %d %d;\n", i->first, i->second-j->second);
+                               IO::print("track \\%d %d;\n", i->first, i->second-j->second);
                }
                else
-                       IO::print("track %d %d;\n", i->first, i->second);
+                       IO::print("track \\%d %d;\n", i->first, i->second);
        }
 
        return 0;