<commit_before>/*
 * Keyman is copyright (C) SIL International. MIT License.
 *
 * Keyman Core - KMX Debugger
 *
 * Functions for preparing kmx debug events
 */

#include <kmx/kmx_processor.h>

using namespace km::kbp;
using namespace kmx;

void KMX_DebugItems::push_item(uint8_t type, uint32_t flags, LPGROUP group, LPKEY key, PKMX_WCHAR context) {
  _items->assert_push_entry();
  km_kbp_state_debug_item item = {type, flags};
  item.kmx_info.rule = key;
  u16ncpy(item.kmx_info.context, context, DEBUG_MAX_CONTEXT - 1);
  item.kmx_info.context[DEBUG_MAX_CONTEXT-1] = 0;
  item.kmx_info.group = group;
  _items->emplace_back(item);
}<commit_msg>chore(common): rename header<commit_after>/*
 * Keyman is copyright (C) SIL International. MIT License.
 *
 * Keyman Core - KMX Debugger
 *
 * Functions for preparing kmx debug events
 */

#include <kmx/kmx_processevent.h>

using namespace km::kbp;
using namespace kmx;

void KMX_DebugItems::push_item(uint8_t type, uint32_t flags, LPGROUP group, LPKEY key, PKMX_WCHAR context) {
  _items->assert_push_entry();
  km_kbp_state_debug_item item = {type, flags};
  item.kmx_info.rule = key;
  u16ncpy(item.kmx_info.context, context, DEBUG_MAX_CONTEXT - 1);
  item.kmx_info.context[DEBUG_MAX_CONTEXT-1] = 0;
  item.kmx_info.group = group;
  _items->emplace_back(item);
}
{'fraction_non_alphanumeric': 0.11509146341463415, 'fraction_numerical': 0.012195121951219513, 'mean_word_length': 4.9411764705882355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5001984', 'n_tokens_mistral': 503, 'n_tokens_neox': 490, 'n_words': 110}