lib/evil/evil_locale.h \
lib/evil/evil_macro.h \
lib/evil/evil_macro_pop.h \
+lib/evil/evil_macro_wrapper.h \
lib/evil/evil_main.h \
lib/evil/evil_stdio.h \
lib/evil/evil_stdlib.h \
# include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <stdio.h>
#include <string.h>
#include <Evil.h>
# include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <stdio.h>
#include <string.h>
#include <Evil.h>
# include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <stdio.h>
#include <string.h>
#include <Evil.h>
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <limits.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <math.h>
+#include <sys/stat.h> /* for mkdir in evil_macro_wrapper */
typedef unsigned long uid_t;
#include "evil_time.h"
#include "evil_unistd.h"
#include "evil_util.h"
-#include "evil_macro_pop.h"
#ifndef S_ISDIR
# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define _S_IWUSR _S_IWRITE
#define _S_IRUSR _S_IREAD
- /*
-# define close(fd) _close(fd)
-# define read(fd,buffer,count) _read((fd),(buffer),(count))
-# define write(fd,buffer,count) _write((fd),(buffer),(count))
-# define unlink(filename) _unlink((filename))
-# define lstat(f,s) _stat((f),(s))
- */
-
#define sigsetjmp(Env, Save) setjmp(Env)
-#undef EAPI
-#define EAPI
+#include "evil_macro_wrapper.h"
+#include "evil_macro_pop.h"
#ifdef __cplusplus
}
#include <psapi.h> /* EnumProcessModules(Ex) */
-#include "Evil.h"
+#include "evil_macro.h"
+#include "evil_util.h"
#include "evil_private.h"
#include "dlfcn.h"
# include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <stdlib.h>
#include <dirent.h>
#include <errno.h>
+#include <sys/types.h>
-#include "Evil.h"
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+#include "evil_macro.h"
+#include "evil_stdio.h"
struct DIR
#include <sys/locking.h>
#include <winsock2.h> /* for ioctlsocket */
+#include <io.h>
-#include "Evil.h"
+#include "evil_macro.h"
+#include "evil_fcntl.h"
/*
#include "evil_macro.h"
#include "evil_inet.h"
-#include "evil_private.h"
#ifndef EMSGSIZE
# define EMSGSIZE WSAEMSGSIZE
EAPI int evil_inet_pton(int af, const char *src, void *dst);
/**
- * @def inet_pton(x,y,z)
- *
- * Wrapper around evil_inet_pton().
- */
-#define inet_pton(x,y,z) evil_inet_pton(x,y,z)
-
-/**
* @brief Convert IPv4 and IPv6 addresses from binary to text form.
*
* @param af The address family.
*/
EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size);
-/**
- * @def inet_ntop(x,y,z,s)
- *
- * Wrapper around evil_inet_ntop().
- */
-#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)
-
#endif /* _WIN32_WINNT >= _WIN32_WINNT_VISTA */
# include "config.h"
#endif /* HAVE_CONFIG_H */
-#include "Evil.h"
+#include <stdlib.h>
+#include <string.h>
+
+#include "evil_macro.h"
+#include "evil_langinfo.h"
static char *
#include <string.h>
-#include "Evil.h"
+#include "evil_macro.h"
+#include "evil_libgen.h"
char _evil_basename_buf[PATH_MAX];
char _evil_dirname_buf[PATH_MAX];
#include "evil_macro.h"
#include "evil_locale.h"
-#include "evil_private.h"
/*
* LOCALE_SISO639LANGNAME and LOCALE_SISO3166CTRYNAME need at least a buffer
* @def LC_MESSAGES
*
* New locale value, based on the one in libintl.h
+ *
+ * @since 1.16
*/
#ifdef LC_MESSAGES
# undef LC_MESSAGES
* Conformity: Non applicable.
*
* Supported OS: Windows XP.
- */
-EAPI char *evil_setlocale(int category, const char *locale);
-
-/**
- * @def setlocale(cat, loc)
*
- * Wrapper around evil_setlocale().
+ * @since 1.16
*/
-#ifdef setlocale /* libintl.h defines setlocale() but always returns "C" */
-# undef setlocale
-#endif
-#define setlocale(cat, loc) evil_setlocale(cat, loc)
+EAPI char *evil_setlocale(int category, const char *locale);
/**
#define SCNuPTR "llu"
#endif /* _WIN64 */
+#undef EAPI
+#define EAPI
+
#endif /* __EVIL_MACRO_POP_H__ */
--- /dev/null
+#ifndef __EVIL_MACRO_WRAPPER_H__
+#define __EVIL_MACRO_WRAPPER_H__
+
+
+/*
+ * evil_inet.h
+ */
+
+#if ! (_WIN32_WINNT >= 0x600 /* _WIN32_WINNT_VISTA */)
+
+/**
+ * @def inet_pton(x,y,z)
+ *
+ * Wrapper around evil_inet_pton().
+ */
+#define inet_pton(x,y,z) evil_inet_pton(x,y,z)
+
+/**
+ * @def inet_ntop(x,y,z,s)
+ *
+ * Wrapper around evil_inet_ntop().
+ */
+#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)
+
+
+#endif /* _WIN32_WINNT >= _WIN32_WINNT_VISTA */
+
+/*
+ * evil_locale.h
+ */
+
+/**
+ * @def setlocale(cat, loc)
+ *
+ * Wrapper around evil_setlocale().
+ * @since 1.16
+ */
+#ifdef setlocale /* libintl.h defines setlocale() but always returns "C" */
+# undef setlocale
+#endif
+#define setlocale(cat, loc) evil_setlocale(cat, loc)
+
+/*
+ * evil_stdio.h
+ */
+
+/**
+ * @def rename(src, dest)
+ *
+ * Wrapper around evil_rename().
+ *
+ * @since 1.8
+ */
+#ifdef rename
+# undef rename
+#endif
+#define rename(src, dst) evil_rename(src, dst)
+
+/**
+ * @def mkdir(dirname, mode)
+ *
+ * Wrapper around evil_mkdir().
+ *
+ * @since 1.15
+ */
+#ifdef mkdir
+# undef mkdir
+#endif
+#define mkdir(dirname, mode) evil_mkdir(dirname, mode)
+
+/*
+ * evil_time.h
+ */
+
+/**
+ * @def localtime_r(t, r)
+ *
+ * Wrapper around evil_localtime_r().
+ */
+#ifdef localtime_r
+# undef localtime_r
+#endif
+#define localtime_r(t, r) evil_localtime_r(t, r)
+
+/*
+ * evil_unistd.h
+ */
+
+/**
+ * @def getcwd(b,s)
+ *
+ * Wrapper around evil_getcwd().
+ */
+#ifdef getcwd
+# undef getcwd
+#endif
+#define getcwd(b,s) evil_getcwd((b),(s))
+
+/**
+ * @def pipe(fds)
+ *
+ * Wrapper around evil_pipe().
+ */
+#ifdef pipe
+# undef pipe
+#endif
+#define pipe(fds) evil_pipe(fds)
+
+
+#endif
# include <config.h>
#endif
+#include <stdio.h>
+
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#include <winsock2.h>
#undef WIN32_LEAN_AND_MEAN
-#include "Evil.h"
+#include "evil_macro.h"
+#include "evil_unistd.h"
+#include "evil_main.h"
#include "evil_private.h"
extern LONGLONG _evil_time_count;
extern long _evil_time_second;
+long _evil_systemtime_to_time(SYSTEMTIME st);
+
int
evil_init(void)
{
# endif
#endif
-long _evil_systemtime_to_time(SYSTEMTIME st);
-
-void _evil_error_display(const char *fct, LONG res);
-
-void _evil_last_error_display(const char *fct);
-
#ifdef __cplusplus
}
#endif
# include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <stdio.h>
+
#define _POSIX
#include <io.h>
#include <lmcons.h>
-#include "Evil.h"
+#include "evil_macro.h"
#include "pwd.h"
#endif /* HAVE_CONFIG_H */
#include <direct.h>
+#include <sys/stat.h>
+#include <sys/types.h>
-#include "Evil.h"
+#include "evil_macro.h"
+#include "evil_stdio.h"
#include "evil_private.h"
#undef rename
EAPI int evil_rename(const char *src, const char *dst);
/**
- * @def rename(src, dest)
- *
- * Wrapper around evil_rename().
- */
-#define rename(src, dst) evil_rename(src, dst)
-
-/**
* @brief Wrap the _mkdir() function on Windows.
*
* @param[in] dirname The new dir name.
*/
EAPI int evil_mkdir(const char *dirname, mode_t mode);
-/**
- * @def mkdir(dirname, mode)
- *
- * Wrapper around evil_mkdir().
- */
-#define mkdir(dirname, mode) evil_mkdir(dirname, mode)
-
#endif /* __EVIL_STDIO_H__ */
#include "evil_macro.h"
#include "evil_stdlib.h"
-#include "evil_private.h"
/*
* Environment variable related functions
# include "config.h"
#endif /* HAVE_CONFIG_H */
-#include "Evil.h"
-#include "evil_private.h"
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "evil_macro.h"
+#include "evil_string.h"
/*
#include <ctype.h>
#include <time.h>
-#include "Evil.h"
+#include "evil_macro.h"
+#include "evil_time.h"
+#include "evil_macro_wrapper.h"
#include "evil_private.h"
struct tm *
EAPI struct tm *evil_localtime_r(const time_t *timep, struct tm *result);
/**
- * @def localtime_r(t, r)
- *
- * Wrapper around evil_localtime_r().
- */
-#ifdef localtime_r
-# undef localtime_r
-#endif
-#define localtime_r(t, r) evil_localtime_r(t, r)
-
-/**
* @brief Convert a string representation of time to a time tm structure .
*
* @param buf The string to convert.
#endif /* HAVE_CONFIG_H */
#include <errno.h>
+#include <direct.h>
# include <sys/time.h>
#ifndef WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#undef WIN32_LEAN_AND_MEAN
-#include "Evil.h"
-#include "evil_private.h"
+#include "evil_macro.h"
+#include "evil_unistd.h"
LONGLONG _evil_time_freq;
long _evil_time_second;
+long _evil_systemtime_to_time(SYSTEMTIME st);
+
long
_evil_systemtime_to_time(SYSTEMTIME st)
{
*/
EAPI char *evil_getcwd(char *buffer, size_t size);
-/**
- * @def getcwd(b,s)
- *
- * Wrapper around evil_getcwd().
- */
-#define getcwd(b,s) evil_getcwd((b),(s))
-
/*
* Sockets and pipe related functions
*
*/
EAPI int evil_pipe(int *fds);
-/**
- * @def pipe(fds)
- *
- * Wrapper around evil_pipe().
- */
-#define pipe(fds) evil_pipe(fds)
-
/**
* @}
#include "evil_macro.h"
#include "evil_util.h"
-#include "evil_private.h"
+/* static void _evil_error_display(const char *fct, LONG res); */
+static void _evil_last_error_display(const char *fct);
+
wchar_t *
evil_char_to_wchar(const char *text)
{
return disp;
}
-void
-_evil_error_display(const char *fct, LONG res)
-{
- char *error;
+/* static void */
+/* _evil_error_display(const char *fct, LONG res) */
+/* { */
+/* char *error; */
- error = evil_format_message(res);
- fprintf(stderr, "[Evil] [%s] ERROR (%ld): %s\n", fct, res, error);
- free(error);
-}
+/* error = evil_format_message(res); */
+/* fprintf(stderr, "[Evil] [%s] ERROR (%ld): %s\n", fct, res, error); */
+/* free(error); */
+/* } */
char *
evil_last_error_get(void)
return evil_format_message(err);
}
-void
+static void
_evil_last_error_display(const char *fct)
{
char *error;