• R/O
  • HTTP
  • SSH
  • HTTPS

qcad: Commit

Source code of QCAD


Commit MetaInfo

Revision772512261685d5c9fee18acc2e32dc90f1b809d3 (tree)
Time2015-04-17 11:13:54
AuthorH. Watanabe <kaityo@user...>
CommiterH. Watanabe

Log Message

Save results as text

Change Summary

Incremental Difference

--- a/compiler/qcrun.cpp
+++ b/compiler/qcrun.cpp
@@ -52,6 +52,7 @@ int main(int argc, char **argv) {
5252 QCompilerCntl *qCCntl = NULL;
5353 QCalcUnits *qCalcUnits = NULL;
5454
55+ std::string tfilename = "";
5556 std::string ofilename = "";
5657 std::string ifilename = "";
5758 std::vector<std::string> args;
@@ -136,10 +137,11 @@ int main(int argc, char **argv) {
136137 //_____ OUTPUT ______
137138 if (isSet(parameters_ready, opt_input)) {
138139 if (false == isSet(parameters_ready, opt_output)) {
139- //ofilename = setOutputFilename(ifilename);
140140 ofilename = getBaseFilename(ifilename)+".qdt";
141+ tfilename = getBaseFilename(ifilename)+".txt";
141142 }
142143
144+ std::cerr << "Reading " << ifilename << std::endl;
143145 std::ifstream ifs(ifilename.c_str(), std::ios::in);
144146 if (!ifs) {
145147 std::cerr << "Cannot open the input file.\n";
@@ -183,8 +185,10 @@ int main(int argc, char **argv) {
183185 }
184186 }
185187
188+ std::cerr << "Saving " << ofilename << std::endl;
186189 qBits->SaveToFile(ofilename.c_str());
187- qBits->SaveAsText("test.txt");
190+ std::cerr << "Saving " << tfilename << std::endl;
191+ qBits->SaveAsText(tfilename.c_str());
188192 delete qBits;
189193 delete qCCntl;
190194
@@ -194,9 +198,7 @@ int main(int argc, char **argv) {
194198 delete qCalcUnits;
195199 ifs.close();
196200
197- if (isSet(parameters_ready, opt_verbose)) {
198- std::cerr << "done." << std::endl;
199- }
201+ std::cerr << "done." << std::endl;
200202 }
201203
202204 return 0;
Show on old repository browser