diff options
Diffstat (limited to '')
| -rw-r--r-- | lauxlib.h | 27 |
1 files changed, 26 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.h,v 1.126 2014/10/01 11:54:56 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.127 2014/10/25 11:50:46 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -205,6 +205,31 @@ LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname, | |||
| 205 | 205 | ||
| 206 | 206 | ||
| 207 | /* | 207 | /* |
| 208 | ** {================================================================== | ||
| 209 | ** "Abstraction Layer" for basic report of messages and errors | ||
| 210 | ** =================================================================== | ||
| 211 | */ | ||
| 212 | |||
| 213 | /* print a string */ | ||
| 214 | #if !defined(lua_writestring) | ||
| 215 | #define lua_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) | ||
| 216 | #endif | ||
| 217 | |||
| 218 | /* print a newline and flush the output */ | ||
| 219 | #if !defined(lua_writeline) | ||
| 220 | #define lua_writeline() (lua_writestring("\n", 1), fflush(stdout)) | ||
| 221 | #endif | ||
| 222 | |||
| 223 | /* print an error message */ | ||
| 224 | #if !defined(lua_writestringerror) | ||
| 225 | #define lua_writestringerror(s,p) \ | ||
| 226 | (fprintf(stderr, (s), (p)), fflush(stderr)) | ||
| 227 | #endif | ||
| 228 | |||
| 229 | /* }================================================================== */ | ||
| 230 | |||
| 231 | |||
| 232 | /* | ||
| 208 | ** {============================================================ | 233 | ** {============================================================ |
| 209 | ** Compatibility with deprecated conversions | 234 | ** Compatibility with deprecated conversions |
| 210 | ** ============================================================= | 235 | ** ============================================================= |
