Commit graph

384 commits

Author SHA1 Message Date
rc-swag
51a462cff2 chore(windows): Merge branch 'master' into chore/windows/10052/remove-cached-context 2023-11-30 17:26:09 +10:00
rc-swag
d5963e05b6 fix: check for null termination
Determine the best way to check for null termination all compilers
2023-11-30 14:31:18 +10:00
rc-swag
35064073c1 chore(windows): Merge branch 'master' into chore/windows/10052/remove-cached-context 2023-11-30 13:58:19 +10:00
rc-swag
9e1f73573e
fix(core): review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-11-30 13:56:01 +10:00
rc-swag
6820f36f7d fix(core): set_if_needed updates a empty cached context
In the case when the cached context had been cleared the
km_core_state_context_set_if_needed call would just compare
the null terminations of both strings and not set the cached
context to the application context.
2023-11-30 13:09:22 +10:00
Marc Durdin
7ec4832edc fix(core): memory management of options in action struct
Fixes #10067.

Management of memory for persisted options was wrong in the action
struct, as the members key and value would be freed immediately after
being added to the temporary vector (because the vector was of the
struct rather than of the class).

Given the struct is a C struct, we need the memory management to be
explicit, so we now release() each option into the vector as we create
it, which means that its member values will not be freed when the option
is then immediately deleted. (This allows us to use the initial copy of
the members of option that option() constructor does.)

Added the release() function as that was a relatively clear way of
indicating that the contents of the structure are now owned by the
caller, following the pattern from std::unique_ptr.

Finally, the unit test for persisted options was in the action_api.cpp
test module, but it was never called, so this was not being tested. Now
it is.
2023-11-24 07:52:31 +10:00
rc-swag
4480a05412 chore(windows): removed cached context windows engine
Removed the cached context from the windows engine
2023-11-23 16:58:41 +10:00
Marc Durdin
958fb6a5c9 chore: add comment 2023-11-23 11:58:41 +10:00
Marc Durdin
21e0254c95 chore(core): remove vkey output from kmx processor
Fixes #10049.

vkey output was never supported by Core, so this code effectively was a
no-op.
2023-11-23 11:51:22 +10:00
Steven R. Loomis
350eb83ab3 feat(core): ldml typedef for reorder weights 🙀
For: #9707
2023-11-16 16:13:48 -06:00
Steven R. Loomis
3cd6c7630c feat(core): ldml tertiary reorder 🙀
- handle case where there's no tertiary base before the first char
- separate some element API tests from the actual tertiary test.  Tests were failing because of now-correct implementation.

Fixes: #9707
2023-11-16 13:55:49 -06:00
Steven R. Loomis
f7566c7356 feat(core): ldml tertiary reorder 🙀
- implemented tertiary reordering
- reinstated bengali reordering!
- fixed reordering to be longest-first (by sorting the list before applying)
- updated debug logging

Fixes: #9707
2023-11-16 12:31:08 -06:00
Steven R. Loomis
e9e5665cb8 feat(core): ldml backspace transform 🙀
- refactor transform/normalization inner routine

For: #9450
2023-11-16 12:27:23 -06:00
Steven R. Loomis
d0c8ea5c88 feat(core): ldml backspace transform 🙀
- refactor keypress some (needs more)
- copypasta implementation of backspace transform

For: #9450
2023-11-16 12:25:15 -06:00
Steven R. Loomis
4bbafa6903 feat(core): marker normalization 🙀
- literally a bad assert. the error case is handled below, in fact the unit test tests for it.
- for some reason, assert.h wasn't included in some cases locally.

For: #9468
2023-11-16 12:11:41 -06:00
Steven R. Loomis
07a4821336 feat(core): marker normalization 🙀
- a little further
- couple places where "it wasn't plugged in"
- adding some LDML-TODOs - marker creep
- fixed one unnecessary alloc/dealloc

For: #9468
2023-11-15 17:00:04 -06:00
Steven R. Loomis
2f843d98f3 feat(core): marker normalization 🙀
- go back to NFD for the context, for now
- anticipating when the privatecontext is NFD but the public context is NFC
- also update the test cases

For: #9468
2023-11-14 16:36:15 -06:00
Steven R. Loomis
7b481945e6 feat(core): test fix 🙀
- fix a cast
- fix some test cases

For: #9468
2023-11-14 07:28:57 -06:00
Steven R. Loomis
78c2ac4aec feat(core): ldml marker normalization 🙀
- refactor out backspace processing into a function.
- for now, just drop any markers in the context when we're lopping off the end

For: #9468
2023-11-14 07:28:41 -06:00
Steven R. Loomis
a69feb583f feat(core): ldml marker normalization 🙀
- km::kbp is soooo last month!
- test_transforms can run NFD with markers, with some caveats.

For: #9468
2023-11-14 07:28:10 -06:00
Steven R. Loomis
015a738226 feat(core): ldml marker normalization 🙀
- add a new remove_markers(std::u32string) function
- add test cases for text utils
- update (failing) test cases for transform
- improve documentation of append process
- support KM_CORE_BT_UNKNOWN in ldml test
- remove_markers with a map
- update normalize test

