diff options
author | Nathan Gass | 2008-05-07 15:07:56 +0000 |
---|---|---|
committer | Nathan Gass | 2008-05-07 15:07:56 +0000 |
commit | 555be4ad6ad1e774497bdaf687a3021cda49f372 (patch) | |
tree | 79c2097c6f56e6729e5d9b6b434d227570799cce /it.class | |
parent | 195a41a379be137debb920d746d74059b5afc2e2 (diff) | |
download | itools-555be4ad6ad1e774497bdaf687a3021cda49f372.tar.gz itools-555be4ad6ad1e774497bdaf687a3021cda49f372.tar.bz2 itools-555be4ad6ad1e774497bdaf687a3021cda49f372.zip |
implented debug argument
Diffstat (limited to 'it.class')
-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(); |