From: H. Watanabe Date: Fri, 17 Apr 2015 02:13:54 +0000 (+0900) Subject: Save results as text X-Git-Url: http://git.sourceforge.jp/view?p=qcad%2Fqcad.git;a=commitdiff_plain;h=772512261685d5c9fee18acc2e32dc90f1b809d3;hp=2dcdd506cb1570729322a97bc8a6160306912e77 Save results as text --- diff --git a/compiler/qcrun.cpp b/compiler/qcrun.cpp index 2dda0ec..d8c2917 100644 --- a/compiler/qcrun.cpp +++ b/compiler/qcrun.cpp @@ -52,6 +52,7 @@ int main(int argc, char **argv) { QCompilerCntl *qCCntl = NULL; QCalcUnits *qCalcUnits = NULL; + std::string tfilename = ""; std::string ofilename = ""; std::string ifilename = ""; std::vector args; @@ -136,10 +137,11 @@ int main(int argc, char **argv) { //_____ OUTPUT ______ if (isSet(parameters_ready, opt_input)) { if (false == isSet(parameters_ready, opt_output)) { - //ofilename = setOutputFilename(ifilename); ofilename = getBaseFilename(ifilename)+".qdt"; + tfilename = getBaseFilename(ifilename)+".txt"; } + std::cerr << "Reading " << ifilename << std::endl; std::ifstream ifs(ifilename.c_str(), std::ios::in); if (!ifs) { std::cerr << "Cannot open the input file.\n"; @@ -183,8 +185,10 @@ int main(int argc, char **argv) { } } + std::cerr << "Saving " << ofilename << std::endl; qBits->SaveToFile(ofilename.c_str()); - qBits->SaveAsText("test.txt"); + std::cerr << "Saving " << tfilename << std::endl; + qBits->SaveAsText(tfilename.c_str()); delete qBits; delete qCCntl; @@ -194,9 +198,7 @@ int main(int argc, char **argv) { delete qCalcUnits; ifs.close(); - if (isSet(parameters_ready, opt_verbose)) { - std::cerr << "done." << std::endl; - } + std::cerr << "done." << std::endl; } return 0;