aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r--src/include/gnunet_common.h32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 036249e34..f884d9a24 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -157,10 +157,9 @@ enum GNUNET_ErrorType
157 * @param date when was the message logged? 157 * @param date when was the message logged?
158 * @param message what is the message 158 * @param message what is the message
159 */ 159 */
160typedef void (*GNUNET_Logger) (void *cls, 160typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind,
161 enum GNUNET_ErrorType kind, 161 const char *component, const char *date,
162 const char *component, 162 const char *message);
163 const char *date, const char *message);
164 163
165/** 164/**
166 * Main log function. 165 * Main log function.
@@ -182,9 +181,8 @@ void GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
182 * @param message what is the message (format string) 181 * @param message what is the message (format string)
183 * @param ... arguments for format string 182 * @param ... arguments for format string
184 */ 183 */
185void 184void GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
186GNUNET_log_from (enum GNUNET_ErrorType kind, 185 const char *message, ...);
187 const char *comp, const char *message, ...);
188 186
189 187
190/** 188/**
@@ -204,8 +202,8 @@ void GNUNET_log_skip (unsigned int n, int check_reset);
204 * @param logfile change logging to logfile (use NULL to keep stderr) 202 * @param logfile change logging to logfile (use NULL to keep stderr)
205 * @return GNUNET_OK on success, GNUNET_SYSERR if logfile could not be opened 203 * @return GNUNET_OK on success, GNUNET_SYSERR if logfile could not be opened
206 */ 204 */
207int 205int GNUNET_log_setup (const char *comp, const char *loglevel,
208GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile); 206 const char *logfile);
209 207
210 208
211/** 209/**
@@ -528,15 +526,15 @@ void *GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
528 * @param linenumber line where this call is being made (for debugging) 526 * @param linenumber line where this call is being made (for debugging)
529 * @return pointer to size bytes of memory, NULL if we do not have enough memory 527 * @return pointer to size bytes of memory, NULL if we do not have enough memory
530 */ 528 */
531void *GNUNET_xmalloc_unchecked_ (size_t size, 529void *GNUNET_xmalloc_unchecked_ (size_t size, const char *filename,
532 const char *filename, int linenumber); 530 int linenumber);
533 531
534/** 532/**
535 * Reallocate memory. Checks the return value, aborts if no more 533 * Reallocate memory. Checks the return value, aborts if no more
536 * memory is available. 534 * memory is available.
537 */ 535 */
538void *GNUNET_xrealloc_ (void *ptr, 536void *GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename,
539 size_t n, const char *filename, int linenumber); 537 int linenumber);
540 538
541/** 539/**
542 * Free memory. Merely a wrapper for the case that we 540 * Free memory. Merely a wrapper for the case that we
@@ -585,11 +583,9 @@ char *GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
585 * @param filename where is this call being made (for debugging) 583 * @param filename where is this call being made (for debugging)
586 * @param linenumber line where this call is being made (for debugging) 584 * @param linenumber line where this call is being made (for debugging)
587 */ 585 */
588void GNUNET_xgrow_ (void **old, 586void GNUNET_xgrow_ (void **old, size_t elementSize, unsigned int *oldCount,
589 size_t elementSize, 587 unsigned int newCount, const char *filename,
590 unsigned int *oldCount, 588 int linenumber);
591 unsigned int newCount,
592 const char *filename, int linenumber);
593 589
594 590
595 591