aboutsummaryrefslogtreecommitdiff
path: root/src/util/string.h
Commit message (Expand)AuthorAge
* Tweak duration_to_string formattingWuzzy2021-03-16
* Drop wide/narrow conversion functionssfan52021-02-02
* Refactor utf8_to_wide/wide_to_utf8 functionssfan52021-02-02
* Sanitize world directory names on create. Keep original name separate (#9432)Hugues Ross2020-07-28
* Add server side translations capability (#9733)EvidenceB Kidscode2020-04-25
* GUIHyperText: Fix bug with UTF8 chars in action name + simplify UTF8 stringw ...Jean-Patrick Guerrero2020-03-07
* Formspec: add hypertext elementPierre-Yves Rollo2019-11-03
* Replace auth.txt with SQLite auth database (#7279)Ben Deutsch2018-08-05
* Formspecs: Allow setting alpha value for the box[] elementThomas--S2018-04-23
* Add clientside translations.Ekdohibs2017-08-24
* Modernize source code: last part (#6285)Loïc Blot2017-08-20
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
* Rework escape/pause menu (#5719)red-0012017-05-11
* Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot2017-04-20
* Fix MSVC build broken by 34d32ceSmallJoker2017-04-17
* Implement delayed server shutdown with cancelation (#4664)Loïc Blot2017-04-15
* Revert "Extend minetest.is_yes()"sfan52017-01-07
* Extend minetest.is_yes()red-0012017-01-07
* Use more unordered_maps to improve performance in c++11 buildsLoic Blot2016-10-06
* Use the standard to_string() functions for C++11 (#4279)Rogier-52016-08-11
* Random misc. warning fixes and cleanupskwolekr2016-06-11
* Add colored text (not only colored chat).Ekdohibs2016-05-31
* Escape more strings: formspecs, item descriptions, infotexts...Ekdohibs2016-04-24
* Remove chat escape sequences from chat messages, for future colored chat.Ekdohibs2016-03-15
* Add minetest.register_lbm() to run code on block load onlyest312016-03-07
* Add server side ncurses terminalest312015-11-06
* Use UTF-8 instead of narrowest312015-07-08
* More correct wrap_rows implementationfigec2015-06-20
* Fix wrap_rows at inner byte of multibyte sequencefigec2015-06-18
* Make wrap_rows not wrap inside utf-8 multibyte sequencesest312015-06-17
* Add utf-8 conversion utilities and re-add intlGUIEditBoxest312015-06-13
* Split ObjDef/ObjDefManager out to objdef.cppkwolekr2015-05-18
* Make early protocol auth mechanism generic, and add SRPest312015-05-11
* Fix fast leaves with texture_clean_transparent enabled.Aaron Suen2015-04-26
* Refactor around translatePasswordest312015-04-17
* Fix Android text bug (no text displaying)Craig Robbins2015-03-07
* Reduce gettext wide/narrow and string/char* conversionsShadowNinja2015-02-05
* Make minor style change(unescape_string())Craig Robbins2015-01-16
* Fix unescape_string removing all backslashesShadowNinja2015-01-15
* Deduplicate code and use stdlib in string functionsShadowNinja2015-01-03
* Fixes for Android build errors. Enable sensor landscape rotation.KodexKy2014-11-25
* Cleanup and (mostly) document util/string.h and (very) minor refactoringCraig Robbins2014-11-02
* Fix bug introduced by me (Zeno)Craig Robbins2014-10-29
* Added names colours and refactored parseColorString()Craig Robbins2014-10-29
* Add [colorize modifierBlockMen2014-10-05
* Standardize tooltip row detectionBlockMen2014-09-28
* Use const references for Settings methodsShadowNinja2014-09-21
* Fix msvc2012 buildsapier2014-06-29
* Add formspec api versioningsapier2014-06-29
an> NULL) return 0; NodeTimer t = env->getMap().getNodeTimer(o->m_p); lua_pushboolean(L,(t.timeout != 0)); return 1; } int NodeTimerRef::l_get_timeout(lua_State *L) { NodeTimerRef *o = checkobject(L, 1); ServerEnvironment *env = o->m_env; if(env == NULL) return 0; NodeTimer t = env->getMap().getNodeTimer(o->m_p); lua_pushnumber(L,t.timeout); return 1; } int NodeTimerRef::l_get_elapsed(lua_State *L) { NodeTimerRef *o = checkobject(L, 1); ServerEnvironment *env = o->m_env; if(env == NULL) return 0; NodeTimer t = env->getMap().getNodeTimer(o->m_p); lua_pushnumber(L,t.elapsed); return 1; } NodeTimerRef::NodeTimerRef(v3s16 p, ServerEnvironment *env): m_p(p), m_env(env) { } NodeTimerRef::~NodeTimerRef() { } // Creates an NodeTimerRef and leaves it on top of stack // Not callable from Lua; all references are created on the C side. void NodeTimerRef::create(lua_State *L, v3s16 p, ServerEnvironment *env) { NodeTimerRef *o = new NodeTimerRef(p, env); *(void **)(lua_newuserdata(L, sizeof(void *))) = o; luaL_getmetatable(L, className); lua_setmetatable(L, -2); } void NodeTimerRef::set_null(lua_State *L) { NodeTimerRef *o = checkobject(L, -1); o->m_env = NULL; } void NodeTimerRef::Register(lua_State *L) { lua_newtable(L); int methodtable = lua_gettop(L); luaL_newmetatable(L, className); int metatable = lua_gettop(L); lua_pushliteral(L, "__metatable"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); // hide metatable from Lua getmetatable() lua_pushliteral(L, "__index"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); lua_pushliteral(L, "__gc"); lua_pushcfunction(L, gc_object); lua_settable(L, metatable); lua_pop(L, 1); // drop metatable luaL_openlib(L, 0, methods, 0); // fill methodtable lua_pop(L, 1); // drop methodtable // Cannot be created from Lua //lua_register(L, className, create_object); } const char NodeTimerRef::className[] = "NodeTimerRef"; const luaL_reg NodeTimerRef::methods[] = { luamethod(NodeTimerRef, start), luamethod(NodeTimerRef, set), luamethod(NodeTimerRef, stop), luamethod(NodeTimerRef, is_started), luamethod(NodeTimerRef, get_timeout), luamethod(NodeTimerRef, get_elapsed), {0,0} };