Libmacro  0.2
Libmacro is an extensible macro and hotkey library.
util.h
Go to the documentation of this file.
1 /* Libmacro - A multi-platform, extendable macro and hotkey C library
2  Copyright (C) 2013 Jonathan Pelletier, New Paradigm Software
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
23 #ifndef MCR_UTIL_UTIL_H_
24 #define MCR_UTIL_UTIL_H_
25 
26 #include "mcr/util/c11threads.h"
27 #include "mcr/util/comparison.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
34 MCR_API const char *mcr_timestamp();
41 MCR_API size_t mcr_bit_index(uintmax_t bitval);
47 #define mcr_index_bit(index) (1 << index)
48 
49 MCR_API int mcr_thrd_errno(int thrdError);
54 MCR_API int mcr_thrd(thrd_start_t func, void *arg);
55 
62 MCR_API int mcr_privileges_deactivate();
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif
MCR_API int mcr_thrd_errno(int thrdError)
MCR_API size_t mcr_bit_index(uintmax_t bitval)
MCR_API const char * mcr_timestamp()
Comparison functions to be used with qsort and bsearch.
MCR_API int mcr_thrd(thrd_start_t func, void *arg)
MCR_API int mcr_privileges_deactivate()