diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-09 12:47:14 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-09 12:47:14 -0200 |
commit | a716ae1f50764aa8f785b0fd85a7f533e53756e0 (patch) | |
tree | 598a4fc6a53db41ebe3c00656b2048c7ec868106 | |
parent | ea382b0be136a9abc80281d6950afddc4f25edb9 (diff) | |
download | lua-a716ae1f50764aa8f785b0fd85a7f533e53756e0.tar.gz lua-a716ae1f50764aa8f785b0fd85a7f533e53756e0.tar.bz2 lua-a716ae1f50764aa8f785b0fd85a7f533e53756e0.zip |
avoids including 'stdio.h' everywhere (because of definitions for
luai_writestring/luai_writeline)
-rw-r--r-- | luaconf.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.164 2011/10/07 19:53:05 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.165 2011/11/05 15:29:05 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -210,10 +210,14 @@ | |||
210 | 210 | ||
211 | /* | 211 | /* |
212 | @@ luai_writestring/luai_writeline define how 'print' prints its results. | 212 | @@ luai_writestring/luai_writeline define how 'print' prints its results. |
213 | ** They are only used in libraries and the stand-alone program. (The #if | ||
214 | ** avoids including 'stdio.h' everywhere.) | ||
213 | */ | 215 | */ |
216 | #if defined(LUA_LIB) || defined(lua_c) || defined(luaall_c) | ||
214 | #include <stdio.h> | 217 | #include <stdio.h> |
215 | #define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) | 218 | #define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) |
216 | #define luai_writeline() (luai_writestring("\n", 1), fflush(stdout)) | 219 | #define luai_writeline() (luai_writestring("\n", 1), fflush(stdout)) |
220 | #endif | ||
217 | 221 | ||
218 | /* | 222 | /* |
219 | @@ luai_writestringerror defines how to print error messages. | 223 | @@ luai_writestringerror defines how to print error messages. |