libircbot
library providing a framework for implementing an IRC bot
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1#ifndef IRCBOT_UTIL_H
2#define IRCBOT_UTIL_H
3
4#include <ircbot/decl.h>
5
6#include <stddef.h>
7
17DECLEXPORT void *IB_xmalloc(size_t size)
18 ATTR_MALLOC ATTR_RETNONNULL ATTR_ALLOCSZ((1));
19
26DECLEXPORT void *IB_xrealloc(void *ptr, size_t size)
27 ATTR_RETNONNULL ATTR_ALLOCSZ((2));
28
33DECLEXPORT char *IB_copystr(const char *src) ATTR_MALLOC;
34
40DECLEXPORT char *IB_lowerstr(const char *src) ATTR_MALLOC;
41
47DECLEXPORT char *IB_joinstr(const char *delim, char **strings)
48 ATTR_MALLOC ATTR_NONNULL((1));
49
50#endif
Common preprocessor declarations for libircbot.
void * IB_xmalloc(size_t size)
Allocate memory.
char * IB_copystr(const char *src)
Copy a string.
char * IB_joinstr(const char *delim, char **strings)
Join an array of strings in a single one.
void * IB_xrealloc(void *ptr, size_t size)
Reallocate memory.
char * IB_lowerstr(const char *src)
Convert string to lowercase.