From 3343fabf7984cad8781b7163f16688456deb9ca0 Mon Sep 17 00:00:00 2001 From: allen Date: Sun, 4 Jul 1999 12:00:26 +0000 Subject: Contains CST_error(level,message,line,file); git-svn-id: http://svn.cactuscode.org/flesh/trunk@627 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/sbin/CSTUtils.pl | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/sbin/CSTUtils.pl (limited to 'lib/sbin/CSTUtils.pl') diff --git a/lib/sbin/CSTUtils.pl b/lib/sbin/CSTUtils.pl new file mode 100644 index 00000000..1b8b940e --- /dev/null +++ b/lib/sbin/CSTUtils.pl @@ -0,0 +1,34 @@ +sub CST_error +{ + local($level,$mess,$line,$file) = @_; + + if ($full_warnings) + { + if ($level == 0) + { + $CST_errors++; + print STDERR "CST error in $file (at $line)\n"; + print STDERR " -> $mess\n"; + } + else + { + print STDERR "CST warning in $file (at $line)\n"; + print STDERR " -> $mess\n"; + } + } + else + { + if ($level == 0) + { + $CST_errors++; + print STDERR "CST error $CST_errors:\n -> $mess\n"; + } + else + { + print STDERR "CST warning:\n -> $mess\n"; + } + } + return; +} + +1; -- cgit v1.2.3