aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-11-24 16:05:12 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-11-24 16:05:12 -0200
commit2b25489b47ad94e6f970f5d9150937734322f24c (patch)
tree978edcbea287345651e2b80540d5d27a1ecec5d7 /lua.c
parenta6f465f55802989c1656d1a3b030c315c8ef2690 (diff)
downloadlua-2b25489b47ad94e6f970f5d9150937734322f24c.tar.gz
lua-2b25489b47ad94e6f970f5d9150937734322f24c.tar.bz2
lua-2b25489b47ad94e6f970f5d9150937734322f24c.zip
'notail' -> 'noextrachars' ('notail' may confuse with tail calls)
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lua.c b/lua.c
index f52ded8e..e1084f3b 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.174 2009/07/15 17:35:20 roberto Exp roberto $ 2** $Id: lua.c,v 1.175 2009/08/10 16:23:19 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*/
@@ -265,7 +265,7 @@ static int handle_script (lua_State *L, char **argv, int n) {
265 265
266 266
267/* check that argument has no extra characters at the end */ 267/* check that argument has no extra characters at the end */
268#define notail(x) {if ((x)[2] != '\0') return -1;} 268#define noextrachars(x) {if ((x)[2] != '\0') return -1;}
269 269
270 270
271static int collectargs (char **argv, int *pi, int *pv, int *pe) { 271static int collectargs (char **argv, int *pi, int *pv, int *pe) {
@@ -275,15 +275,15 @@ static int collectargs (char **argv, int *pi, int *pv, int *pe) {
275 return i; 275 return i;
276 switch (argv[i][1]) { /* option */ 276 switch (argv[i][1]) { /* option */
277 case '-': 277 case '-':
278 notail(argv[i]); 278 noextrachars(argv[i]);
279 return (argv[i+1] != NULL ? i+1 : 0); 279 return (argv[i+1] != NULL ? i+1 : 0);
280 case '\0': 280 case '\0':
281 return i; 281 return i;
282 case 'i': 282 case 'i':
283 notail(argv[i]); 283 noextrachars(argv[i]);
284 *pi = 1; /* go through */ 284 *pi = 1; /* go through */
285 case 'v': 285 case 'v':
286 notail(argv[i]); 286 noextrachars(argv[i]);
287 *pv = 1; 287 *pv = 1;
288 break; 288 break;
289 case 'e': 289 case 'e':