diff options
| author | Elijah Thomas <42302100+elijah-thomas774@users.noreply.github.com> | 2024-10-16 15:36:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-16 15:36:02 -0400 |
| commit | 26af4db82da23364961ebb440efba88846240731 (patch) | |
| tree | 9cfe6a427cfe59c13c64928ccef6ba3c5ccfec21 /src/libms | |
| parent | 4543ec129ec02649b24ae0e20d8325a5f066c9b1 (diff) | |
update from dtk-template - clangd :) (#66)
* update from dtk-template and start work towards using clangd
* include <a> -> "a"
* Update build.yml
* remove/add non-trivial class in union warning
Diffstat (limited to 'src/libms')
| -rw-r--r-- | src/libms/commonlib.c | 14 | ||||
| -rw-r--r-- | src/libms/flowfile.c | 6 | ||||
| -rw-r--r-- | src/libms/libms.c | 2 | ||||
| -rw-r--r-- | src/libms/msgfile.c | 10 |
4 files changed, 18 insertions, 14 deletions
diff --git a/src/libms/commonlib.c b/src/libms/commonlib.c index 3343ec18..d3ab83d7 100644 --- a/src/libms/commonlib.c +++ b/src/libms/commonlib.c @@ -1,5 +1,7 @@ -#include <libms/commonlib.h> -#include <libms/libms.h> +#include "libms/commonlib.h" + +#include "libms/libms.h" + void LMSi_AnalyzeMessageHeader(struct MsbInfo *info) { info->version = info->header->version; @@ -12,8 +14,8 @@ void LMSi_AnalyzeMessageHeader(struct MsbInfo *info) { info->fileLength = info->header->fileLength; } -inline static struct MsbBlockHeader* GetBlockHeader(struct MsbInfo *info, int offset) { - return (struct MsbBlockHeader*)(offset + (unsigned int)info->header); +inline static struct MsbBlockHeader *GetBlockHeader(struct MsbInfo *info, int offset) { + return (struct MsbBlockHeader *)(offset + (unsigned int)info->header); } void LMSi_AnalyzeMessageBlocks(struct MsbInfo *info) { @@ -29,9 +31,9 @@ void LMSi_AnalyzeMessageBlocks(struct MsbInfo *info) { section->name[3] = GetBlockHeader(info, offset)->name[3]; section->sectionLength = GetBlockHeader(info, offset)->sectionLength; section->field_0x0C = GetBlockHeader(info, offset)->field_0x08; - offset = offset + 0x10; // section header + offset = offset + 0x10; // section header offset = offset + section->sectionLength; // section - offset = ROUND_UP(offset, 0x10); // align + offset = ROUND_UP(offset, 0x10); // align } } diff --git a/src/libms/flowfile.c b/src/libms/flowfile.c index 21f7ea78..d25151b5 100644 --- a/src/libms/flowfile.c +++ b/src/libms/flowfile.c @@ -1,7 +1,7 @@ -#include <libms/commonlib.h> -#include <libms/flowfile.h> -#include <libms/libms.h> +#include "libms/flowfile.h" +#include "libms/commonlib.h" +#include "libms/libms.h" struct MsbfInfo { /* 0x00 */ struct MsbInfo base; diff --git a/src/libms/libms.c b/src/libms/libms.c index 01ee4567..2b77adc3 100644 --- a/src/libms/libms.c +++ b/src/libms/libms.c @@ -1,4 +1,4 @@ -#include <libms/libms.h> +#include "libms/libms.h" static void *(*MSB_ALLOC_FUNC)(size_t size); static void (*MSB_FREE_FUNC)(void *arg); diff --git a/src/libms/msgfile.c b/src/libms/msgfile.c index 738002c3..4304d381 100644 --- a/src/libms/msgfile.c +++ b/src/libms/msgfile.c @@ -1,6 +1,8 @@ -#include <libms/commonlib.h> -#include <libms/libms.h> -#include <libms/msgfile.h> +#include "libms/msgfile.h" + +#include "libms/commonlib.h" +#include "libms/libms.h" + struct MsbtInfo { /* 0x00 */ struct MsbInfo base; @@ -64,5 +66,5 @@ const char *LMS_GetLabelByTextIndex(struct MsbtInfo *info, int index) { struct MsbtAttrInfo *LMS_GetAttribute(struct MsbtInfo *info, int index) { int *p = info->base.sectionInfos[info->atr1Index].ptr; - return (struct MsbtAttrInfo*)&((const char *)p)[p[1] * index + 8]; + return (struct MsbtAttrInfo *)&((const char *)p)[p[1] * index + 8]; } |
