aboutsummaryrefslogtreecommitdiff
path: root/po
Commit message (Expand)AuthorAge
* Add Lithuanian translation.Ilya Zhuravlev2013-12-11
* Run updatepo.shPilzAdam2013-11-23
* Translated using Weblate (Spanish)Pablo Lezaeta2013-11-23
* Translated using Weblate (Russian)Anton Tsyganenko2013-11-23
* Translated using Weblate (Polish)Maciej Kasatkin2013-11-23
* Translated using Weblate (Czech)Jakub Vaněk2013-11-23
* Translated using Weblate (Romanian)King Artur2013-11-23
* Translated using Weblate (Czech)Jakub Vaněk2013-11-23
* Translated using Weblate (Czech)Frantisek Simorda2013-11-23
* Translated using Weblate (Spanish)Pablo Lezaeta2013-11-23
* Translated using Weblate (Czech)Heisenberg CZE2013-11-23
* Translated using Weblate (Spanish)Pablo Lezaeta2013-11-23
* Translated using Weblate (Czech)Petr Hála2013-11-23
* Translated using Weblate (Czech)Heisenberg CZE2013-11-23
* Translated using Weblate (Czech)Heisenberg CZE2013-11-23
* Translated using Weblate (Czech)Petr Hála2013-11-23
* Translated using Weblate (Spanish)William Strealy2013-10-08
* Translated using Weblate (Portuguese (Brazil))Frederico Guimarães2013-10-08
* Translated using Weblate (Dutch)Rutger NL2013-10-08
* Translated using Weblate (Portuguese (Brazil))Frederico Guimarães2013-10-08
* Translated using Weblate (Chinese (China))Shen Zheyu2013-10-08
* Translated using Weblate (Dutch)Rutger NL2013-10-08
* Translated using Weblate (French)we prefer instagib metl32013-10-08
* Translated using Weblate (German)Pilz Adam2013-10-08
* Add Czech languageKahrl2013-10-08
* Run updatepo.shIlya Zhuravlev2013-09-08
* Translated using Weblate (Portuguese)Leonardo Costa2013-09-07
* Translated using Weblate (German)Block Men2013-09-07
* Translated using Weblate (Chinese (China))Shen Zheyu2013-09-07
* Translated using Weblate (Spanish)Diego Martínez2013-08-30
* Translated using Weblate (Russian)Ilya Zhuravlev2013-08-30
* Translated using Weblate (Russian)Anton Tsyganenko2013-08-30
* Translated using Weblate (Russian)Ilya Zhuravlev2013-08-30
* Translated using Weblate (Russian)Anton Tsyganenko2013-08-30
* Translated using Weblate (Russian)Anton Tsyganenko2013-08-30
* Translated using Weblate (Russian)Anton Tsyganenko2013-08-30
* Translated using Weblate (Russian)Anton Tsyganenko2013-08-30
* Translated using Weblate (German)Pilz Adam2013-08-30
* Remove "po/du". "du" is invalid language code (fixes #881).Ilya Zhuravlev2013-08-26
* Run util/updatepo.shPilzAdam2013-08-25
* Fix *.po errors caused by rebase.Ilya Zhuravlev2013-08-25
* Translated using Weblate (Ukrainian)Vladimir a2013-08-25
* Translated using Weblate (Russian)Anton Tsyganenko2013-08-25
* Translated using Weblate (Norwegian Bokmål)sfan52013-08-25
* Translated using Weblate (Estonian)sfan52013-08-25
* Translated using Weblate (Dutch)Sasikaa Lacikaa2013-08-25
* Translated using Weblate (Hungarian)Sasikaa Lacikaa2013-08-25
* Translated using Weblate (Dutch)sfan52013-08-25
* Translated using Weblate (Russian)Vladimir a2013-08-25
* Translated using Weblate (French)Nicola Spanti2013-08-25
#define strtok_r(x, y, z) mystrtok_r(x, y, z) #endif #define PADDING(x, y) ((ALIGNOF(y) - ((uintptr_t)(x) & (ALIGNOF(y) - 1))) & (ALIGNOF(y) - 1)) namespace porting { /* Signal handler (grabs Ctrl-C on POSIX systems) */ void signal_handler_init(void); // Returns a pointer to a bool. // When the bool is true, program should quit. bool * signal_handler_killstatus(void); /* Path of static data directory. */ extern std::string path_share; /* Directory for storing user data. Examples: Windows: "C:\Documents and Settings\user\Application Data\<PROJECT_NAME>" Linux: "~/.<PROJECT_NAME>" Mac: "~/Library/Application Support/<PROJECT_NAME>" */ extern std::string path_user; /* Get full path of stuff in data directory. Example: "stone.png" -> "../data/stone.png" */ std::string getDataPath(const char *subpath); /* Initialize path_share and path_user. */ void initializePaths(); /* Get number of online processors in the system. */ int getNumberOfProcessors(); /* Set a thread's affinity to a particular processor. */ bool threadBindToProcessor(threadid_t tid, int pnumber); /* Set a thread's priority. */ bool threadSetPriority(threadid_t tid, int prio); /* Resolution is 10-20ms. Remember to check for overflows. Overflow can occur at any value higher than 10000000. */ #ifdef _WIN32 // Windows #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include <windows.h> inline u32 getTimeS() { return GetTickCount() / 1000; } inline u32 getTimeMs() { return GetTickCount(); } inline u32 getTimeUs() { LARGE_INTEGER freq, t; QueryPerformanceFrequency(&freq); QueryPerformanceCounter(&t); return (double)(t.QuadPart) / ((double)(freq.QuadPart) / 1000000.0); } inline u32 getTimeNs() { LARGE_INTEGER freq, t; QueryPerformanceFrequency(&freq); QueryPerformanceCounter(&t); return (double)(t.QuadPart) / ((double)(freq.QuadPart) / 1000000000.0); } #else // Posix #include <sys/time.h> #include <time.h> inline u32 getTimeS() { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec; } inline u32 getTimeMs() { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec * 1000 + tv.tv_usec / 1000; } inline u32 getTimeUs() { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec * 1000000 + tv.tv_usec; } inline u32 getTimeNs() { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); return ts.tv_sec * 1000000000 + ts.tv_nsec; } /*#include <sys/timeb.h> inline u32 getTimeMs() { struct timeb tb; ftime(&tb); return tb.time * 1000 + tb.millitm; }*/ #endif inline u32 getTime(TimePrecision prec) { switch (prec) { case PRECISION_SECONDS: return getTimeS(); case PRECISION_MILLI: return getTimeMs(); case PRECISION_MICRO: return getTimeUs(); case PRECISION_NANO: return getTimeNs(); } return 0; } } // namespace porting #endif // PORTING_HEADER