For: #9468
2023-11-14 07:26:47 -06:00
Steven R. Loomis
eb705ba312 feat(core): dx: 32 bit Debug_UnicodeString() 🙀
For: #10004
2023-11-14 07:17:01 -06:00
Steven R. Loomis
f72c571696
Merge branch 'master' into chore/developer/9838-cldr44-epic-ldml 2023-10-26 18:38:14 -05:00
Steven R. Loomis
d349959dea chore(core): ldml update to prefinal v44 🙀
- drop name section
- drop flick flags
- drop normalization,add name to meta
- debug printf fix
- assertion fix for display

For feat(developer): ldml re-sync with CLDR v44 spec 🙀  #9838
2023-10-26 18:35:55 -05:00
Marc Durdin
8475b68248 feat(core): make persist_options always point to a valid array 2023-10-25 05:46:43 +07:00
Marc Durdin
8223792404 chore(core): rename kbp to core 2023-10-25 05:30:22 +07:00
Steven R. Loomis
1ff2bfc4d7 chore(developer,common,core): ldml update to prefinal v44 🙀
- more data file updates
- now updating some developer files
- updating the KMX+ spec with some changes.
 (vkey was dropped in #7135, remove it from the spec)

For feat(developer): ldml re-sync with CLDR v44 spec 🙀  #9838
2023-10-24 17:28:08 -05:00
Marc Durdin
82177013e9 chore(core): Merge branch 'master' into feat/core/9720-actions-apis 2023-10-24 20:55:10 +07:00
Marc Durdin
40ca1d1ed8 chore(core): address review comments 2023-10-24 20:53:44 +07:00
Marc Durdin
69e92f312a chore(core): rename to code_points_to_delete 2023-10-24 13:46:52 +07:00
Marc Durdin
243d1a8417 chore(core): cross-platform differences again 2023-10-24 12:33:52 +07:00
Marc Durdin
cd428ae412 feat(core): address review comments
* Renamed various functions and types
* Clarified return values
* Updated doc comments
2023-10-24 12:22:34 +07:00
Marc Durdin
0aa86501c6 chore(core): fix types and compile errors
Fixes #9832. Addresses a couple of other cross-platform compile issues.
2023-10-24 09:25:08 +07:00
Marc Durdin
051e9f2b4d chore(core): c++ ftw 2023-10-23 15:16:59 +07:00
Marc Durdin
61330ba06d feat(core): new actions APIs
Fixes #9720.

Note: this will deprecate a number of Keyman Core APIs -- pretty much
all existing action and context APIs. Deprecation marks will come in a
follow-up commit.
2023-10-23 15:01:55 +07:00
Eberhard Beilharz
2e5e586860
chore(linux): Rename libkmnkbp0-0 package
Also removes the temporary libkeymancore/libkmnkbp hack that we put in
for packaging GHA.

Closes #9733.
2023-10-20 17:31:39 +02:00
Eberhard Beilharz
f4d8529789
chore(linux): rename keyboardprocessor_ldml.* to keyman_core_ldml 2023-10-20 17:30:10 +02:00
Eberhard Beilharz
7369b22599
chore(linux): Merge with chore/linux/9733_RenameLibknmkbp
# Conflicts:
#	core/src/debuglog.h
#	core/src/ldml/ldml_processor.cpp
#	core/src/ldml/ldml_transforms.cpp
#	core/src/ldml/ldml_transforms.hpp
#	core/tests/unit/ldml/ldml.cpp
2023-10-20 12:52:38 +02:00
Eberhard Beilharz
fdc9baadb2
chore(linux): Merge remote-tracking branch 'origin/master' into chore/linux/9733_RenameLibknmkbp 2023-10-20 12:31:14 +02:00
Eberhard Beilharz
b177df2ceb
Merge pull request #9794 from keymanapp/chore/linux/9733_RenameDefines
chore(linux): Rename KBP to CORE 〽️
2023-10-20 12:29:24 +02:00
Eberhard Beilharz
a126806597
Update core/src/version.rc
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-10-20 09:34:16 +02:00
Steven R. Loomis
4cdc2c3b54 fix(core): ldml more updates to normalization per review 🙀
- reduce function depth
- catch another gotcha (valid was being overwritten)

For: #9468
2023-10-19 17:10:01 -05:00
Steven R. Loomis
1d9820b020 fix(core): ldml more updates to normalization per review 🙀
- improve assert failure handling- fix a potential heap leak

For: #9468
2023-10-19 13:33:55 -05:00
Steven R. Loomis
4afe0387d6 fix(core): ldml more updates to normalization per review 🙀
- move meat of uassert_success() into an inline

For: #9468
2023-10-19 13:16:03 -05:00
Eberhard Beilharz
604fbc1a75
chore(linux): Rename namespace kbp to core 2023-10-19 10:39:55 +02:00
Eberhard Beilharz
52bb859817
chore(linux): Rename (lib)kmnkbp to (lib)keymancore 2023-10-19 10:35:09 +02:00
Eberhard Beilharz
2f073f7778
chore(linux): Rename KMN_CORE to KM_CORE_LIBRARY 2023-10-19 08:51:29 +02:00
Steven R. Loomis
3723e6b3d7 fix(core): ldml more updates to normalization per review 🙀
- consistency

For: #9468
2023-10-18 17:58:05 -05:00
Steven R. Loomis
c4c73611bd
Merge branch 'master' into feat/core/9468-normalization-epic-ldml 2023-10-18 17:55:29 -05:00
Steven R. Loomis
f1b12a1848 fix(core): ldml more updates to normalization per review 🙀
- refactor internal normalization call

For: #9468
2023-10-18 17:55:08 -05:00