summaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-05-23 12:37:09 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-05-23 12:37:09 -0300
commit054c20cd5b1d9491e3989cedcf3da5ebed0719cf (patch)
treefc71ddc94ada7af256250acc63fee538b3bccf2f /lua.c
parent8e7149f496fa175c05c49e7303ff8ba54f3545c9 (diff)
downloadlua-054c20cd5b1d9491e3989cedcf3da5ebed0719cf.tar.gz
lua-054c20cd5b1d9491e3989cedcf3da5ebed0719cf.tar.bz2
lua-054c20cd5b1d9491e3989cedcf3da5ebed0719cf.zip
spaces -> tabs in #defines
Diffstat (limited to '')
-rw-r--r--lua.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lua.c b/lua.c
index 7802ebcb..be161858 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.203 2011/12/12 16:34:03 roberto Exp roberto $ 2** $Id: lua.c,v 1.204 2012/04/20 17:05:17 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -45,13 +45,13 @@
45*/ 45*/
46#if defined(LUA_USE_ISATTY) 46#if defined(LUA_USE_ISATTY)
47#include <unistd.h> 47#include <unistd.h>
48#define lua_stdin_is_tty() isatty(0) 48#define lua_stdin_is_tty() isatty(0)
49#elif defined(LUA_WIN) 49#elif defined(LUA_WIN)
50#include <io.h> 50#include <io.h>
51#include <stdio.h> 51#include <stdio.h>
52#define lua_stdin_is_tty() _isatty(_fileno(stdin)) 52#define lua_stdin_is_tty() _isatty(_fileno(stdin))
53#else 53#else
54#define lua_stdin_is_tty() 1 /* assume stdin is a tty */ 54#define lua_stdin_is_tty() 1 /* assume stdin is a tty */
55#endif 55#endif
56 56
57 57
@@ -66,19 +66,19 @@
66#include <stdio.h> 66#include <stdio.h>
67#include <readline/readline.h> 67#include <readline/readline.h>
68#include <readline/history.h> 68#include <readline/history.h>
69#define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL) 69#define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL)
70#define lua_saveline(L,idx) \ 70#define lua_saveline(L,idx) \
71 if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \ 71 if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \
72 add_history(lua_tostring(L, idx)); /* add it to history */ 72 add_history(lua_tostring(L, idx)); /* add it to history */
73#define lua_freeline(L,b) ((void)L, free(b)) 73#define lua_freeline(L,b) ((void)L, free(b))
74 74
75#elif !defined(lua_readline) 75#elif !defined(lua_readline)
76 76
77#define lua_readline(L,b,p) \ 77#define lua_readline(L,b,p) \
78 ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ 78 ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \
79 fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ 79 fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */
80#define lua_saveline(L,idx) { (void)L; (void)idx; } 80#define lua_saveline(L,idx) { (void)L; (void)idx; }
81#define lua_freeline(L,b) { (void)L; (void)b; } 81#define lua_freeline(L,b) { (void)L; (void)b; }
82 82
83#endif 83#endif
84 84