2015-03-24 03:12:35 -07:00
|
|
|
/*
|
|
|
|
* xbot: Just another IRC bot
|
|
|
|
*
|
|
|
|
* Written by Aaron Blakely <aaron@ephasic.org>
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef UTIL_H
|
|
|
|
#define UTIL_H
|
|
|
|
|
2024-02-12 23:22:10 -08:00
|
|
|
#ifdef _WIN32
|
2024-02-16 13:28:11 -08:00
|
|
|
#define true TRUE
|
|
|
|
#define false FALSE
|
2024-02-12 23:22:10 -08:00
|
|
|
#endif
|
|
|
|
|
2024-03-06 01:45:01 -08:00
|
|
|
#ifdef _WIN32
|
|
|
|
#ifdef MY_DLL_EXPORTS
|
|
|
|
#define MY_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define MY_API __declspec(dllimport)
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define MY_API
|
|
|
|
#endif
|
|
|
|
|
2015-03-24 03:12:35 -07:00
|
|
|
void eprint(char *fmt, ...);
|
2024-02-12 23:22:10 -08:00
|
|
|
|
|
|
|
#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 38)) || defined(_WIN32)
|
2024-03-06 01:45:01 -08:00
|
|
|
MY_API void strlcpy(char *to, const char *from, int len);
|
2024-02-12 23:22:10 -08:00
|
|
|
#endif
|
|
|
|
|
2024-02-29 18:49:33 -08:00
|
|
|
#ifdef _WIN32
|
2024-03-06 01:45:01 -08:00
|
|
|
MY_API char *basename(char *path);
|
2024-02-29 18:49:33 -08:00
|
|
|
#endif
|
|
|
|
|
2024-03-06 01:45:01 -08:00
|
|
|
MY_API char *skip(char *s, char c);
|
|
|
|
MY_API void trim(char *s);
|
2015-03-24 03:12:35 -07:00
|
|
|
|
2024-02-12 23:22:10 -08:00
|
|
|
#endif
|