]> mj.ucw.cz Git - libucw.git/blobdiff - lib/log.c
Fix escaping of "+" characters in outgoing parameters. (BTW: when Galeon
[libucw.git] / lib / log.c
index eb3c0ab26d4736034b906fca3d5dacc445f61649..bcbce64b6115e010059e1788e16070f3f367e63a 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -2,6 +2,9 @@
  *     Sherlock Library -- Logging
  *
  *     (c) 1997--2001 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
 #include "lib/lib.h"
@@ -93,6 +96,21 @@ die(byte *msg, ...)
   exit(1);
 }
 
+#ifdef DEBUG
+void
+assert_failed(char *assertion, char *file, int line)
+{
+  log(L_FATAL, "Assertion `%s' failed at %s:%d", assertion, file, line);
+  abort();
+}
+#else
+void
+assert_failed(void)
+{
+  die("Internal error: Assertion failed.");
+}
+#endif
+
 static byte *
 log_basename(byte *n)
 {