diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-05-23 12:37:09 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-05-23 12:37:09 -0300 |
commit | 054c20cd5b1d9491e3989cedcf3da5ebed0719cf (patch) | |
tree | fc71ddc94ada7af256250acc63fee538b3bccf2f | |
parent | 8e7149f496fa175c05c49e7303ff8ba54f3545c9 (diff) | |
download | lua-054c20cd5b1d9491e3989cedcf3da5ebed0719cf.tar.gz lua-054c20cd5b1d9491e3989cedcf3da5ebed0719cf.tar.bz2 lua-054c20cd5b1d9491e3989cedcf3da5ebed0719cf.zip |
spaces -> tabs in #defines
-rw-r--r-- | loslib.c | 17 | ||||
-rw-r--r-- | lstate.c | 4 | ||||
-rw-r--r-- | lstrlib.c | 16 | ||||
-rw-r--r-- | ltable.c | 6 | ||||
-rw-r--r-- | lua.c | 18 |
5 files changed, 31 insertions, 30 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: loslib.c,v 1.37 2011/11/29 17:15:42 roberto Exp roberto $ | 2 | ** $Id: loslib.c,v 1.38 2011/11/30 12:35:05 roberto Exp roberto $ |
3 | ** Standard Operating System library | 3 | ** Standard Operating System library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -26,11 +26,12 @@ | |||
26 | #if !defined(LUA_STRFTIMEOPTIONS) | 26 | #if !defined(LUA_STRFTIMEOPTIONS) |
27 | 27 | ||
28 | #if !defined(LUA_USE_POSIX) | 28 | #if !defined(LUA_USE_POSIX) |
29 | #define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" } | 29 | #define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" } |
30 | #else | 30 | #else |
31 | #define LUA_STRFTIMEOPTIONS { "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "", \ | 31 | #define LUA_STRFTIMEOPTIONS \ |
32 | "E", "cCxXyY", \ | 32 | { "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "" \ |
33 | "O", "deHImMSuUVwWy" } | 33 | "", "E", "cCxXyY", \ |
34 | "O", "deHImMSuUVwWy" } | ||
34 | #endif | 35 | #endif |
35 | 36 | ||
36 | #endif | 37 | #endif |
@@ -43,7 +44,7 @@ | |||
43 | */ | 44 | */ |
44 | #if defined(LUA_USE_MKSTEMP) | 45 | #if defined(LUA_USE_MKSTEMP) |
45 | #include <unistd.h> | 46 | #include <unistd.h> |
46 | #define LUA_TMPNAMBUFSIZE 32 | 47 | #define LUA_TMPNAMBUFSIZE 32 |
47 | #define lua_tmpnam(b,e) { \ | 48 | #define lua_tmpnam(b,e) { \ |
48 | strcpy(b, "/tmp/lua_XXXXXX"); \ | 49 | strcpy(b, "/tmp/lua_XXXXXX"); \ |
49 | e = mkstemp(b); \ | 50 | e = mkstemp(b); \ |
@@ -52,8 +53,8 @@ | |||
52 | 53 | ||
53 | #elif !defined(lua_tmpnam) | 54 | #elif !defined(lua_tmpnam) |
54 | 55 | ||
55 | #define LUA_TMPNAMBUFSIZE L_tmpnam | 56 | #define LUA_TMPNAMBUFSIZE L_tmpnam |
56 | #define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } | 57 | #define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } |
57 | 58 | ||
58 | #endif | 59 | #endif |
59 | 60 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.c,v 2.95 2012/05/22 17:32:25 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.96 2012/05/22 17:50:39 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -39,7 +39,7 @@ | |||
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | 41 | ||
42 | #define MEMERRMSG "not enough memory" | 42 | #define MEMERRMSG "not enough memory" |
43 | 43 | ||
44 | 44 | ||
45 | /* | 45 | /* |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.174 2012/04/03 19:06:19 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.175 2012/04/20 13:16:48 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | 31 | ||
32 | /* macro to `unsign' a character */ | 32 | /* macro to `unsign' a character */ |
33 | #define uchar(c) ((unsigned char)(c)) | 33 | #define uchar(c) ((unsigned char)(c)) |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
@@ -747,13 +747,13 @@ static int str_gsub (lua_State *L) { | |||
747 | #if !defined(LUA_INTFRMLEN) /* { */ | 747 | #if !defined(LUA_INTFRMLEN) /* { */ |
748 | #if defined(LUA_USE_LONGLONG) | 748 | #if defined(LUA_USE_LONGLONG) |
749 | 749 | ||
750 | #define LUA_INTFRMLEN "ll" | 750 | #define LUA_INTFRMLEN "ll" |
751 | #define LUA_INTFRM_T long long | 751 | #define LUA_INTFRM_T long long |
752 | 752 | ||
753 | #else | 753 | #else |
754 | 754 | ||
755 | #define LUA_INTFRMLEN "l" | 755 | #define LUA_INTFRMLEN "l" |
756 | #define LUA_INTFRM_T long | 756 | #define LUA_INTFRM_T long |
757 | 757 | ||
758 | #endif | 758 | #endif |
759 | #endif /* } */ | 759 | #endif /* } */ |
@@ -766,8 +766,8 @@ static int str_gsub (lua_State *L) { | |||
766 | */ | 766 | */ |
767 | #if !defined(LUA_FLTFRMLEN) | 767 | #if !defined(LUA_FLTFRMLEN) |
768 | 768 | ||
769 | #define LUA_FLTFRMLEN "" | 769 | #define LUA_FLTFRMLEN "" |
770 | #define LUA_FLTFRM_T double | 770 | #define LUA_FLTFRM_T double |
771 | 771 | ||
772 | #endif | 772 | #endif |
773 | 773 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.69 2012/01/25 21:05:40 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.70 2012/02/01 21:57:15 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -48,10 +48,10 @@ | |||
48 | #define MAXASIZE (1 << MAXBITS) | 48 | #define MAXASIZE (1 << MAXBITS) |
49 | 49 | ||
50 | 50 | ||
51 | #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) | 51 | #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) |
52 | 52 | ||
53 | #define hashstr(t,str) hashpow2(t, (str)->tsv.hash) | 53 | #define hashstr(t,str) hashpow2(t, (str)->tsv.hash) |
54 | #define hashboolean(t,p) hashpow2(t, p) | 54 | #define hashboolean(t,p) hashpow2(t, p) |
55 | 55 | ||
56 | 56 | ||
57 | /* | 57 | /* |
@@ -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 | ||