summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli.c
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2007-10-01 12:40:54 +0000
committerJani Taskinen <jani@php.net>2007-10-01 12:40:54 +0000
commit2bc631fb4040b731388fb126c2ca76a06d3989d1 (patch)
treedbfc1e424304b881f3cb6eca8ab7d9d22b75d6b2 /sapi/cli/php_cli.c
parent27e8fa0d31950854c78580264e28008e7f46325d (diff)
downloadphp-git-2bc631fb4040b731388fb126c2ca76a06d3989d1.tar.gz
MFH:- Added common getopt implementation to core.
MFH:- Added long-option feature to getopt(). MFH:- Made getopt() available on win32 systems. MFH: Patch by: David Soria Parra <dsp@php.net> [DOC]: These changes will be available from 5.3+ # Note: Fixed also tests and synced basic_functions.c with HEAD.
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r--sapi/cli/php_cli.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 395888cceb..0f432f257e 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -664,7 +664,7 @@ int main(int argc, char *argv[])
memcpy(cli_sapi_module.ini_entries, HARDCODED_INI, ini_entries_len+1);
cli_sapi_module.ini_entries[ini_entries_len+1] = 0;
- while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0))!=-1) {
+ while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2))!=-1) {
switch (c) {
case 'c':
if (cli_sapi_module.php_ini_path_override) {
@@ -735,7 +735,7 @@ int main(int argc, char *argv[])
goto out_err;
}
- while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0)) != -1) {
+ while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
switch (c) {
case 'h': /* help & quit */
@@ -806,7 +806,7 @@ int main(int argc, char *argv[])
php_optind = orig_optind;
php_optarg = orig_optarg;
- while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0)) != -1) {
+ while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
switch (c) {
case 'a': /* interactive mode */