From: Juan Prieto Date: Tue, 8 Feb 2011 15:54:54 +0000 (+0000) Subject: compilation of paser osirix under linux(ubuntu) ok X-Git-Tag: Creatools2-0-3.creaContour1-2-3.17Feb2011~4 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=fc546c3fa6dc579e173688cb0d5460af7dd668bb;p=creaContours.git compilation of paser osirix under linux(ubuntu) ok --- 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;