diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-05-26 13:09:40 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-05-26 13:09:40 -0300 |
commit | ee7d0c26493e1303a06f45b28ee2822c5a6aff05 (patch) | |
tree | 86781476f7f308055fc6340440fad855d2ae8601 /luaconf.h | |
parent | aa13c591f59f55ea31c14fcc554f8fc96dff67c2 (diff) | |
download | lua-ee7d0c26493e1303a06f45b28ee2822c5a6aff05.tar.gz lua-ee7d0c26493e1303a06f45b28ee2822c5a6aff05.tar.bz2 lua-ee7d0c26493e1303a06f45b28ee2822c5a6aff05.zip |
new macro 'luai_writeline' to print newlines (and flush 'stdout')
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.156 2011/04/20 18:25:54 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.157 2011/04/29 13:56:28 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 | */ |
@@ -209,10 +209,11 @@ | |||
209 | 209 | ||
210 | 210 | ||
211 | /* | 211 | /* |
212 | @@ luai_writestring defines how 'print' prints its results. | 212 | @@ luai_writestring/luai_writeline define how 'print' prints its results. |
213 | */ | 213 | */ |
214 | #include <stdio.h> | 214 | #include <stdio.h> |
215 | #define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) | 215 | #define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) |
216 | #define luai_writeline() (luai_writestring("\n", 1), fflush(stdout)) | ||
216 | 217 | ||
217 | /* | 218 | /* |
218 | @@ luai_writestringerror defines how to print error messages. | 219 | @@ luai_writestringerror defines how to print error messages. |