diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/log.c | 12 | ||||
-rw-r--r-- | test/rules-file.c | 12 | ||||
-rw-r--r-- | test/rulescomp.c | 12 |
3 files changed, 18 insertions, 18 deletions
@@ -51,7 +51,7 @@ log_fn(struct xkb_context *ctx, enum xkb_log_level level, { char *s; int size; - darray_char *ls = xkb_get_user_data(ctx); + darray_char *ls = xkb_context_get_user_data(ctx); assert(ls); size = vasprintf(&s, fmt, args); @@ -78,8 +78,8 @@ main(void) assert(ctx); darray_init(log_string); - xkb_set_user_data(ctx, &log_string); - xkb_set_log_fn(ctx, log_fn); + xkb_context_set_user_data(ctx, &log_string); + xkb_context_set_log_fn(ctx, log_fn); log_warn(ctx, "first warning: %d\n", 87); log_info(ctx, "first info\n"); @@ -87,15 +87,15 @@ main(void) log_err(ctx, "first error: %lu\n", 115415UL); log_vrb(ctx, 5, "first verbose 5\n"); - xkb_set_log_level(ctx, XKB_LOG_LEVEL_DEBUG); + xkb_context_set_log_level(ctx, XKB_LOG_LEVEL_DEBUG); log_warn(ctx, "second warning: %d\n", 87); log_dbg(ctx, "second debug: %s %s\n", "hello", "world"); log_info(ctx, "second info\n"); log_err(ctx, "second error: %lu\n", 115415UL); log_vrb(ctx, 6, "second verbose 6\n"); - xkb_set_log_verbosity(ctx, 0); - xkb_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); + xkb_context_set_log_verbosity(ctx, 0); + xkb_context_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); log_warn(ctx, "third warning: %d\n", 87); log_dbg(ctx, "third debug: %s %s\n", "hello", "world"); log_info(ctx, "third info\n"); diff --git a/test/rules-file.c b/test/rules-file.c index b2091de..b3b3b6c 100644 --- a/test/rules-file.c +++ b/test/rules-file.c @@ -92,16 +92,16 @@ static void benchmark(struct xkb_context *ctx) { struct timespec start, stop, elapsed; - enum xkb_log_level old_level = xkb_get_log_level(ctx); - int old_verb = xkb_get_log_verbosity(ctx); + enum xkb_log_level old_level = xkb_context_get_log_level(ctx); + int old_verb = xkb_context_get_log_verbosity(ctx); int i; struct xkb_rule_names rmlvo = { "evdev", "pc105", "us,il", ",", "ctrl:nocaps,grp:menu_toggle", }; struct xkb_component_names kccgst; - xkb_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); - xkb_set_log_verbosity(ctx, 0); + xkb_context_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); + xkb_context_set_log_verbosity(ctx, 0); clock_gettime(CLOCK_MONOTONIC, &start); for (i = 0; i < BENCHMARK_ITERATIONS; i++) { @@ -113,8 +113,8 @@ benchmark(struct xkb_context *ctx) } clock_gettime(CLOCK_MONOTONIC, &stop); - xkb_set_log_level(ctx, old_level); - xkb_set_log_verbosity(ctx, old_verb); + xkb_context_set_log_level(ctx, old_level); + xkb_context_set_log_verbosity(ctx, old_verb); elapsed.tv_sec = stop.tv_sec - start.tv_sec; elapsed.tv_nsec = stop.tv_nsec - start.tv_nsec; diff --git a/test/rulescomp.c b/test/rulescomp.c index e30f539..7318f75 100644 --- a/test/rulescomp.c +++ b/test/rulescomp.c @@ -65,20 +65,20 @@ static void benchmark(struct xkb_context *context) { struct timespec start, stop, elapsed; - enum xkb_log_level old_level = xkb_get_log_level(context); - int old_verb = xkb_get_log_verbosity(context); + enum xkb_log_level old_level = xkb_context_get_log_level(context); + int old_verb = xkb_context_get_log_verbosity(context); int i; - xkb_set_log_level(context, XKB_LOG_LEVEL_CRITICAL); - xkb_set_log_verbosity(context, 0); + xkb_context_set_log_level(context, XKB_LOG_LEVEL_CRITICAL); + xkb_context_set_log_verbosity(context, 0); clock_gettime(CLOCK_MONOTONIC, &start); for (i = 0; i < BENCHMARK_ITERATIONS; i++) assert(test_rmlvo_silent(context, "evdev", "evdev", "us", "", "")); clock_gettime(CLOCK_MONOTONIC, &stop); - xkb_set_log_level(context, old_level); - xkb_set_log_verbosity(context, old_verb); + xkb_context_set_log_level(context, old_level); + xkb_context_set_log_verbosity(context, old_verb); elapsed.tv_sec = stop.tv_sec - start.tv_sec; elapsed.tv_nsec = stop.tv_nsec - start.tv_nsec; |