Mir 1.0
Mir application programming interface
Mir Kernel Library

Modules

 Bit arrays
 
 Build environment
 
 Double-Linked Cached List routines
 
 CPU handling routines
 
 Directory handling routines
 
 Double-Linked List routines
 
 Error handling system
 
 Hooks system
 
 Image processing
 
 Logging
 
 Hardware/OS-related routines
 
 Memory handling routines
 
 Object routines
 
 SHA1 routines
 
 Stack functions
 
 String handling routines
 
 Time routines
 
 Supplementrary utility routines
 

Macros

#define MIRKL_BUILDING   0
 
#define MIRKL_DECLARE(type)   type
 
#define MIRKL_DECLARE_NONSTD(type)   type
 
#define MIRKL_DECLARE_DATA
 
#define true   1
 
#define false   0
 
#define MIRKL_SUCCESS   0
 
#define MIRKL_ERROR_APRINIT   1
 
#define MIRKL_ERROR_APRPOOL   2
 
#define MIRKL_ERROR_ERRINIT   3
 
#define MIRKL_ERROR_MUTEXINIT   4
 
#define MIRKL_MAX_INP_LINE_LEN   1000
 
#define MIRKL_MAX_OUT_LINE_LEN   1000
 
#define MIRKL_MIN(a, b)   (((a) < (b)) ? (a) : (b))
 
#define MIRKL_MAX(a, b)   (((a) > (b)) ? (a) : (b))
 
#define MIRKL_PATH_MAX   4096
 

Typedefs

typedef int8_t mirkl_int8_t
 
typedef uint8_t mirkl_uint8_t
 
typedef mirkl_uint8_t mirkl_byte_t
 
typedef int16_t mirkl_int16_t
 
typedef uint16_t mirkl_uint16_t
 
typedef int32_t mirkl_int32_t
 
typedef uint32_t mirkl_uint32_t
 
typedef int64_t mirkl_int64_t
 
typedef uint64_t mirkl_uint64_t
 
typedef size_t mirkl_size_t
 
typedef off_t mirkl_off_t
 
typedef bool mirkl_boolean_t
 
typedef mirkl_boolean_t mirkl_bool_t
 

Functions

int mirkl_initialize (void)
 Initialization of the MirKL library. More...
 
void mirkl_terminate (void)
 Termination of the MirKL library. More...
 

Detailed Description

Macro Definition Documentation

◆ false

#define false   0

uhh... false

◆ MIRKL_DECLARE

#define MIRKL_DECLARE (   type)    type

The public MirKL functions are declared with MIRKL_DECLARE(), so they may use the most appropriate calling convention. Public MirKL functions with variable arguments must use MIRKL_DECLARE_NONSTD().

Remarks
Both the declaration and implementations must use the same macro.
MIRKL_DECLARE(rettype) mirkl_func(args)
See also
MIRKL_DECLARE_NONSTD
MIRKL_DECLARE_DATA

◆ MIRKL_DECLARE_DATA

#define MIRKL_DECLARE_DATA

The public MirKL variables are declared with MIRKL_DECLARE_DATA. This assures the appropriate indirection is invoked at compile time.

See also
MIRKL_DECLARE
MIRKL_DECLARE_NONSTD
Remarks
Note that the declaration and implementations use different forms, but both must include the macro.

extern MIRKL_DECLARE_DATA type mirkl_variable;
MIRKL_DECLARE_DATA type mirkl_variable = value;

◆ MIRKL_DECLARE_NONSTD

#define MIRKL_DECLARE_NONSTD (   type)    type

The public MirKL functions using variable arguments are declared with MIRKL_DECLARE_NONSTD(), as they must follow the C language calling convention. The difference between MIRKL_DECLARE and MIRKL_DECLARE_NONSTD is that the latter is required for any functions which use varargs or are used via indirect function call. This is to accomodate the two calling conventions in windows dlls.

See also
MIRKL_DECLARE
MIRKL_DECLARE_DATA
Remarks
Both the declaration and implementations must use the same macro.

MIRKL_DECLARE_NONSTD(rettype) mirkl_func(args, ...);

◆ MIRKL_PATH_MAX

#define MIRKL_PATH_MAX   4096

Number of chars in a path name including nul

◆ true

#define true   1

uhh... true

Function Documentation

◆ mirkl_initialize()

int mirkl_initialize ( void  )

Initialization of the MirKL library.

Note
This function should be called first before using other MirKL functions.

◆ mirkl_terminate()

void mirkl_terminate ( void  )

Termination of the MirKL library.

Note
No MirKL functions should be used after calling this function.