summaryrefslogtreecommitdiff
path: root/tests/test_input.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-03-20 19:08:29 +0100
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-03-20 19:08:29 +0100
commit4790d9f7ab0cc0d36f4c1d2744a849ca633bd874 (patch)
tree94e05a8740c924517de337cfc16bc4d18e0a8335 /tests/test_input.c
parente7e0744e6e1d869a031188d15e67b7862a3c3f0e (diff)
eloop: move prefix to "ev_" instead of "kmscon_"
The long "kmscon_" prefix is horrible so move everything to "ev_" now. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'tests/test_input.c')
-rw-r--r--tests/test_input.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_input.c b/tests/test_input.c
index a4500b2..f7ceefb 100644
--- a/tests/test_input.c
+++ b/tests/test_input.c
@@ -42,13 +42,13 @@
static bool terminate;
-static void sig_term(struct kmscon_signal *sig, int signum, void *data)
+static void sig_term(struct ev_signal *sig, int signum, void *data)
{
terminate = true;
}
/* Pressing Ctrl-\ should toggle the capturing. */
-static void sig_quit(struct kmscon_signal *sig, int signum, void *data)
+static void sig_quit(struct ev_signal *sig, int signum, void *data)
{
struct kmscon_input *input = data;
@@ -103,9 +103,9 @@ static void input_arrived(struct kmscon_input *input,
int main(int argc, char **argv)
{
int ret;
- struct kmscon_eloop *loop;
+ struct ev_eloop *loop;
struct kmscon_input *input;
- struct kmscon_signal *sigint, *sigquit;
+ struct ev_signal *sigint, *sigquit;
if (!setlocale(LC_ALL, "")) {
log_err("Cannot set locale: %m\n");
@@ -113,7 +113,7 @@ int main(int argc, char **argv)
goto err_out;
}
- ret = kmscon_eloop_new(&loop);
+ ret = ev_eloop_new(&loop);
if (ret) {
log_err("Cannot create eloop\n");
goto err_out;
@@ -125,13 +125,13 @@ int main(int argc, char **argv)
goto err_loop;
}
- ret = kmscon_eloop_new_signal(loop, &sigint, SIGINT, sig_term, NULL);
+ ret = ev_eloop_new_signal(loop, &sigint, SIGINT, sig_term, NULL);
if (ret) {
log_err("Cannot add INT signal\n");
goto err_input;
}
- ret = kmscon_eloop_new_signal(loop, &sigquit, SIGQUIT, sig_quit, input);
+ ret = ev_eloop_new_signal(loop, &sigquit, SIGQUIT, sig_quit, input);
if (ret) {
log_err("Cannot add quit signal\n");
goto err_sigint;
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
system("stty -echo");
while (!terminate) {
- ret = kmscon_eloop_dispatch(loop, -1);
+ ret = ev_eloop_dispatch(loop, -1);
if (ret) {
log_err("Dispatcher failed\n");
break;
@@ -158,13 +158,13 @@ int main(int argc, char **argv)
system("stty echo");
err_sigquit:
- kmscon_eloop_rm_signal(sigquit);
+ ev_eloop_rm_signal(sigquit);
err_sigint:
- kmscon_eloop_rm_signal(sigint);
+ ev_eloop_rm_signal(sigint);
err_input:
kmscon_input_unref(input);
err_loop:
- kmscon_eloop_unref(loop);
+ ev_eloop_unref(loop);
err_out:
return abs(ret);
}