diff options
| author | robojumper <robojumper@gmail.com> | 2025-04-10 02:14:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-10 02:14:42 +0200 |
| commit | f0b44e341d3fc9a34e1b49e2d4cd2f6d2eb26484 (patch) | |
| tree | 6e515f071956e5b821e51b7cb5db90fcad9b2b19 /src/libms | |
| parent | 17fe773653dffb5463d3ba4cf7d2f30038f34855 (diff) | |
| parent | 6feb6a95c6e1b523a31fb1616207c02d63b10cbe (diff) | |
Merge pull request #148 from robojumper/d_lyt_msg_window
various window files OK
Diffstat (limited to 'src/libms')
| -rw-r--r-- | src/libms/msgfile.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libms/msgfile.c b/src/libms/msgfile.c index 4304d381..c151d206 100644 --- a/src/libms/msgfile.c +++ b/src/libms/msgfile.c @@ -30,7 +30,7 @@ void LMS_CloseMessage(struct MsbtInfo *info) { LMSi_Free(info); } -int LMS_GetTextIndexByLabel(struct MsbtInfo *info, const char *label) { +int LMS_GetTextIndexByLabel(const struct MsbtInfo *info, const char *label) { if (info->lbl1Index == -1) { return -2; } else { @@ -38,7 +38,7 @@ int LMS_GetTextIndexByLabel(struct MsbtInfo *info, const char *label) { } } -const char *LMS_GetText(struct MsbtInfo *info, int index) { +const wchar_t *LMS_GetText(const struct MsbtInfo *info, int index) { if (info->txt2Index == -1) { return NULL; } @@ -48,10 +48,10 @@ const char *LMS_GetText(struct MsbtInfo *info, int index) { return NULL; } - return &((const char *)header)[header[index + 1]]; + return (const wchar_t*)&((const char *)header)[header[index + 1]]; } -const char *LMS_GetTextByLabel(struct MsbtInfo *info, const char *label) { +const wchar_t *LMS_GetTextByLabel(const struct MsbtInfo *info, const char *label) { int index = LMS_GetTextIndexByLabel(info, label); if (index < 0) { return NULL; @@ -60,11 +60,11 @@ const char *LMS_GetTextByLabel(struct MsbtInfo *info, const char *label) { } } -const char *LMS_GetLabelByTextIndex(struct MsbtInfo *info, int index) { +const char *LMS_GetLabelByTextIndex(const struct MsbtInfo *info, int index) { // TODO } -struct MsbtAttrInfo *LMS_GetAttribute(struct MsbtInfo *info, int index) { +struct MsbtAttrInfo *LMS_GetAttribute(const struct MsbtInfo *info, int index) { int *p = info->base.sectionInfos[info->atr1Index].ptr; return (struct MsbtAttrInfo *)&((const char *)p)[p[1] * index + 8]; } |
