touched up code a bit

This commit is contained in:
2021-02-09 15:06:41 +00:00
parent 1d0c7a8bbc
commit 816b900231
3 changed files with 12 additions and 21 deletions

View File

@ -240,17 +240,18 @@
# endif
#endif
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
# define HCL_IS_PATH_SEP(c) ((c) == '/' || (c) == '\\')
#if defined(USE_THREAD)
# define MUTEX_INIT(x) pthread_mutex_init((x), MOO_NULL)
# define MUTEX_DESTROY(x) pthread_mutex_destroy(x)
# define MUTEX_LOCK(x) pthread_mutex_lock(x)
# define MUTEX_UNLOCK(x) pthread_mutex_unlock(x)
#else
# define HCL_IS_PATH_SEP(c) ((c) == '/')
# define MUTEX_INIT(x)
# define MUTEX_DESTROY(x)
# define MUTEX_LOCK(x)
# define MUTEX_UNLOCK(x)
#endif
/* TODO: handle path with a drive letter or in the UNC notation */
#define HCL_IS_PATH_ABSOLUTE(x) HCL_IS_PATH_SEP(x[0])
typedef struct xtn_t xtn_t;
struct xtn_t