diff options
author | hansp <hansp> | 2001-03-08 22:31:50 +0000 |
---|---|---|
committer | hansp <hansp> | 2001-03-08 22:31:50 +0000 |
commit | d4af2e4d47c1f586211b3dfadb4afba3533296e7 (patch) | |
tree | f9a975a6668ead83211551d9ae881cd23a139941 /debug.pl.in | |
parent | 7dd3186c85770ae32bf45997e7a5d114aad24a55 (diff) |
2001-03-08 Hans Petter Jansson <hpj@ximian.com>
* general.pl.in: Add $xst_debug flag.
(xst_init): Honour --debug arg and XST_DEBUG env. Also some comments.
* debug.pl.in (xst_debug_print_indent): Use xst_debug_print_string().
(xst_debug_print_string): Print to STDERR only if $xst_debug set.
Diffstat (limited to 'debug.pl.in')
-rw-r--r-- | debug.pl.in | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/debug.pl.in b/debug.pl.in index 645c55d..3fe5f00 100644 --- a/debug.pl.in +++ b/debug.pl.in @@ -48,6 +48,19 @@ sub xst_debug_print_string_to_file } +sub xst_debug_print_string +{ + if ($xst_debug) { print STDERR $_[0]; } + &xst_debug_print_string_to_file ("debug", $_[0]); +} + + +sub xst_debug_print_line +{ + &xst_debug_print_string ($_[0] . "\n"); +} + + sub xst_debug_print_indent { my $indent = @_[0]; @@ -59,21 +72,7 @@ sub xst_debug_print_indent $indent_string .= " "; } - print STDERR $indent_string; - &xst_debug_print_string_to_file ("debug", $indent_string); -} - - -sub xst_debug_print_string -{ - print STDERR $_[0]; - &xst_debug_print_string_to_file ("debug", $_[0]); -} - - -sub xst_debug_print_line -{ - &xst_debug_print_string ($_[0] . "\n"); + &xst_debug_print_string ($indent_string); } |