+
+#ifdef _WIN32
+void dosToUnixFile(std::string dosFile, std::string unixedFile){
+
+ std::ifstream ifile(dosFile.c_str(),std::ios::binary);
+ ifile.seekg(0,std::ios_base::end);
+ long s=ifile.tellg();
+ char *buffer=new char[s];
+ ifile.seekg(0);
+ ifile.read(buffer,s);
+ ifile.close();
+ std::string txt(buffer,s);
+ delete[] buffer;
+ size_t off=0;
+ while ((off=txt.find("\r\n",off))!=std::string::npos)
+ txt.replace(off,sizeof("\r\n")-1,"\n");
+ std::ofstream ofile(unixedFile.c_str());
+ ofile.write(txt.c_str(),txt.size());
+
+}
+#endif