Skip to content

Commit 23236b1

Browse files
Fixed examples.
1 parent 8509fd8 commit 23236b1

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

examples/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ all: $(PROGRAMS)
99
%: %.c
1010
gcc -o$@ $(CFLAGS) $(LDFLAGS) -lsuinput $^
1111

12-
clean: $(PROGRAMS)
13-
rm -f $^
12+
clean:
13+
rm -f $(PROGRAMS)

examples/kbd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
int main(void)
99
{
10+
int i;
1011
int uinput_fd;
1112
int keys[] = {KEY_E, KEY_H, KEY_L, KEY_O};
1213
struct uinput_user_dev user_dev;
@@ -21,7 +22,7 @@ int main(void)
2122

2223
/* Error handling is omitted to keep code as readible as possible. */
2324

24-
for (int i = 0; i < 4; ++i) {
25+
for (i = 0; i < 4; ++i) {
2526
suinput_enable_event(uinput_fd, EV_KEY, keys[i]);
2627
}
2728

examples/mouse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int main(void)
2828
}
2929

3030
for (i = 0; i < 3; ++i) {
31-
suinput_enable_events(uinput_fd, EV_REL, rel_axes[i]);
31+
suinput_enable_event(uinput_fd, EV_REL, rel_axes[i]);
3232
}
3333

3434
suinput_create(uinput_fd, &user_dev);

0 commit comments

Comments
 (0)