From: Mikko Rasa Date: Tue, 8 Apr 2014 19:56:42 +0000 (+0300) Subject: Export properly formatted track statements from shoppinglist X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=9b92c1f33c142ea8e47e2239742f2f603a7e3861;p=r2c2.git Export properly formatted track statements from shoppinglist --- diff --git a/source/shoppinglist/main.cpp b/source/shoppinglist/main.cpp index 4f410f1..4ebd956 100644 --- a/source/shoppinglist/main.cpp +++ b/source/shoppinglist/main.cpp @@ -65,10 +65,10 @@ int ShoppingList::main() if(j!=inventory.end()) { if(j->secondsecond) - 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::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->secondsecond) - 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;