diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-24 16:05:12 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-24 16:05:12 -0200 |
commit | 2b25489b47ad94e6f970f5d9150937734322f24c (patch) | |
tree | 978edcbea287345651e2b80540d5d27a1ecec5d7 /lua.c | |
parent | a6f465f55802989c1656d1a3b030c315c8ef2690 (diff) | |
download | lua-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 | ||
271 | static int collectargs (char **argv, int *pi, int *pv, int *pe) { | 271 | static 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': |