Commit graph

17 commits

Author SHA1 Message Date
Marc Durdin
669ca4b6fd chore(common): remove clearcontext,fix,switch,key statements
Remove compiler support for `clearcontext`, `fix`, `switch` statements
and remove corresponding `CODE_` definitions, as well as `CODE_KEY`,
which was never used.

These four statements have never been documented and have either never
been implemented, or long been unsupported. An earlier change (#16445)
marked `clearcontext` and `fix` as deprecated for v19 onwards, but
deprecation for an undocumented language feature is an unnecessary step,
so have opted to remove altogether in v19 to reduce complexity. This
means that `VERSION_190` is used now only for compile target
deprecations.

Follows: #16445
Test-bot: skip
2026-10-05 08:09:12 +02:00
Marc Durdin
620d736c0e chore(common): move CODE__SIZE declaration to common
Remove duplicate CODE__SIZE C++ declarations.

Test-bot: skip
2026-10-03 12:17:39 +02:00
Marc Durdin
babb473682 fix(developer): handle leading whitespace correctly in u16tok()
A string with leading delimiters passed into `u16tok()` would not skip
those delimiters. This impacted `&targets` store and other locations.

Note that this tightens input parameter checks for delimiters and
context as well.

Fixes: #13721
Test-bot: skip
2026-08-27 11:15:14 +02:00
Marc Durdin
94723ba556 chore(common): move common cpp files and remove unused files
* Move the following files from common/windows/cpp/include/ to
  common/include/:
  * keymanversion.h
  * vkeys.h

* Move the following file from common/windows/cpp/ to common/cpp/:
  * vkeys.cpp

* Move crc32.cpp,crc32.h into kmcmplib, as they are only used there.

* Remove unused ConvertUTF.c and ConvertUTF.h.

* Update references to the above files.

* Remove precompiled header refs from vkeys.cpp and change data type to
  `char*` for types in vkeys.cpp (unless `USE_CHAR16_T` is defined), so
  that it is more cross-platform accessible, update usages accordingly,
  fixup project definitions accordingly.

* Remove unused define `KMN_KBP_EXPORTING` from kmcmplib/meson.build.

Fixes: #15565
Test-bot: skip
2026-05-20 13:44:05 +02:00
Dr Mark C. Sinclair
74d334afd1 fix(developer): changes to better align the code in u16ltrim and u16rtrim 2024-09-10 11:13:42 +01:00
Dr Mark C. Sinclair
cfdd131129 fix(developer): remove now unnecessary cast in u16trim 2024-09-10 11:06:35 +01:00
Dr Mark C. Sinclair
ea545dc05a fix(developer): shorten u16ltrim code, and add additional asserts to check pointer returned 2024-09-10 10:58:24 +01:00
Dr Mark C. Sinclair
510e5aabd5 fix(developer): modify u16ltrim to copy non-trimmed characters to beginning of string 2024-09-10 10:56:53 +01:00
Dr Mark C. Sinclair
52f0897693 fix(developer): add doc comment to u16trim 2024-09-05 14:32:16 +01:00
Dr Mark C. Sinclair
b902c43ff2 fix(developer): add doc comment to u16rtrim 2024-09-05 14:32:05 +01:00
Dr Mark C. Sinclair
aa6db34ae2 fix(developer): add doc comment to u16ltrim 2024-09-05 14:31:56 +01:00
Dr Mark C. Sinclair
b2768dda52 fix(developer): add include for wctype.h in km_u16.cpp to try and address linux build failure 2024-08-29 19:11:56 +01:00
Dr Mark C. Sinclair
03293bcede fix(developer): add u16rtrim test 2024-08-29 18:18:27 +01:00
Dr Mark C. Sinclair
11a9338671 fix(developer): add test for u16ltrim 2024-08-29 16:40:41 +01:00
Dr Mark C. Sinclair
f4115a30dc fix(developer): add u16ltrim(), u16rtrim() and u16trim() to km_u16.cpp and km_u16.h 2024-08-29 15:46:41 +01:00
Marc Durdin
dde4e2b2c3 refactor: move kmx_u16 to common and rename to km_u16 2024-08-14 10:07:08 +02:00
Marc Durdin
613bdb6c19 refactor(core): move utfcodec to common
Refactor to support codecvt cleanup work in kmcmplib.
2024-08-13 15:04:07 +02:00