about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-09T10·35+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-09T10·35+0000
commit15801c88fad38253b19ac2ea77e7597deab5fd6b (patch)
tree2dab8ab76792328b6c5376509d6b2e659ad19cf8 /src/libmain
parentd2e3a132fe6796b2ac038ccb20e7aa32afc1a85f (diff)
* Turned the msg() and debug() functions into macros, since they
  turned out to be a huge performance bottleneck (the text to printed
  would always be evaluated, even when it was above the verbosity
  level).  This reduces fix-ng execution time by over 50%.

  gprof(1) is very useful. :-)

Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 39439f8e1921..b06f5eb8b465 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -64,17 +64,17 @@ int main(int argc, char * * argv)
     try {
         initAndRun(argc, argv);
     } catch (UsageError & e) {
-        msg(lvlError, 
+        printMsg(lvlError, 
             format(
                 "error: %1%\n"
                 "Try `%2% --help' for more information.")
             % e.what() % programId);
         return 1;
     } catch (Error & e) {
-        msg(lvlError, format("error: %1%") % e.msg());
+        printMsg(lvlError, format("error: %1%") % e.msg());
         return 1;
     } catch (exception & e) {
-        msg(lvlError, format("error: %1%") % e.what());
+        printMsg(lvlError, format("error: %1%") % e.what());
         return 1;
     }