based/include/base.h

40 lines
865 B
C
Raw Permalink Normal View History

2023-07-15 19:52:58 +02:00
/**
* @file base_defs.h
* @brief The library general header.
* @version 0.1
* @date 2023-01-11
* @details Contains utilities like memory management, evironment and more.
*/
#ifndef BASE_H
#define BASE_H
#include "based/env/envb.h"
extern int main(int argc, char** argv, char** envp);
extern int rt_initialize_lib();
2023-07-15 19:52:58 +02:00
// ========================================
// Definitions
// ========================================
/// Exit on success.
#define EXIT_OK 0
/// Exit on fail.
#define EXIT_FAIL -1
/// Exit on error.
#define EXIT_ERROR 1
#if !defined(bool) || !defined(BOOL)
#define bool uint8
#define true 1
#define false 0
#endif
#ifndef NULL
#define NULL ((void*)0)
#endif // NULL
#define INVALID_PTR ((void*)-1)
#define NULL_BYTE_PTR ((BYTE*)0)
#define INVALID_BYTE_PTR ((BYTE*)-1)
#define NULL_BYTE '\0'
#define IGNORE_ARG(x) (void)x;
#endif //BASE_H