From fc546c3fa6dc579e173688cb0d5460af7dd668bb Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Tue, 8 Feb 2011 15:54:54 +0000 Subject: [PATCH] compilation of paser osirix under linux(ubuntu) ok --- .../ParserOsirix/OsirixParser.cxx | 16 ++++++++++++++++ .../ParserOsirix/OsirixParser.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx index 4c36214..b913b5b 100644 --- a/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx +++ b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx @@ -470,12 +470,20 @@ void OsirixParserErrorHandler::error (const SAXParseException &exc){ char c[1000]; errormsg = "Column "; // errormsg += itoa(exc.getColumnNumber(),c,10); +#ifdef WIN32 sprintf_s(c,"%d",(int)(exc.getColumnNumber())); +#else + sprintf(c,"%d",(int)(exc.getColumnNumber())); +#endif errormsg += std::string(c); errormsg += " Line "; // errormsg += itoa(exc.getLineNumber(),c,10); +#ifdef WIN32 sprintf_s(c,"%d",(int)(exc.getLineNumber())); +#else + sprintf(c,"%d",(int)(exc.getLineNumber())); +#endif errormsg += std::string(c); errormsg += " "; @@ -487,12 +495,20 @@ void OsirixParserErrorHandler::fatalError (const SAXParseException &exc){ char c[1000]; errormsg = "Column "; // errormsg += itoa(exc.getColumnNumber(),c,10); +#ifdef WIN32 sprintf_s(c,"%d",(int)(exc.getColumnNumber())); +#else + sprintf(c,"%d",(int)(exc.getColumnNumber())); +#endif errormsg += std::string(c); errormsg += " Line "; // errormsg += itoa(exc.getLineNumber(),c,10); +#ifdef WIN32 sprintf_s(c,"%d",(int)(exc.getLineNumber())); +#else + sprintf(c,"%d",(int)(exc.getLineNumber())); +#endif errormsg += std::string(c); errormsg += " "; diff --git a/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.h b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.h index 61aecea..2b19e44 100644 --- a/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.h +++ b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.h @@ -97,7 +97,7 @@ private: double _spacing[3]; int _extent[6]; - typedef vector> vectorXYZ; + typedef vector< vector > vectorXYZ; std::map contoursmapMM; std::map contoursmapPX; -- 2.47.1