From ff94ce367f7f23e3a78f157f9420c480a4d7f9aa Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 26 Aug 2024 04:07:14 +0200 Subject: [IMP] DLLInterface class and also reworked SCI's API. [IMP] Handover now gives the kernel image, for the OS. Signed-off-by: Amlal El Mahrouss --- dev/SCI/Hint.h | 23 ----- dev/SCI/SCIBase.hxx | 207 ----------------------------------------- dev/SCI/SCIErr.hxx | 49 ---------- dev/SCI/Sources/SCIBase.cxx | 7 -- dev/SCI/Sources/SCIErr.cxx | 9 -- dev/SCI/Sources/base.cxx | 7 ++ dev/SCI/sci_base.hxx | 220 ++++++++++++++++++++++++++++++++++++++++++++ dev/SCI/sci_err.hxx | 47 ++++++++++ dev/SCI/sci_hint.hxx | 23 +++++ 9 files changed, 297 insertions(+), 295 deletions(-) delete mode 100644 dev/SCI/Hint.h delete mode 100644 dev/SCI/SCIBase.hxx delete mode 100644 dev/SCI/SCIErr.hxx delete mode 100644 dev/SCI/Sources/SCIBase.cxx delete mode 100644 dev/SCI/Sources/SCIErr.cxx create mode 100644 dev/SCI/Sources/base.cxx create mode 100644 dev/SCI/sci_base.hxx create mode 100644 dev/SCI/sci_err.hxx create mode 100644 dev/SCI/sci_hint.hxx (limited to 'dev/SCI') diff --git a/dev/SCI/Hint.h b/dev/SCI/Hint.h deleted file mode 100644 index c785f953..00000000 --- a/dev/SCI/Hint.h +++ /dev/null @@ -1,23 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#ifndef __SCI_HINT_HXX__ -#define __SCI_HINT_HXX__ - -#pragma compiler(hint_manifest) - -#define _Input -#define _Output - -#define _Optional - -#define _StrictCheckInput -#define _StrictCheckOutput - -#define _InOut -#define _StrictInOut - -#endif // ifndef __SCI_HINT_HXX__ diff --git a/dev/SCI/SCIBase.hxx b/dev/SCI/SCIBase.hxx deleted file mode 100644 index 982ca950..00000000 --- a/dev/SCI/SCIBase.hxx +++ /dev/null @@ -1,207 +0,0 @@ -/* ------------------------------------------- - -Copyright ZKA Technologies. - -File: SCIBase.hxx -Purpose: SCI/M core header file (C++) - -------------------------------------------- */ - -#ifndef __SCI_BASE_HXX__ -#define __SCI_BASE_HXX__ - -#include - -#define IMPORT_CXX extern "C++" -#define IMPORT_C extern "C" - -typedef bool Bool; -typedef void UInt0; - -typedef __UINT64_TYPE__ UInt64; -typedef __UINT32_TYPE__ UInt32; -typedef __UINT16_TYPE__ UInt16; -typedef __UINT8_TYPE__ UInt8; - -typedef __SIZE_TYPE__ SizeT; - -typedef __INT64_TYPE__ SInt64; -typedef __INT32_TYPE__ SInt32; -typedef __INT16_TYPE__ SInt16; -typedef __INT8_TYPE__ SInt8; - -typedef void* VoidPtr; -typedef __UINTPTR_TYPE__ UIntPtr; -typedef char Char; - -#ifdef __SCI_IMPL__ -#include -#else -class UnknownInterface; // Refrenced from an IDB entry. -class UnknownUCLSID; // From the IDB, the constructor of the object, e.g: WordUCLSID. -class UUID; - -/// @brief Allocate new SCM class. -/// @tparam TCLS -/// @tparam UCLSID -/// @param uclsidOfCls -/// @return -template -TCLS* RtlQueryInterface(UCLSID uclsidOfCls, Args... args); - -/// @brief Release SCM class. -/// @tparam TCLS -/// @param cls -/// @return -template -SInt32 RtlReleaseClass(TCLS* cls); - -class __attribute__((uuid("d7c144b6-0792-44b8-b06b-02b227b547df"))) UnknownInterface -{ -public: - explicit UnknownInterface() = default; - virtual ~UnknownInterface() = default; - - UnknownInterface& operator=(const UnknownInterface&) = default; - UnknownInterface(const UnknownInterface&) = default; - - virtual SInt32 Release() = 0; - virtual void RemoveRef() = 0; - virtual UnknownInterface* AddRef() = 0; - virtual VoidPtr QueryInterface(UUID* p_uuid) = 0; -}; - -template -class EventListenerInterface : public ClsID -{ -public: - explicit EventListenerInterface() = default; - virtual ~EventListenerInterface() = default; - - EventListenerInterface& operator=(const EventListenerInterface&) = default; - EventListenerInterface(const EventListenerInterface&) = default; - - virtual EventListenerInterface& operator +=(FnSign arg) = 0; -}; -#endif - -// ------------------------------------------------------------------------------------------ // -/// @note Handle types. -// ------------------------------------------------------------------------------------------ // - -typedef VoidPtr NEW_OBJECT; - -typedef NEW_OBJECT DLL_OBJECT; -typedef NEW_OBJECT IO_OBJECT; -typedef NEW_OBJECT COMP_OBJECT; -typedef NEW_OBJECT SCM_OBJECT; - -// ------------------------------------------------------------------------------------------ // - -// ------------------------------------------------------------------------------------------ // -/// @note Part of ZKA loader API. -// ------------------------------------------------------------------------------------------ // - -/// @brief Get function which is part of the DLL. -/// @param symbol the symbol to look for -/// @param dll_handle the DLL handle. -/// @return the proc pointer. -IMPORT_C NEW_OBJECT LdrGetDLLProc(_Input const Char* symbol, _Input NEW_OBJECT dll_handle); - -/// @brief Open DLL handle. -/// @param path -/// @param drv -/// @return -IMPORT_C NEW_OBJECT LdrOpenDLL(_Input const Char* path, _Input const Char* drive_letter); - -/// @brief Close DLL handle -/// @param dll_handle -/// @return -IMPORT_C UInt0 LdrCloseDLL(_Input NEW_OBJECT dll_handle); - -// ------------------------------------------------------------------------------------------ // -// File API. -// ------------------------------------------------------------------------------------------ // - -/// @brief Opens a file from a drive. -/// @param fs_path the filesystem path. -/// @param drive_letter drive name, use NULL to use default one. -/// @return the file descriptor of the file. -IMPORT_C NEW_OBJECT RtlOpenFile(const Char* fs_path, const Char* drive_letter); - -/// @brief Closes a file and flushes its content. -/// @param file_desc the file descriptor. -/// @return -IMPORT_C UInt0 RtlCloseFile(_Input NEW_OBJECT file_desc); - -// ------------------------------------------------------------------------ -// TLS API. -// ------------------------------------------------------------------------ - -/// @brief Installs the TIB and GIB inside the current process. -/// @param void. -/// @return > 0 error ocurred or already present, = 0 success. -IMPORT_C UInt32 TlsInstallIB(UInt0); - -// ------------------------------------------------------------------------ -// SCM API. -// ------------------------------------------------------------------------ - -/// @brief Allocate new SCM object. -/// @tparam TCLS the class type. -/// @tparam UCLSID UCLS factory class type. -/// @param uclsidOfCls UCLS factory class -/// @return TCLS interface -template -TCLS* ScmQueryInterface(_Input UCLSID* uclsidOfCls, _Input Args&&... args); - -/// @brief Release SCM object. -/// @tparam TCLS the class type. -/// @param cls the class to release. -/// @return status code. -template -SInt32 ScmReleaseClass(_Input TCLS* cls); - -/// @brief Creates an SCM instance in the process. -/// @param handle_instance the SCM handle. -/// @param flags the SCM flags. -IMPORT_C SInt32 ScmCreateInstance(_Input UInt32 flags, _Output SCM_OBJECT* handle_instance); - -/// @brief Destroys an SCM instance of the process. -/// @param handle_instance the SCM handle. -IMPORT_C UInt0 ScmDestroyInstance(_Input SCM_OBJECT handle_instance); - -// ------------------------------------------------------------------------ -// Memory Management API. -// ------------------------------------------------------------------------ - -/// @brief Creates a new heap from the process's address space. -/// @param len the length of it. -/// @param flags the flags of it. -/// @return heap pointer. -IMPORT_C VoidPtr RtlCreateHeap(_Input SizeT len, _Input UInt32 flags); - -/// @brief Destroys the pointer -/// @param heap the heap itself. -/// @return void. -IMPORT_C UInt0 RtlDestroyHeap(_Input VoidPtr heap); - -// ------------------------------------------------------------------------ -// Error handling API. -// ------------------------------------------------------------------------ - -IMPORT_C SInt32 ErrGetLastError(UInt0); - -// ------------------------------------------------------------------------ -// Threading API. -// ------------------------------------------------------------------------ - -IMPORT_C UInt0 ThrExitCurrentThread(SInt32 exit_code); -IMPORT_C UInt0 ThrExitMainThread(SInt32 exit_code); - -IMPORT_C UInt0 ThrExitYieldThread(UInt0); - -IMPORT_C UInt0 ThrExitJoinThread(UInt0); -IMPORT_C UInt0 ThrExitDetachThread(UInt0); - -#endif // ifndef __SCI_BASE_HXX__ diff --git a/dev/SCI/SCIErr.hxx b/dev/SCI/SCIErr.hxx deleted file mode 100644 index af5d54fd..00000000 --- a/dev/SCI/SCIErr.hxx +++ /dev/null @@ -1,49 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include - -#define ErrLocalIsOk() (kLastError == kErrorSuccess) -#define ErrLocalFailed() (kLastError != kErrorSuccess) -#define ErrLocal() (kLastError) - -typedef SInt32 NEW_ERROR_TYPE; - -inline constexpr NEW_ERROR_TYPE kErrorSuccess = 0; -inline constexpr NEW_ERROR_TYPE kErrorExecutable = 33; -inline constexpr NEW_ERROR_TYPE kErrorExecutableLib = 34; -inline constexpr NEW_ERROR_TYPE kErrorFileNotFound = 35; -inline constexpr NEW_ERROR_TYPE kErrorDirectoryNotFound = 36; -inline constexpr NEW_ERROR_TYPE kErrorDiskReadOnly = 37; -inline constexpr NEW_ERROR_TYPE kErrorDiskIsFull = 38; -inline constexpr NEW_ERROR_TYPE kErrorProcessFault = 39; -inline constexpr NEW_ERROR_TYPE kErrorSocketHangUp = 40; -inline constexpr NEW_ERROR_TYPE kErrorThreadLocalStorage = 41; -inline constexpr NEW_ERROR_TYPE kErrorMath = 42; -inline constexpr NEW_ERROR_TYPE kErrorNoNetwork = 43; -inline constexpr NEW_ERROR_TYPE kErrorHeapOutOfMemory = 44; -inline constexpr NEW_ERROR_TYPE kErrorNoSuchDisk = 45; -inline constexpr NEW_ERROR_TYPE kErrorFileExists = 46; -inline constexpr NEW_ERROR_TYPE kErrorFormatFailed = 47; -inline constexpr NEW_ERROR_TYPE kErrorNetworkTimeout = 48; -inline constexpr NEW_ERROR_TYPE kErrorInternal = 49; -inline constexpr NEW_ERROR_TYPE kErrorForkAlreadyExists = 50; -inline constexpr NEW_ERROR_TYPE kErrorOutOfTeamSlot = 51; -inline constexpr NEW_ERROR_TYPE kErrorHeapNotPresent = 52; -inline constexpr NEW_ERROR_TYPE kErrorNoEntrypoint = 53; -inline constexpr NEW_ERROR_TYPE kErrorDiskIsCorrupted = 54; -inline constexpr NEW_ERROR_TYPE kErrorDisk = 55; -inline constexpr NEW_ERROR_TYPE kErrorInvalidData = 56; -inline constexpr NEW_ERROR_TYPE kErrorAsync = 57; -inline constexpr NEW_ERROR_TYPE kErrorNonBlocking = 58; -inline constexpr NEW_ERROR_TYPE kErrorIPC = 59; -inline constexpr NEW_ERROR_TYPE kErrorSign = 60; -inline constexpr NEW_ERROR_TYPE kErrorInvalidCreds = 61; -inline constexpr NEW_ERROR_TYPE kErrorUnimplemented = 0; - -IMPORT_C NEW_ERROR_TYPE kLastError; diff --git a/dev/SCI/Sources/SCIBase.cxx b/dev/SCI/Sources/SCIBase.cxx deleted file mode 100644 index b103886c..00000000 --- a/dev/SCI/Sources/SCIBase.cxx +++ /dev/null @@ -1,7 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#include diff --git a/dev/SCI/Sources/SCIErr.cxx b/dev/SCI/Sources/SCIErr.cxx deleted file mode 100644 index 509ccd6d..00000000 --- a/dev/SCI/Sources/SCIErr.cxx +++ /dev/null @@ -1,9 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#include - -NEW_ERROR_TYPE kLastError = 0; diff --git a/dev/SCI/Sources/base.cxx b/dev/SCI/Sources/base.cxx new file mode 100644 index 00000000..6963a624 --- /dev/null +++ b/dev/SCI/Sources/base.cxx @@ -0,0 +1,7 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include diff --git a/dev/SCI/sci_base.hxx b/dev/SCI/sci_base.hxx new file mode 100644 index 00000000..1d69a56b --- /dev/null +++ b/dev/SCI/sci_base.hxx @@ -0,0 +1,220 @@ +/* ------------------------------------------- + +Copyright ZKA Technologies. + +File: SCIBase.hxx +Purpose: SCI/M core header file (C++) + +------------------------------------------- */ + +#ifndef __SCI_BASE_HXX__ +#define __SCI_BASE_HXX__ + +#include + +#define IMPORT_CXX extern "C++" +#define IMPORT_C extern "C" + +typedef bool Bool; +typedef void UInt0; + +typedef __UINT64_TYPE__ UInt64; +typedef __UINT32_TYPE__ UInt32; +typedef __UINT16_TYPE__ UInt16; +typedef __UINT8_TYPE__ UInt8; + +typedef __SIZE_TYPE__ SizeT; + +typedef __INT64_TYPE__ SInt64; +typedef __INT32_TYPE__ SInt32; +typedef __INT16_TYPE__ SInt16; +typedef __INT8_TYPE__ SInt8; + +typedef void* VoidPtr; +typedef __UINTPTR_TYPE__ UIntPtr; +typedef char Char; + +#include + +#ifdef __SCI_IMPL__ +#include +#else +class UnknownInterface; // Refrenced from an IDB entry. +class UnknownUCLSID; // From the IDB, the constructor of the object, e.g: WordUCLSID. +class UUID; + +/// @brief Allocate new SCM class. +/// @tparam TCLS +/// @tparam UCLSID +/// @param uclsidOfCls +/// @return +template +TCLS* RtlQueryInterface(UCLSID uclsidOfCls, Args... args); + +/// @brief Release SCM class. +/// @tparam TCLS +/// @param cls +/// @return +template +SInt32 RtlReleaseClass(TCLS* cls); + +class __attribute__((uuid("d7c144b6-0792-44b8-b06b-02b227b547df"))) UnknownInterface +{ +public: + explicit UnknownInterface() = default; + virtual ~UnknownInterface() = default; + + UnknownInterface& operator=(const UnknownInterface&) = default; + UnknownInterface(const UnknownInterface&) = default; + + virtual SInt32 Release() = 0; + virtual void RemoveRef() = 0; + virtual UnknownInterface* AddRef() = 0; + virtual VoidPtr QueryInterface(UUID* p_uuid) = 0; +}; + +template +class EventListenerInterface : public ClsID +{ +public: + explicit EventListenerInterface() = default; + virtual ~EventListenerInterface() = default; + + EventListenerInterface& operator=(const EventListenerInterface&) = default; + EventListenerInterface(const EventListenerInterface&) = default; + + virtual EventListenerInterface& operator +=(FnSign arg) = 0; +}; +#endif + +// ------------------------------------------------------------------------------------------ // +/// @note Handle types. +// ------------------------------------------------------------------------------------------ // + +typedef VoidPtr ZKAObject; + +typedef ZKAObject ZKADLLObject; +typedef ZKAObject ZKAIOObject; +typedef ZKAObject ZKASCMObject; +typedef ZKAObject ZKAThreadObject; +typedef ZKAObject ZKASocketObject; + +// ------------------------------------------------------------------------------------------ // + +// ------------------------------------------------------------------------------------------ // +/// @note Part of ZKA loader API. +// ------------------------------------------------------------------------------------------ // + +/// @brief Get function which is part of the DLL. +/// @param symbol the symbol to look for +/// @param dll_handle the DLL handle. +/// @return the proc pointer. +IMPORT_C ZKAObject LdrGetDLLProc(_Input const Char* symbol, _Input ZKAObject dll_handle); + +/// @brief Open DLL handle. +/// @param path +/// @param drv +/// @return +IMPORT_C ZKAObject LdrOpenDLL(_Input const Char* path, _Input const Char* drive_letter); + +/// @brief Close DLL handle +/// @param dll_handle +/// @return +IMPORT_C UInt0 LdrCloseDLL(_Input ZKAObject dll_handle); + +// ------------------------------------------------------------------------------------------ // +// File API. +// ------------------------------------------------------------------------------------------ // + +/// @brief Opens a file from a drive. +/// @param fs_path the filesystem path. +/// @param drive_letter drive name, use NULL to use default one. +/// @return the file descriptor of the file. +IMPORT_C ZKAObject IoOpenFile(const Char* fs_path, const Char* drive_letter); + +/// @brief Closes a file and flushes its content. +/// @param file_desc the file descriptor. +/// @return void. +IMPORT_C UInt0 IoCloseFile(_Input ZKAObject file_desc); + +IMPORT_C UInt32 IoWriteFile(_Input ZKAObject file_desc, _Output VoidPtr out_data, SizeT sz_data); + +IMPORT_C UInt32 IoReadFile(_Input ZKAObject file_desc, _Output VoidPtr* out_data, SizeT sz_data); + +IMPORT_C UInt64 IoRewindFile(_Input ZKAObject file_desc); + +IMPORT_C UInt64 IoTellFile(_Input ZKAObject file_desc); + +IMPORT_C UInt64 IoSeekFile(_Input ZKAObject file_desc, UInt64 file_offset); + +// ------------------------------------------------------------------------ +// TLS API. +// ------------------------------------------------------------------------ + +/// @brief Installs the Thread Information Block and Global Information Block inside the current process. +/// @param void. +/// @return > 0 error ocurred or already present, = 0 success. +IMPORT_C UInt32 TlsInstallIB(UInt0); + +// ------------------------------------------------------------------------ +// SCM API. +// ------------------------------------------------------------------------ + +/// @brief Allocate new SCM object. +/// @tparam TCLS the class type. +/// @tparam UCLSID UCLS factory class type. +/// @param uclsidOfCls UCLS factory class +/// @return TCLS interface +template +TCLS* ScmQueryInterface(_Input UCLSID* uclsidOfCls, _Input Args&&... args); + +/// @brief Release SCM object. +/// @tparam TCLS the class type. +/// @param cls the class to release. +/// @return status code. +template +SInt32 ScmReleaseClass(_Input TCLS* cls); + +/// @brief Creates an SCM instance in the process. +/// @param handle_instance the SCM handle. +/// @param flags the SCM flags. +IMPORT_C SInt32 ScmCreateInstance(_Input UInt32 flags, _Output ZKAObject* handle_instance); + +/// @brief Destroys an SCM instance of the process. +/// @param handle_instance the SCM handle. +IMPORT_C UInt0 ScmDestroyInstance(_Input ZKAObject handle_instance); + +// ------------------------------------------------------------------------ +// Memory Management API. +// ------------------------------------------------------------------------ + +/// @brief Creates a new heap from the process's address space. +/// @param len the length of it. +/// @param flags the flags of it. +/// @return heap pointer. +IMPORT_C VoidPtr RtlCreateHeap(_Input SizeT len, _Input UInt32 flags); + +/// @brief Destroys the pointer +/// @param heap the heap itself. +/// @return void. +IMPORT_C UInt0 RtlDestroyHeap(_Input VoidPtr heap); + +// ------------------------------------------------------------------------ +// Error handling API. +// ------------------------------------------------------------------------ + +IMPORT_C SInt32 ErrGetLastError(UInt0); + +// ------------------------------------------------------------------------ +// Threading API. +// ------------------------------------------------------------------------ + +IMPORT_C UInt0 ThrExitCurrentThread(SInt32 exit_code); +IMPORT_C UInt0 ThrExitMainThread(SInt32 exit_code); + +IMPORT_C UInt0 ThrExitYieldThread(UInt0); + +IMPORT_C UInt0 ThrExitJoinThread(UInt0); +IMPORT_C UInt0 ThrExitDetachThread(UInt0); + +#endif // ifndef __SCI_BASE_HXX__ diff --git a/dev/SCI/sci_err.hxx b/dev/SCI/sci_err.hxx new file mode 100644 index 00000000..a1e56dfd --- /dev/null +++ b/dev/SCI/sci_err.hxx @@ -0,0 +1,47 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#define ErrLocalIsOk() (kLastError == kErrorSuccess) +#define ErrLocalFailed() (kLastError != kErrorSuccess) +#define ErrLocal() (kLastError) + +typedef SInt32 ZKAErr; + +inline constexpr ZKAErr kErrorSuccess = 0; +inline constexpr ZKAErr kErrorExecutable = 33; +inline constexpr ZKAErr kErrorExecutableLib = 34; +inline constexpr ZKAErr kErrorFileNotFound = 35; +inline constexpr ZKAErr kErrorDirectoryNotFound = 36; +inline constexpr ZKAErr kErrorDiskReadOnly = 37; +inline constexpr ZKAErr kErrorDiskIsFull = 38; +inline constexpr ZKAErr kErrorProcessFault = 39; +inline constexpr ZKAErr kErrorSocketHangUp = 40; +inline constexpr ZKAErr kErrorThreadLocalStorage = 41; +inline constexpr ZKAErr kErrorMath = 42; +inline constexpr ZKAErr kErrorNoNetwork = 43; +inline constexpr ZKAErr kErrorHeapOutOfMemory = 44; +inline constexpr ZKAErr kErrorNoSuchDisk = 45; +inline constexpr ZKAErr kErrorFileExists = 46; +inline constexpr ZKAErr kErrorFormatFailed = 47; +inline constexpr ZKAErr kErrorNetworkTimeout = 48; +inline constexpr ZKAErr kErrorInternal = 49; +inline constexpr ZKAErr kErrorForkAlreadyExists = 50; +inline constexpr ZKAErr kErrorOutOfTeamSlot = 51; +inline constexpr ZKAErr kErrorHeapNotPresent = 52; +inline constexpr ZKAErr kErrorNoEntrypoint = 53; +inline constexpr ZKAErr kErrorDiskIsCorrupted = 54; +inline constexpr ZKAErr kErrorDisk = 55; +inline constexpr ZKAErr kErrorInvalidData = 56; +inline constexpr ZKAErr kErrorAsync = 57; +inline constexpr ZKAErr kErrorNonBlocking = 58; +inline constexpr ZKAErr kErrorIPC = 59; +inline constexpr ZKAErr kErrorSign = 60; +inline constexpr ZKAErr kErrorInvalidCreds = 61; +inline constexpr ZKAErr kErrorUnimplemented = 0; + +IMPORT_C ZKAErr kLastError; diff --git a/dev/SCI/sci_hint.hxx b/dev/SCI/sci_hint.hxx new file mode 100644 index 00000000..c785f953 --- /dev/null +++ b/dev/SCI/sci_hint.hxx @@ -0,0 +1,23 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#ifndef __SCI_HINT_HXX__ +#define __SCI_HINT_HXX__ + +#pragma compiler(hint_manifest) + +#define _Input +#define _Output + +#define _Optional + +#define _StrictCheckInput +#define _StrictCheckOutput + +#define _InOut +#define _StrictInOut + +#endif // ifndef __SCI_HINT_HXX__ -- cgit v1.2.3