summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class10
1 files changed, 10 insertions, 0 deletions
diff --git a/it.class b/it.class
index 083ca51..bf9969d 100644
--- a/it.class
+++ b/it.class
@@ -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();