after some conflicts were solved

This commit is contained in:
Sabine 2021-09-21 22:12:31 +02:00
commit 7859535c44
3 changed files with 9 additions and 19 deletions

View file

@ -143,6 +143,10 @@ const int CODE_PTR[2][14] = {
CODE_IFSYSTEMSTORE, CODE_SETOPT, CODE_SETSYSTEMSTORE, CODE_RESETOPT, CODE_SAVEOPT},
{3, 3, 4, 3, 3, 3, 3, 3, 5, 5, 4, 4, 3, 3}};
const int CODE_PTR[2][14] = {
{CODE_ANY, CODE_NOTANY, CODE_INDEX, CODE_USE, CODE_DEADKEY, CODE_CLEARCONTEXT, CODE_CALL, CODE_CONTEXTEX, CODE_IFOPT,
CODE_IFSYSTEMSTORE, CODE_SETOPT, CODE_SETSYSTEMSTORE, CODE_RESETOPT, CODE_SAVEOPT},
{3, 3, 4, 3, 3, 3, 3, 3, 5, 5, 4, 4, 3, 3}};
inline KMX_BOOL ShouldDebug() {
return g_debug_KeymanLog;
}

View file

@ -116,7 +116,6 @@ km_kbp_cp *km::kbp::kmx::u16tok(km_kbp_cp *p, km_kbp_cp ch, km_kbp_cp **ctx) {
*
* xstrlen calculates the length of a string, ignoring some special chars.
*/
PKMX_WCHAR km::kbp::kmx::incxstr(PKMX_WCHAR p) {
if (*p == 0)
@ -154,6 +153,7 @@ PKMX_WCHAR km::kbp::kmx::incxstr(PKMX_WCHAR p) {
return p;
}
PKMX_WCHAR km::kbp::kmx::decxstr(PKMX_WCHAR p, PKMX_WCHAR pStart)
{
if(p <= pStart) {

View file

@ -215,15 +215,12 @@ void test_incxstr() {
}
constexpr const auto help_str = "\
debug_api [--color] <SOURCE_PATH>|--print-sizeof\n\
test_kmx_xstring [--color]\n\
\n\
--color Force color output\n\
--print-sizeof Emit structure sizes for interop debug\n\
SOURCE_PATH Path where debug_api.cpp is found; kmx files are\n\
located relative to this path.\n";
--color Force color output\n";
int error_args() {
std::cerr << "debug_api: Invalid arguments." << std::endl;
std::cerr << "test_kmx_xstring: Invalid arguments." << std::endl;
std::cout << help_str;
return 1;
}
@ -233,23 +230,12 @@ int main(int argc, char *argv []) {
// Global setup
//std::string path(argv[1]);
if(argc < 2) {
return error_args();
}
auto arg_color = std::string(argv[1]) == "--color";
if(arg_color && argc < 3) {
return error_args();
}
auto arg_color = argc > 1 && std::string(argv[1]) == "--color";
console_color::enabled = console_color::isaterminal() || arg_color;
//arg_path = argv[arg_color ? 2 : 1];
test_incxstr();
// Destroy them
//teardown();
return 0;
}