aboutsummaryrefslogtreecommitdiff
path: root/src/porting.h
Commit message (Expand)AuthorAge
* Simplify loading of Android version of menuShadowNinja2014-11-20
* Add support for Android 2.3+sapier2014-06-29
* OS X compatibility fixesMartin Doege2014-06-29
* Add support for exiting formspecs by doubleclicking outsidesapier2014-06-12
* Revert "Add daemon support for linux like operating systems"sapier2014-06-01
* Add daemon support for linux like operating systemssapier2014-05-31
* Fix setThreadName support for BSDShadowNinja2014-05-26
* Add support for dpi based HUD scalingsapier2014-04-27
* Fix argument type of the RaiseException() functionFessWolf2014-04-23
* Add support for threadnames on BSD, Windows (MSVC-only), and OSXShadowNinja2014-04-19
* Fix problem with newer MinGW runtimesSfan52014-04-14
* Fix broken win32+bsd buildsapier2014-04-11
* Add support for named threads (atm linux only)sapier2014-04-09
* Define strlcpy on platforms that do not have itkwolekr2014-02-09
* Add capability to read table flag fields from Lua APIkwolekr2014-02-09
* Make flag strings clear specified flag with 'no' prefixkwolekr2014-02-08
* Include system info in the HTTP user agent on WindowsSfan52014-01-23
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
* Add support for IPv6proller2013-06-23
* Add varying levels of precision to TimeTakerkwolekr2013-03-29
* Fix build on Windowskwolekr2013-02-25
* Fix most walled-off caveskwolekr2013-02-25
* Tune queue limits, some other adjustmentskwolekr2013-02-25
* Add multi-Emerge thread supportkwolekr2013-02-25
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Add flag string settings, flat map optionkwolekr2013-02-06
* Fix compile under MingWkwolekr2013-01-23
* Fix compile on certain Linux configurations, reduce spawn point heightkwolekr2013-01-21
* Last set of minor cleanupskwolekr2013-01-21
* Optimize headersPerttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Initial directory structure reworkPerttu Ahola2012-03-10
* Move images to data/textures and fix some path stuff; hope that installation ...Perttu Ahola2011-11-29
* fixed not finding data dir if installedConstantin Wenger2011-08-12
* Ctrl+C handling on POSIX, some commands for server and other tweakingPerttu Ahola2011-02-15
* some fixes to make compiling on some bsd easierPerttu Ahola2011-02-11
* new texture stuff quite workingPerttu Ahola2011-02-11
* Added a more flexible path system (and fixed some minor stuff)Perttu Ahola2011-01-07
* organizing stuff.Perttu Ahola2010-12-21
* framework for modifying texturesPerttu Ahola2010-12-20
* license stuffPerttu Ahola2010-11-29
* Initial filesPerttu Ahola2010-11-27
= false; for(unsigned int i=0; i<chars.size(); i++){ if(chars[i] == tek[p]){ is = true; break; } } if(!is) break; p++; } } bool atend(){ if(p>=tek.size()) return true; return false; } Strfnd(std::string s){ start(s); } }; class WStrfnd{ std::wstring tek; unsigned int p; public: void start(std::wstring niinq){ tek = niinq; p=0; } unsigned int where(){ return p; } void to(unsigned int i){ p = i; } std::wstring what(){ return tek; } std::wstring next(std::wstring plop){ //std::cout<<"tek=\""<<tek<<"\" plop=\""<<plop<<"\""<<std::endl; size_t n; std::wstring palautus; if (p < tek.size()) { //std::cout<<"\tp<tek.size()"<<std::endl; if ((n = tek.find(plop, p)) == std::wstring::npos || plop == L"") { //std::cout<<"\t\tn == string::npos || plop == \"\""<<std::endl; n = tek.size(); } else { //std::cout<<"\t\tn != string::npos"<<std::endl; } palautus = tek.substr(p, n-p); p = n + plop.length(); } //else //std::cout<<"\tp>=tek.size()"<<std::endl; //std::cout<<"palautus=\""<<palautus<<"\""<<std::endl; return palautus; } bool atend(){ if(p>=tek.size()) return true; return false; } WStrfnd(std::wstring s){ start(s); } }; inline std::string trim(const std::string &s) { std::string str = s; while( str.length()>0 && ( str.substr(0, 1)==" " || str.substr(0, 1)=="\t" || str.substr(0, 1)=="\r" || str.substr(0, 1)=="\n" || str.substr(str.length()-1, 1)==" " || str.substr(str.length()-1, 1)=="\t" || str.substr(str.length()-1, 1)=="\r" || str.substr(str.length()-1, 1)=="\n" ) ) { if (str.substr(0, 1)==" ") str = str.substr(1,str.length()-1); else if (str.substr(0, 1)=="\t") str = str.substr(1,str.length()-1); else if (str.substr(0, 1)=="\r") str = str.substr(1,str.length()-1); else if (str.substr(0, 1)=="\n") str = str.substr(1,str.length()-1); else if (str.substr(str.length()-1, 1)==" ") str = str.substr(0,str.length()-1); else if (str.substr(str.length()-1, 1)=="\t") str = str.substr(0,str.length()-1); else if (str.substr(str.length()-1, 1)=="\r") str = str.substr(0,str.length()-1); else if (str.substr(str.length()-1, 1)=="\n") str = str.substr(0,str.length()-1); } return str; } #endif