diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-03-24 09:40:01 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-03-24 09:40:01 -0300 |
| commit | 80bac182db4bba6fc0dcfdb0d4d6abe4183083d1 (patch) | |
| tree | 9feed5fb02e20fa3644ee50580f57bc7d59eef16 | |
| parent | 30a411ab3cb70a1d20ff11e28505550dcd1027f2 (diff) | |
| download | lua-80bac182db4bba6fc0dcfdb0d4d6abe4183083d1.tar.gz lua-80bac182db4bba6fc0dcfdb0d4d6abe4183083d1.tar.bz2 lua-80bac182db4bba6fc0dcfdb0d4d6abe4183083d1.zip | |
do not mix `--help' with `--'
| -rw-r--r-- | lua.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.119 2003/03/17 13:01:48 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.120 2003/03/19 21:15:18 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 | */ |
| @@ -310,6 +310,10 @@ static int handle_argv (char *argv[], int *interactive) { | |||
| 310 | if (argv[i][0] != '-') break; /* not an option? */ | 310 | if (argv[i][0] != '-') break; /* not an option? */ |
| 311 | switch (argv[i][1]) { /* option */ | 311 | switch (argv[i][1]) { /* option */ |
| 312 | case '-': { /* `--' */ | 312 | case '-': { /* `--' */ |
| 313 | if (argv[i][2] != '\0') { | ||
| 314 | print_usage(); | ||
| 315 | return 1; | ||
| 316 | } | ||
| 313 | i++; /* skip this argument */ | 317 | i++; /* skip this argument */ |
| 314 | goto endloop; /* stop handling arguments */ | 318 | goto endloop; /* stop handling arguments */ |
| 315 | } | 319 | } |
