Libmacro  0.2
Libmacro is an extensible macro and hotkey library.
util.h File Reference

Utilities for Libmacro. More...

Go to the source code of this file.

Macros

#define mcr_index_bit(index)   (1 << index)
 

Functions

MCR_API const char * mcr_timestamp ()
 
MCR_API size_t mcr_bit_index (uintmax_t bitval)
 
MCR_API int mcr_thrd_errno (int thrdError)
 
MCR_API int mcr_thrd (thrd_start_t func, void *arg)
 
MCR_API int mcr_privileges_deactivate ()
 

Detailed Description

Utilities for Libmacro.

Definition in file util.h.

Macro Definition Documentation

§ mcr_index_bit

#define mcr_index_bit (   index)    (1 << index)

For given array index return the corresponding bit value.

See mcr_bit_index

Returns
Bit value of array index

Definition at line 47 of file util.h.

Function Documentation

§ mcr_bit_index()

MCR_API size_t mcr_bit_index ( uintmax_t  bitval)

For given bit return the corresponding array index. Requires at least one "on" bit

See mcr_index_bit

Returns
retind Array index of bit value

§ mcr_privileges_deactivate()

MCR_API int mcr_privileges_deactivate ( )

Disable privileges, and remove the ability to enable them.

mcr_platform

Returns
reterr

§ mcr_thrd()

MCR_API int mcr_thrd ( thrd_start_t  func,
void *  arg 
)

thrd_create and thrd_detach

Returns
reterr

§ mcr_thrd_errno()

MCR_API int mcr_thrd_errno ( int  thrdError)

Get an errno.h code from a threading error number.

§ mcr_timestamp()

MCR_API const char* mcr_timestamp ( )

time(NULL) and ctime