diff options
-rw-r--r-- | it.class | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -521,6 +521,7 @@ function getopt($helplines) $witharg[$longoptname ? $longoptname : $shortoptname] = $longoptarg || $shortoptarg; } } + $witharg['debug'] = 1; $mandatoryargs = array(); if ($tmp = trim(it::replace(array("\n.*" => "", "^\S+\s+\S+\s*" => "", "\[.*?\]\s*" => ""), trim($helplines)))) @@ -570,6 +571,15 @@ function getopt($helplines) exit(1); } + if ($result['debug']) + { + foreach (split('[.,]', $result['debug']) as $ultrad) + { + $ultravar = split('[-=:]', $ultrad); + $GLOBALS["debug_$ultravar[0]"] = isset($ultravar[1]) ? $ultravar[1] : 1; + } + } + $GLOBALS['it_stdin']['args'] = $result['args'] ? $result['args'] : array("-"); it::_stdin_next(); |