X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fmain.cpp;h=48b304dbf69dd85fa4a47e4cbed04c7654c73acd;hb=8fd3f544c128128a569c551e9ca8e9945ff3c65c;hp=54fcbdc3ae644417f2cf974aa521666fd5867ee9;hpb=7bf36f6cec41494071f07699184d8230ccd8cb41;p=anna.git diff --git a/example/diameter/launcher/main.cpp b/example/diameter/launcher/main.cpp index 54fcbdc..48b304d 100644 --- a/example/diameter/launcher/main.cpp +++ b/example/diameter/launcher/main.cpp @@ -358,7 +358,7 @@ public: bool Launcher::getDataBlockFromHexFile(const std::string &pathfile, anna::DataBlock &db) const throw() { // Get hex string - static char buffer[2048]; + static char buffer[8192]; std::ifstream infile(pathfile.c_str(), std::ifstream::in); if(infile.is_open()) { infile >> buffer; @@ -1505,6 +1505,16 @@ throw(anna::RuntimeException) { codecEngine->setDictionary(d); LOGDEBUG(anna::Logger::debug(codecEngine->asString(), ANNA_FILE_LOCATION)); + + if (lst.size() > 1) { + std::string all_in_one = "./dictionary-all-in-one.xml"; + std::ofstream out(all_in_one, std::ifstream::out); + std::string buffer = d->asXMLString(); + out.write(buffer.c_str(), buffer.size()); + out.close(); + std::cout << "Written '" << all_in_one << "' (provide it next time to be more comfortable)." << std::endl; + } + } catch (anna::RuntimeException &ex) { ex.trace(); }