From 34057b60b66723009291149f0c11e7e76fd19d58 Mon Sep 17 00:00:00 2001 From: Ratin Gao Date: Mon, 23 Sep 2024 21:57:07 +0800 Subject: [PATCH] [PACKAGE] Refactor, move "Extension" to "Package" --- Source/Include/KNSoft/NDK/NDK.h | 2 +- Source/Include/KNSoft/NDK/NT/Extension/Security.h | 2 +- Source/Include/KNSoft/NDK/{Extension => Package}/CPUID.h | 9 ++++++++- .../KNSoft/NDK/{Extension => Package}/Extension.h | 4 +++- .../Include/KNSoft/NDK/{Extension => Package}/SMBIOS.h | 3 ++- .../Include/KNSoft/NDK/{Extension => Package}/StrSafe.h | 3 ++- .../Include/KNSoft/NDK/{UnitTest => Package}/UnitTest.h | 5 +++-- .../KNSoft/NDK/{UnitTest => Package}/UnitTest.inl | 4 ++-- 8 files changed, 22 insertions(+), 10 deletions(-) rename Source/Include/KNSoft/NDK/{Extension => Package}/CPUID.h (97%) rename Source/Include/KNSoft/NDK/{Extension => Package}/Extension.h (94%) rename Source/Include/KNSoft/NDK/{Extension => Package}/SMBIOS.h (97%) rename Source/Include/KNSoft/NDK/{Extension => Package}/StrSafe.h (92%) rename Source/Include/KNSoft/NDK/{UnitTest => Package}/UnitTest.h (93%) rename Source/Include/KNSoft/NDK/{UnitTest => Package}/UnitTest.inl (95%) diff --git a/Source/Include/KNSoft/NDK/NDK.h b/Source/Include/KNSoft/NDK/NDK.h index 3684883..8d0b6f3 100644 --- a/Source/Include/KNSoft/NDK/NDK.h +++ b/Source/Include/KNSoft/NDK/NDK.h @@ -31,5 +31,5 @@ /* Enable extensions */ #ifndef _KNSOFT_NDK_NO_EXTENSION -#include "Extension/Extension.h" +#include "Package/Extension.h" #endif diff --git a/Source/Include/KNSoft/NDK/NT/Extension/Security.h b/Source/Include/KNSoft/NDK/NT/Extension/Security.h index 6fe7b64..afd43f4 100644 --- a/Source/Include/KNSoft/NDK/NT/Extension/Security.h +++ b/Source/Include/KNSoft/NDK/NT/Extension/Security.h @@ -1,7 +1,7 @@ #pragma once #include "../MinDef.h" -#include "../../Extension/Extension.h" +#include "../../Package/Extension.h" /* Well-known SIDs */ diff --git a/Source/Include/KNSoft/NDK/Extension/CPUID.h b/Source/Include/KNSoft/NDK/Package/CPUID.h similarity index 97% rename from Source/Include/KNSoft/NDK/Extension/CPUID.h rename to Source/Include/KNSoft/NDK/Package/CPUID.h index d46fd36..527c83a 100644 --- a/Source/Include/KNSoft/NDK/Extension/CPUID.h +++ b/Source/Include/KNSoft/NDK/Package/CPUID.h @@ -1,4 +1,11 @@ -#pragma once +/* + * KNSoft.NDK CPUID.h package, licensed under the MIT license. + * Copyright (c) KNSoft.org (https://github.com/KNSoft). All rights reserved. + * + * Intel CPUID Specification. + */ + +#pragma once #define CPUID_INTEL_VERSION_INFO_MASK 0xFFF3FF0 // Extended Family ID | Extended Model ID | Processor Type | Family ID | Model #define CPUID_MAKE_INTEL_VERSION_INFO(ExtendedFamilyId, ExtendedModelId, ProcessorType, FamilyId, Model, SteppingId)\ diff --git a/Source/Include/KNSoft/NDK/Extension/Extension.h b/Source/Include/KNSoft/NDK/Package/Extension.h similarity index 94% rename from Source/Include/KNSoft/NDK/Extension/Extension.h rename to Source/Include/KNSoft/NDK/Package/Extension.h index c1bb7c4..221f237 100644 --- a/Source/Include/KNSoft/NDK/Extension/Extension.h +++ b/Source/Include/KNSoft/NDK/Package/Extension.h @@ -1,4 +1,6 @@ -#pragma once +/* KNSoft.NDK extension package, native addendum */ + +#pragma once #ifdef _KNSOFT_NDK_NO_EXTENSION #pragma message("KNSoft.NDK: Extension.h is included but _KNSOFT_NDK_NO_EXTENSION is defined.") diff --git a/Source/Include/KNSoft/NDK/Extension/SMBIOS.h b/Source/Include/KNSoft/NDK/Package/SMBIOS.h similarity index 97% rename from Source/Include/KNSoft/NDK/Extension/SMBIOS.h rename to Source/Include/KNSoft/NDK/Package/SMBIOS.h index 23d0018..5dc40a9 100644 --- a/Source/Include/KNSoft/NDK/Extension/SMBIOS.h +++ b/Source/Include/KNSoft/NDK/Package/SMBIOS.h @@ -1,5 +1,6 @@ /* - * KNSoft.NDK SMBIOS.h licensed under the MIT license. + * KNSoft.NDK SMBIOS.h package, licensed under the MIT license. + * Copyright (c) KNSoft.org (https://github.com/KNSoft). All rights reserved. * * SMBIOS Specification (https://www.dmtf.org/standards/smbios) * diff --git a/Source/Include/KNSoft/NDK/Extension/StrSafe.h b/Source/Include/KNSoft/NDK/Package/StrSafe.h similarity index 92% rename from Source/Include/KNSoft/NDK/Extension/StrSafe.h rename to Source/Include/KNSoft/NDK/Package/StrSafe.h index d8378cd..93e29b1 100644 --- a/Source/Include/KNSoft/NDK/Extension/StrSafe.h +++ b/Source/Include/KNSoft/NDK/Package/StrSafe.h @@ -1,5 +1,6 @@ /* - * KNSoft.NDK StrSafe.h licensed under the MIT license. + * KNSoft.NDK StrSafe.h package, licensed under the MIT license. + * Copyright (c) KNSoft.org (https://github.com/KNSoft). All rights reserved. * * Make C string routines a bit more safe and easy. * Not equals to the strsafe.h in Windows SDK. diff --git a/Source/Include/KNSoft/NDK/UnitTest/UnitTest.h b/Source/Include/KNSoft/NDK/Package/UnitTest.h similarity index 93% rename from Source/Include/KNSoft/NDK/UnitTest/UnitTest.h rename to Source/Include/KNSoft/NDK/Package/UnitTest.h index e6a4243..67374ee 100644 --- a/Source/Include/KNSoft/NDK/UnitTest/UnitTest.h +++ b/Source/Include/KNSoft/NDK/Package/UnitTest.h @@ -1,7 +1,8 @@ /* - * KNSoft.NDK.UnitTest - Lite weight unit test framework + * KNSoft.NDK UnitTest.h package, licensed under the MIT license. * Copyright (c) KNSoft.org (https://github.com/KNSoft). All rights reserved. - * Licensed under the MIT license. + * + * Lite weight unit test framework. */ #pragma once diff --git a/Source/Include/KNSoft/NDK/UnitTest/UnitTest.inl b/Source/Include/KNSoft/NDK/Package/UnitTest.inl similarity index 95% rename from Source/Include/KNSoft/NDK/UnitTest/UnitTest.inl rename to Source/Include/KNSoft/NDK/Package/UnitTest.inl index 12e83ce..0b2b776 100644 --- a/Source/Include/KNSoft/NDK/UnitTest/UnitTest.inl +++ b/Source/Include/KNSoft/NDK/Package/UnitTest.inl @@ -1,9 +1,9 @@ #pragma once -#include "./UnitTest.h" +#include "UnitTest.h" #include "../NT/NT.h" -#include "../Extension/StrSafe.h" +#include "StrSafe.h" #pragma region Prints