/*
This file is part of GNUnet.
- (C) 2006-2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2006-2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
const char *filename);
+/**
+ * Generic continuation callback.
+ *
+ * @param cls Closure.
+ */
+typedef void
+(*GNUNET_ContinuationCallback) (void *cls);
+
+
/* ****************************** logging ***************************** */
/**
* @param date when was the message logged?
* @param message what is the message
*/
-typedef void (*GNUNET_Logger) (void *cls,
- enum GNUNET_ErrorType kind,
- const char *component,
- const char *date,
- const char *message);
+typedef void
+(*GNUNET_Logger) (void *cls,
+ enum GNUNET_ErrorType kind,
+ const char *component,
+ const char *date,
+ const char *message);
/**
* @return number of log calls to be ignored
*/
int
-GNUNET_get_log_skip ();
+GNUNET_get_log_skip (void);
+
#if !defined(GNUNET_CULL_LOGGING)
int
/**
* @ingroup logging
* Abort the process, generate a core dump if possible.
+ * Most code should use `GNUNET_assert (0)` instead to
+ * first log the location of the failure.
*/
void
-GNUNET_abort (void) GNUNET_NORETURN;
+GNUNET_abort_ (void) GNUNET_NORETURN;
/**
* @ingroup logging
* Use this for fatal errors that cannot be handled
*/
-#define GNUNET_assert(cond) do { if (! (cond)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Assertion failed at %s:%d.\n"), __FILE__, __LINE__); GNUNET_abort(); } } while(0)
+#define GNUNET_assert(cond) do { if (! (cond)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Assertion failed at %s:%d.\n"), __FILE__, __LINE__); GNUNET_abort_(); } } while(0)
/**
* @ingroup logging
* Use this for fatal errors that cannot be handled
*/
-#define GNUNET_assert_at(cond, f, l) do { if (! (cond)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Assertion failed at %s:%d.\n"), f, l); GNUNET_abort(); } } while(0)
+#define GNUNET_assert_at(cond, f, l) do { if (! (cond)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Assertion failed at %s:%d.\n"), f, l); GNUNET_abort_(); } } while(0)
/**