summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorNathan Gass2008-05-07 15:07:56 +0000
committerNathan Gass2008-05-07 15:07:56 +0000
commit555be4ad6ad1e774497bdaf687a3021cda49f372 (patch)
tree79c2097c6f56e6729e5d9b6b434d227570799cce /it.class
parent195a41a379be137debb920d746d74059b5afc2e2 (diff)
downloaditools-555be4ad6ad1e774497bdaf687a3021cda49f372.tar.gz
itools-555be4ad6ad1e774497bdaf687a3021cda49f372.tar.bz2
itools-555be4ad6ad1e774497bdaf687a3021cda49f372.zip
implented debug argument
Diffstat (limited to 'it.class')
-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();