MCPcopy Create free account
hub / github.com/TASEmulators/fceux / print

Function print

src/lua-engine.cpp:1883–1902  ·  view source on GitHub ↗

replacement for luaB_print() that goes to the appropriate textbox instead of stdout

Source from the content-addressed store, hash-verified

1881
1882// replacement for luaB_print() that goes to the appropriate textbox instead of stdout
1883static int print(lua_State *L)
1884{
1885 if (info_print) {
1886 const char* str = toCString(L);
1887
1888 int uid = info_uid;//luaStateToUIDMap[L->l_G->mainthread];
1889 //LuaContextInfo& info = GetCurrentInfo();
1890
1891 info_print(uid, str);
1892 }
1893 else {
1894 char* str = rawToCString(L);
1895 str[strlen(str)-2] = 0; // *NIX need no extra \r\n BS
1896
1897 puts(str);
1898 }
1899
1900 //worry(L, 100);
1901 return 0;
1902}
1903
1904// gethash()
1905//

Callers

nothing calls this directly

Calls 2

toCStringFunction · 0.85
rawToCStringFunction · 0.85

Tested by

no test coverage detected