Merge remote-tracking branch 'origin/master' into slint-cnes 12/18012/1
Antoine ELIAS [Wed, 30 Mar 2016 14:36:03 +0000 (16:36 +0200)]
Change-Id: I66a4e1db9afa501d674a177635c2d6f838e7baff

39 files changed:
1  2 
scilab/modules/ast/src/cpp/parse/flex/scanscilab.ll
scilab/modules/core/includes/version.h.in
scilab/modules/core/includes/version.h.vc
scilab/modules/helptools/etc/MAIN_CHAPTERS
scilab/modules/slint/Makefile.am
scilab/modules/slint/Makefile.in
scilab/modules/slint/includes/FileException.hxx
scilab/modules/slint/includes/checkers/AllCheckers.hxx
scilab/modules/slint/includes/checkers/BreaksInLoopChecker.hxx
scilab/modules/slint/includes/checkers/DecimalChecker.hxx
scilab/modules/slint/includes/checkers/ExpInCondChecker.hxx
scilab/modules/slint/includes/checkers/LineLengthChecker.hxx
scilab/modules/slint/includes/checkers/SLintChecker.hxx
scilab/modules/slint/includes/checkers/SemicolonAtEOLChecker.hxx
scilab/modules/slint/includes/checkers/VariablesChecker.hxx
scilab/modules/slint/includes/config/XMLConfig.hxx
scilab/modules/slint/includes/output/SLintResult.hxx
scilab/modules/slint/includes/output/SLintScilabResult.hxx
scilab/modules/slint/includes/output/SLintXmlResult.hxx
scilab/modules/slint/sci_gateway/cpp/sci_slint.cpp
scilab/modules/slint/slint.iss
scilab/modules/slint/src/cpp/BracketedExpChecker.cpp
scilab/modules/slint/src/cpp/BreaksInLoopChecker.cpp
scilab/modules/slint/src/cpp/DecimalChecker.cpp
scilab/modules/slint/src/cpp/ExpInCondChecker.cpp
scilab/modules/slint/src/cpp/FileException.cpp
scilab/modules/slint/src/cpp/FunctionTestReturnChecker.cpp
scilab/modules/slint/src/cpp/ImplicitListChecker.cpp
scilab/modules/slint/src/cpp/LineLengthChecker.cpp
scilab/modules/slint/src/cpp/LoadSaveChecker.cpp
scilab/modules/slint/src/cpp/NestedBlocksChecker.cpp
scilab/modules/slint/src/cpp/SLint.cpp
scilab/modules/slint/src/cpp/SLintChecker.cpp
scilab/modules/slint/src/cpp/SLintScilabResult.cpp
scilab/modules/slint/src/cpp/SLintVisitor.cpp
scilab/modules/slint/src/cpp/SLintXmlResult.cpp
scilab/modules/slint/src/cpp/SciFile.cpp
scilab/modules/slint/src/cpp/VariablesChecker.cpp
scilab/modules/slint/src/cpp/XMLConfig.cpp

Simple merge
Simple merge
@@@ -44,7 -44,7 +47,7 @@@ types::Function::ReturnValue sci_slint(
  {
      slint::SLintResult * results = nullptr;
      bool printResults = false;
--    const unsigned size = in.size();
++    const int size = (int)in.size();
      types::String * conf = nullptr;
      types::String * outFile = nullptr;
  
@@@ -56,7 -56,7 +59,7 @@@
  
      if (!in[0]->isString())
      {
--        Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), "slint" , 1);
++        Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), "slint", 1);
          return types::Function::Error;
      }
  
              {
                  if (in[1]->getAs<types::Bool>()->getSize() == 1)
                  {
--                    printResults = in[1]->getAs<types::Bool>()->get(0);
++                    printResults = in[1]->getAs<types::Bool>()->get(0) == 0 ? false : true;
                  }
                  else
                  {
--                    Scierror(999, _("%s: Wrong type for input argument #%d: A single boolean expected.\n"), "slint" , 2);
++                    Scierror(999, _("%s: Wrong type for input argument #%d: A single boolean expected.\n"), "slint", 2);
                      return types::Function::Error;
                  }
              }
@@@ -87,7 -87,7 +90,7 @@@
              }
              else
              {
--                Scierror(999, _("%s: Wrong type for input argument #%d: A string or a boolean expected.\n"), "slint" , 2);
++                Scierror(999, _("%s: Wrong type for input argument #%d: A string or a boolean expected.\n"), "slint", 2);
                  return types::Function::Error;
              }
              break;
              {
                  if (in[2]->getAs<types::Bool>()->getSize() == 1)
                  {
--                    printResults = in[2]->getAs<types::Bool>()->get(0);
++                    printResults = in[2]->getAs<types::Bool>()->get(0) == 0 ? false : true;
                  }
                  else
                  {
--                    Scierror(999, _("%s: Wrong type for input argument #%d: A single boolean expected.\n"), "slint" , 3);
++                    Scierror(999, _("%s: Wrong type for input argument #%d: A single boolean expected.\n"), "slint", 3);
                      return types::Function::Error;
                  }
              }
              }
              else
              {
--                Scierror(999, _("%s: Wrong type for input argument #%d: A string or a boolean expected.\n"), "slint" , 3);
++                Scierror(999, _("%s: Wrong type for input argument #%d: A string or a boolean expected.\n"), "slint", 3);
                  return types::Function::Error;
              }
  
              if (!in[1]->isString())
              {
--                Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), "slint" , 3);
++                Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), "slint", 3);
                  return types::Function::Error;
              }
              conf = in[1]->getAs<types::String>();
  
          if (outFile)
          {
 -            results = new slint::SLintXmlResult(outFile->get(0));
 +            if (conf && conf->getSize() >= 2 && (std::wstring(conf->get(0)) == L"cnes"))
 +            {
-               const slint::CNES::ToolConfiguration tc = slint::CNES::ToolConfiguration::createFromXml(conf->get(1));
-               const std::wstring out(outFile->get(0));
-               const std::size_t pos = out.find_last_of(L'.');
-               if (pos != std::string::npos && out.substr(pos) == L".csv")
-               {
-                   results = new slint::CNES::CNESCsvResult(tc, conf, options.getId(), outFile->get(0));
-               }
-               else
-               {
-                   results = new slint::CNES::CNESXmlResult(tc, conf, options.getId(), outFile->get(0));
-               }
++                const slint::CNES::ToolConfiguration tc = slint::CNES::ToolConfiguration::createFromXml(conf->get(1));
++                const std::wstring out(outFile->get(0));
++                const std::size_t pos = out.find_last_of(L'.');
++                if (pos != std::string::npos && out.substr(pos) == L".csv")
++                {
++                    results = new slint::CNES::CNESCsvResult(tc, conf, options.getId(), outFile->get(0));
++                }
++                else
++                {
++                    results = new slint::CNES::CNESXmlResult(tc, conf, options.getId(), outFile->get(0));
++                }
 +            }
 +            else
 +            {
 +                results = new slint::SLintXmlResult(outFile->get(0));
 +            }
          }
          else
          {
Simple merge