spaces -> tabs in #defines

This commit is contained in:
Roberto Ierusalimschy 2012-05-23 12:37:09 -03:00
parent 8e7149f496
commit 054c20cd5b
5 changed files with 31 additions and 30 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: loslib.c,v 1.37 2011/11/29 17:15:42 roberto Exp roberto $
** $Id: loslib.c,v 1.38 2011/11/30 12:35:05 roberto Exp roberto $
** Standard Operating System library
** See Copyright Notice in lua.h
*/
@ -26,11 +26,12 @@
#if !defined(LUA_STRFTIMEOPTIONS)
#if !defined(LUA_USE_POSIX)
#define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" }
#define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" }
#else
#define LUA_STRFTIMEOPTIONS { "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "", \
"E", "cCxXyY", \
"O", "deHImMSuUVwWy" }
#define LUA_STRFTIMEOPTIONS \
{ "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "" \
"", "E", "cCxXyY", \
"O", "deHImMSuUVwWy" }
#endif
#endif
@ -43,7 +44,7 @@
*/
#if defined(LUA_USE_MKSTEMP)
#include <unistd.h>
#define LUA_TMPNAMBUFSIZE 32
#define LUA_TMPNAMBUFSIZE 32
#define lua_tmpnam(b,e) { \
strcpy(b, "/tmp/lua_XXXXXX"); \
e = mkstemp(b); \
@ -52,8 +53,8 @@
#elif !defined(lua_tmpnam)
#define LUA_TMPNAMBUFSIZE L_tmpnam
#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); }
#define LUA_TMPNAMBUFSIZE L_tmpnam
#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); }
#endif

View File

@ -1,5 +1,5 @@
/*
** $Id: lstate.c,v 2.95 2012/05/22 17:32:25 roberto Exp roberto $
** $Id: lstate.c,v 2.96 2012/05/22 17:50:39 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@ -39,7 +39,7 @@
#endif
#define MEMERRMSG "not enough memory"
#define MEMERRMSG "not enough memory"
/*

View File

@ -1,5 +1,5 @@
/*
** $Id: lstrlib.c,v 1.174 2012/04/03 19:06:19 roberto Exp roberto $
** $Id: lstrlib.c,v 1.175 2012/04/20 13:16:48 roberto Exp roberto $
** Standard library for string operations and pattern-matching
** See Copyright Notice in lua.h
*/
@ -30,7 +30,7 @@
/* macro to `unsign' a character */
#define uchar(c) ((unsigned char)(c))
#define uchar(c) ((unsigned char)(c))
@ -747,13 +747,13 @@ static int str_gsub (lua_State *L) {
#if !defined(LUA_INTFRMLEN) /* { */
#if defined(LUA_USE_LONGLONG)
#define LUA_INTFRMLEN "ll"
#define LUA_INTFRM_T long long
#define LUA_INTFRMLEN "ll"
#define LUA_INTFRM_T long long
#else
#define LUA_INTFRMLEN "l"
#define LUA_INTFRM_T long
#define LUA_INTFRMLEN "l"
#define LUA_INTFRM_T long
#endif
#endif /* } */
@ -766,8 +766,8 @@ static int str_gsub (lua_State *L) {
*/
#if !defined(LUA_FLTFRMLEN)
#define LUA_FLTFRMLEN ""
#define LUA_FLTFRM_T double
#define LUA_FLTFRMLEN ""
#define LUA_FLTFRM_T double
#endif

View File

@ -1,5 +1,5 @@
/*
** $Id: ltable.c,v 2.69 2012/01/25 21:05:40 roberto Exp roberto $
** $Id: ltable.c,v 2.70 2012/02/01 21:57:15 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@ -48,10 +48,10 @@
#define MAXASIZE (1 << MAXBITS)
#define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t))))
#define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t))))
#define hashstr(t,str) hashpow2(t, (str)->tsv.hash)
#define hashboolean(t,p) hashpow2(t, p)
#define hashboolean(t,p) hashpow2(t, p)
/*

18
lua.c
View File

@ -1,5 +1,5 @@
/*
** $Id: lua.c,v 1.203 2011/12/12 16:34:03 roberto Exp roberto $
** $Id: lua.c,v 1.204 2012/04/20 17:05:17 roberto Exp roberto $
** Lua stand-alone interpreter
** See Copyright Notice in lua.h
*/
@ -45,13 +45,13 @@
*/
#if defined(LUA_USE_ISATTY)
#include <unistd.h>
#define lua_stdin_is_tty() isatty(0)
#define lua_stdin_is_tty() isatty(0)
#elif defined(LUA_WIN)
#include <io.h>
#include <stdio.h>
#define lua_stdin_is_tty() _isatty(_fileno(stdin))
#define lua_stdin_is_tty() _isatty(_fileno(stdin))
#else
#define lua_stdin_is_tty() 1 /* assume stdin is a tty */
#define lua_stdin_is_tty() 1 /* assume stdin is a tty */
#endif
@ -66,19 +66,19 @@
#include <stdio.h>
#include <readline/readline.h>
#include <readline/history.h>
#define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL)
#define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL)
#define lua_saveline(L,idx) \
if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \
add_history(lua_tostring(L, idx)); /* add it to history */
#define lua_freeline(L,b) ((void)L, free(b))
#define lua_freeline(L,b) ((void)L, free(b))
#elif !defined(lua_readline)
#define lua_readline(L,b,p) \
#define lua_readline(L,b,p) \
((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \
fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */
#define lua_saveline(L,idx) { (void)L; (void)idx; }
#define lua_freeline(L,b) { (void)L; (void)b; }
#define lua_saveline(L,idx) { (void)L; (void)idx; }
#define lua_freeline(L,b) { (void)L; (void)b; }
#endif