mirror of
https://github.com/lua/lua.git
synced 2025-01-28 06:03:00 +08:00
spaces -> tabs in #defines
This commit is contained in:
parent
8e7149f496
commit
054c20cd5b
17
loslib.c
17
loslib.c
@ -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
|
** Standard Operating System library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -26,11 +26,12 @@
|
|||||||
#if !defined(LUA_STRFTIMEOPTIONS)
|
#if !defined(LUA_STRFTIMEOPTIONS)
|
||||||
|
|
||||||
#if !defined(LUA_USE_POSIX)
|
#if !defined(LUA_USE_POSIX)
|
||||||
#define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" }
|
#define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" }
|
||||||
#else
|
#else
|
||||||
#define LUA_STRFTIMEOPTIONS { "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "", \
|
#define LUA_STRFTIMEOPTIONS \
|
||||||
"E", "cCxXyY", \
|
{ "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "" \
|
||||||
"O", "deHImMSuUVwWy" }
|
"", "E", "cCxXyY", \
|
||||||
|
"O", "deHImMSuUVwWy" }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -43,7 +44,7 @@
|
|||||||
*/
|
*/
|
||||||
#if defined(LUA_USE_MKSTEMP)
|
#if defined(LUA_USE_MKSTEMP)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#define LUA_TMPNAMBUFSIZE 32
|
#define LUA_TMPNAMBUFSIZE 32
|
||||||
#define lua_tmpnam(b,e) { \
|
#define lua_tmpnam(b,e) { \
|
||||||
strcpy(b, "/tmp/lua_XXXXXX"); \
|
strcpy(b, "/tmp/lua_XXXXXX"); \
|
||||||
e = mkstemp(b); \
|
e = mkstemp(b); \
|
||||||
@ -52,8 +53,8 @@
|
|||||||
|
|
||||||
#elif !defined(lua_tmpnam)
|
#elif !defined(lua_tmpnam)
|
||||||
|
|
||||||
#define LUA_TMPNAMBUFSIZE L_tmpnam
|
#define LUA_TMPNAMBUFSIZE L_tmpnam
|
||||||
#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); }
|
#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
4
lstate.c
4
lstate.c
@ -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
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -39,7 +39,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define MEMERRMSG "not enough memory"
|
#define MEMERRMSG "not enough memory"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
16
lstrlib.c
16
lstrlib.c
@ -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
|
** Standard library for string operations and pattern-matching
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* macro to `unsign' a character */
|
/* 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_INTFRMLEN) /* { */
|
||||||
#if defined(LUA_USE_LONGLONG)
|
#if defined(LUA_USE_LONGLONG)
|
||||||
|
|
||||||
#define LUA_INTFRMLEN "ll"
|
#define LUA_INTFRMLEN "ll"
|
||||||
#define LUA_INTFRM_T long long
|
#define LUA_INTFRM_T long long
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define LUA_INTFRMLEN "l"
|
#define LUA_INTFRMLEN "l"
|
||||||
#define LUA_INTFRM_T long
|
#define LUA_INTFRM_T long
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif /* } */
|
#endif /* } */
|
||||||
@ -766,8 +766,8 @@ static int str_gsub (lua_State *L) {
|
|||||||
*/
|
*/
|
||||||
#if !defined(LUA_FLTFRMLEN)
|
#if !defined(LUA_FLTFRMLEN)
|
||||||
|
|
||||||
#define LUA_FLTFRMLEN ""
|
#define LUA_FLTFRMLEN ""
|
||||||
#define LUA_FLTFRM_T double
|
#define LUA_FLTFRM_T double
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
6
ltable.c
6
ltable.c
@ -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)
|
** Lua tables (hash)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -48,10 +48,10 @@
|
|||||||
#define MAXASIZE (1 << MAXBITS)
|
#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 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
18
lua.c
@ -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
|
** Lua stand-alone interpreter
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -45,13 +45,13 @@
|
|||||||
*/
|
*/
|
||||||
#if defined(LUA_USE_ISATTY)
|
#if defined(LUA_USE_ISATTY)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#define lua_stdin_is_tty() isatty(0)
|
#define lua_stdin_is_tty() isatty(0)
|
||||||
#elif defined(LUA_WIN)
|
#elif defined(LUA_WIN)
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define lua_stdin_is_tty() _isatty(_fileno(stdin))
|
#define lua_stdin_is_tty() _isatty(_fileno(stdin))
|
||||||
#else
|
#else
|
||||||
#define lua_stdin_is_tty() 1 /* assume stdin is a tty */
|
#define lua_stdin_is_tty() 1 /* assume stdin is a tty */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -66,19 +66,19 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
#include <readline/history.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) \
|
#define lua_saveline(L,idx) \
|
||||||
if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \
|
if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \
|
||||||
add_history(lua_tostring(L, idx)); /* add it to history */
|
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)
|
#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 */ \
|
((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \
|
||||||
fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */
|
fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */
|
||||||
#define lua_saveline(L,idx) { (void)L; (void)idx; }
|
#define lua_saveline(L,idx) { (void)L; (void)idx; }
|
||||||
#define lua_freeline(L,b) { (void)L; (void)b; }
|
#define lua_freeline(L,b) { (void)L; (void)b; }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user