summaryrefslogtreecommitdiff
path: root/test/filecomp.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-05-11 15:03:43 +0100
committerDaniel Stone <daniel@fooishbar.org>2012-05-11 15:03:43 +0100
commit7b00485a6bc2facdb56ccdaa12b4900f118d66b5 (patch)
tree33b821b995483ddc43a376d56694d6280545e257 /test/filecomp.c
parentf95b41131d4c1815ee4643f5addb1d2d1ad68728 (diff)
downloadxorg-lib-libxkbcommon-7b00485a6bc2facdb56ccdaa12b4900f118d66b5.tar.gz
Rename 'ctx' back to 'context' in external API
Still keep things as 'ctx' internally so we don't have to worry about typing it too often, but rename the user-visible API back as it was kinda ugly. This partially reverts e7bb1e5f. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'test/filecomp.c')
-rw-r--r--test/filecomp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/filecomp.c b/test/filecomp.c
index e595ed5..5465b2c 100644
--- a/test/filecomp.c
+++ b/test/filecomp.c
@@ -40,28 +40,28 @@ static int
test_file(const char *path)
{
int fd;
- struct xkb_ctx *ctx;
+ struct xkb_context *context;
struct xkb_keymap *keymap;
fd = open(path, O_RDONLY);
assert(fd >= 0);
- ctx = xkb_ctx_new(0);
- assert(ctx);
+ context = xkb_context_new(0);
+ assert(context);
fprintf(stderr, "\nCompiling path: %s\n", path);
- keymap = xkb_map_new_from_fd(ctx, fd, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
+ keymap = xkb_map_new_from_fd(context, fd, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
close(fd);
if (!keymap) {
fprintf(stderr, "Failed to compile keymap\n");
- xkb_ctx_unref(ctx);
+ xkb_context_unref(context);
return 0;
}
xkb_map_unref(keymap);
- xkb_ctx_unref(ctx);
+ xkb_context_unref(context);
return 1;
}
@@ -78,22 +78,22 @@ test_file_name(const char *file_name)
static int
test_string(const char *string)
{
- struct xkb_ctx *ctx;
+ struct xkb_context *context;
struct xkb_keymap *keymap;
- ctx = xkb_ctx_new(0);
- assert(ctx);
+ context = xkb_context_new(0);
+ assert(context);
fprintf(stderr, "\nCompiling string\n");
- keymap = xkb_map_new_from_string(ctx, string, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
+ keymap = xkb_map_new_from_string(context, string, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
if (!keymap) {
- xkb_ctx_unref(ctx);
+ xkb_context_unref(context);
return 0;
}
xkb_map_unref(keymap);
- xkb_ctx_unref(ctx);
+ xkb_context_unref(context);
return 1;
}