aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-06-21 12:29:08 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-06-21 12:29:08 -0300
commite24ce8c2b322226bbc211e57f301c265a2622c4b (patch)
tree875afb43726cadefdf6b1ea90ed8e8fb10db1a44 /llimits.h
parenta08d82eb132bfd9db5b91e0d5ebcb81d7b26dcd0 (diff)
downloadlua-e24ce8c2b322226bbc211e57f301c265a2622c4b.tar.gz
lua-e24ce8c2b322226bbc211e57f301c265a2622c4b.tar.bz2
lua-e24ce8c2b322226bbc211e57f301c265a2622c4b.zip
lua_writestring & co. moved to llimits.h
They don't need to be visible by clients of Lua.
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/llimits.h b/llimits.h
index 2954d2ef..57e7bed7 100644
--- a/llimits.h
+++ b/llimits.h
@@ -244,4 +244,29 @@ typedef unsigned long l_uint32;
244#endif 244#endif
245 245
246 246
247/*
248** {==================================================================
249** "Abstraction Layer" for basic report of messages and errors
250** ===================================================================
251*/
252
253/* print a string */
254#if !defined(lua_writestring)
255#define lua_writestring(s,l) fwrite((s), sizeof(char), (l), stdout)
247#endif 256#endif
257
258/* print a newline and flush the output */
259#if !defined(lua_writeline)
260#define lua_writeline() (lua_writestring("\n", 1), fflush(stdout))
261#endif
262
263/* print an error message */
264#if !defined(lua_writestringerror)
265#define lua_writestringerror(s,p) \
266 (fprintf(stderr, (s), (p)), fflush(stderr))
267#endif
268
269/* }================================================================== */
270
271#endif
272