Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
12 files changed:
info = find_device_info(display, argv[0], False);
if (!info) {
info = find_device_info(display, argv[0], False);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
info = find_device_info(display, argv[0], False);
if (!info) {
info = find_device_info(display, argv[0], False);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
info = find_device_info(display, argv[0], True);
if (!info) {
info = find_device_info(display, argv[0], True);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
return 1;
}
device = XOpenDevice(display, info->id);
if (!device) {
return 1;
}
device = XOpenDevice(display, info->id);
if (!device) {
- fprintf(stderr, "unable to open device %s\n", argv[0]);
+ fprintf(stderr, "unable to open device '%s'\n", argv[0]);
- fprintf(stderr, "unable to find PtrFeedbackClass for %s\n", argv[0]);
+ fprintf(stderr, "unable to find PtrFeedbackClass for '%s'\n", argv[0]);
info = find_device_info(display, argv[0], True);
if (!info) {
info = find_device_info(display, argv[0], True);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
return 1;
}
device = XOpenDevice(display, info->id);
if (!device) {
return 1;
}
device = XOpenDevice(display, info->id);
if (!device) {
- fprintf(stderr, "unable to open device %s\n", argv[0]);
+ fprintf(stderr, "unable to open device '%s'\n", argv[0]);
info = xi2_find_device_info(dpy, argv[0]);
if (!info) {
info = xi2_find_device_info(dpy, argv[0]);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
if (argc >= 3) {
info = xi2_find_device_info(dpy, argv[2]);
if (!info) {
if (argc >= 3) {
info = xi2_find_device_info(dpy, argv[2]);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[2]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[2]);
if (argc >= 4) {
info = xi2_find_device_info(dpy, argv[3]);
if (!info) {
if (argc >= 4) {
info = xi2_find_device_info(dpy, argv[3]);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[3]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[3]);
md_info= xi2_find_device_info(dpy, argv[1]);
if (!sd_info) {
md_info= xi2_find_device_info(dpy, argv[1]);
if (!sd_info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
return EXIT_FAILURE;
}
if (!md_info) {
return EXIT_FAILURE;
}
if (!md_info) {
- fprintf(stderr, "unable to find device %s\n", argv[1]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[1]);
info = xi2_find_device_info(dpy, argv[0]);
if (!info) {
info = xi2_find_device_info(dpy, argv[0]);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
- printf("\t... of unknown type %s\n",
+ printf("\t... of unknown type '%s'\n",
XGetAtomName(dpy, act_type));
done = True;
break;
XGetAtomName(dpy, act_type));
done = True;
break;
info = find_device_info(dpy, argv[i], False);
if (!info)
{
info = find_device_info(dpy, argv[i], False);
if (!info)
{
- fprintf(stderr, "unable to find device %s\n", argv[i]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[i]);
info = find_device_info(dpy, argv[0], False);
if (!info)
{
info = find_device_info(dpy, argv[0], False);
if (!info)
{
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
info = find_device_info(dpy, argv[0], False);
if (!info)
{
info = find_device_info(dpy, argv[0], False);
if (!info)
{
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
info = find_device_info(dpy, argv[0], False);
if (!info)
{
info = find_device_info(dpy, argv[0], False);
if (!info)
{
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
return EXIT_FAILURE;
}
dev = XOpenDevice(dpy, info->id);
if (!dev)
{
return EXIT_FAILURE;
}
dev = XOpenDevice(dpy, info->id);
if (!dev)
{
- fprintf(stderr, "unable to open device %s\n", argv[0]);
+ fprintf(stderr, "unable to open device '%s'\n", argv[0]);
prop = parse_atom(dpy, name);
if (prop == None) {
prop = parse_atom(dpy, name);
if (prop == None) {
- fprintf(stderr, "invalid property %s\n", name);
+ fprintf(stderr, "invalid property '%s'\n", name);
if (XGetDeviceProperty(dpy, dev, prop, 0, 0, False, AnyPropertyType,
&old_type, &old_format, &act_nitems,
&bytes_after, &data.c) != Success) {
if (XGetDeviceProperty(dpy, dev, prop, 0, 0, False, AnyPropertyType,
&old_type, &old_format, &act_nitems,
&bytes_after, &data.c) != Success) {
- fprintf(stderr, "failed to get property type and format for %s\n",
+ fprintf(stderr, "failed to get property type and format for '%s'\n",
name);
return EXIT_FAILURE;
} else {
name);
return EXIT_FAILURE;
} else {
- fprintf(stderr, "property %s doesn't exist, you need to specify "
+ fprintf(stderr, "property '%s' doesn't exist, you need to specify "
"its type and format\n", name);
return EXIT_FAILURE;
}
"its type and format\n", name);
return EXIT_FAILURE;
}
data.l[i] = atoi(argv[2 + i]);
break;
default:
data.l[i] = atoi(argv[2 + i]);
break;
default:
- fprintf(stderr, "unexpected size for property %s", name);
+ fprintf(stderr, "unexpected size for property '%s'", name);
return EXIT_FAILURE;
}
} else if (type == float_atom) {
if (format != 32) {
return EXIT_FAILURE;
}
} else if (type == float_atom) {
if (format != 32) {
- fprintf(stderr, "unexpected format %d for property %s\n",
+ fprintf(stderr, "unexpected format %d for property '%s'\n",
format, name);
return EXIT_FAILURE;
}
*(float *)(data.l + i) = strtod(argv[2 + i], &endptr);
if (endptr == argv[2 + i]) {
format, name);
return EXIT_FAILURE;
}
*(float *)(data.l + i) = strtod(argv[2 + i], &endptr);
if (endptr == argv[2 + i]) {
- fprintf(stderr, "argument %s could not be parsed\n", argv[2 + i]);
+ fprintf(stderr, "argument '%s' could not be parsed\n", argv[2 + i]);
return EXIT_FAILURE;
}
} else if (type == XA_ATOM) {
if (format != 32) {
return EXIT_FAILURE;
}
} else if (type == XA_ATOM) {
if (format != 32) {
- fprintf(stderr, "unexpected format %d for property %s\n",
+ fprintf(stderr, "unexpected format %d for property '%s'\n",
format, name);
return EXIT_FAILURE;
}
data.a[i] = parse_atom(dpy, argv[2 + i]);
} else {
format, name);
return EXIT_FAILURE;
}
data.a[i] = parse_atom(dpy, argv[2 + i]);
} else {
- fprintf(stderr, "unexpected type for property %s\n", name);
+ fprintf(stderr, "unexpected type for property '%s'\n", name);
prop = parse_atom(dpy, name);
if (prop == None) {
prop = parse_atom(dpy, name);
if (prop == None) {
- fprintf(stderr, "invalid property %s\n", name);
+ fprintf(stderr, "invalid property '%s'\n", name);
if (XIGetProperty(dpy, info->deviceid, prop, 0, 0, False,
AnyPropertyType, &old_type, &old_format, &act_nitems,
&bytes_after, &data.c) != Success) {
if (XIGetProperty(dpy, info->deviceid, prop, 0, 0, False,
AnyPropertyType, &old_type, &old_format, &act_nitems,
&bytes_after, &data.c) != Success) {
- fprintf(stderr, "failed to get property type and format for %s\n",
+ fprintf(stderr, "failed to get property type and format for '%s'\n",
name);
return EXIT_FAILURE;
} else {
name);
return EXIT_FAILURE;
} else {
- fprintf(stderr, "property %s doesn't exist, you need to specify "
+ fprintf(stderr, "property '%s' doesn't exist, you need to specify "
"its type and format\n", name);
return EXIT_FAILURE;
}
"its type and format\n", name);
return EXIT_FAILURE;
}
}
} else if (type == float_atom) {
if (format != 32) {
}
} else if (type == float_atom) {
if (format != 32) {
- fprintf(stderr, "unexpected format %d for property %s\n",
+ fprintf(stderr, "unexpected format %d for property '%s'\n",
format, name);
return EXIT_FAILURE;
}
format, name);
return EXIT_FAILURE;
}
}
} else if (type == XA_ATOM) {
if (format != 32) {
}
} else if (type == XA_ATOM) {
if (format != 32) {
- fprintf(stderr, "unexpected format %d for property %s\n",
+ fprintf(stderr, "unexpected format %d for property '%s'\n",
format, name);
return EXIT_FAILURE;
}
data.l[i] = parse_atom(dpy, argv[2 + i]);
} else {
format, name);
return EXIT_FAILURE;
}
data.l[i] = parse_atom(dpy, argv[2 + i]);
} else {
- fprintf(stderr, "unexpected type for property %s\n", name);
+ fprintf(stderr, "unexpected type for property '%s'\n", name);
} else if (!strncmp(argv[i], "--format=", strlen("--format="))) {
format = atoi(option + 1);
if (format != 8 && format != 16 && format != 32) {
} else if (!strncmp(argv[i], "--format=", strlen("--format="))) {
format = atoi(option + 1);
if (format != 8 && format != 16 && format != 32) {
- fprintf(stderr, "invalid property format %s\n", option + 1);
+ fprintf(stderr, "invalid property format '%s'\n", option + 1);
return EXIT_FAILURE;
}
} else {
return EXIT_FAILURE;
}
} else {
- fprintf(stderr, "invalid option %s\n", argv[i]);
+ fprintf(stderr, "invalid option '%s'\n", argv[i]);
info = xi2_find_device_info(dpy, argv[1]);
if (!info) {
info = xi2_find_device_info(dpy, argv[1]);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[1]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[1]);
info = find_device_info(display, argv[0], True);
if (!info) {
info = find_device_info(display, argv[0], True);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
info = find_device_info(display, argv[0], True);
if (!info) {
info = find_device_info(display, argv[0], True);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
info = find_device_info(display, argv[0], True);
if (!info) {
info = find_device_info(display, argv[0], True);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
info = find_device_info(display, argv[0], True);
if (!info) {
info = find_device_info(display, argv[0], True);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
return 1;
}
device = XOpenDevice(display, info->id);
if (!device) {
return 1;
}
device = XOpenDevice(display, info->id);
if (!device) {
- fprintf(stderr, "unable to open device %s\n", argv[0]);
+ fprintf(stderr, "unable to open device '%s'\n", argv[0]);
device = XOpenDevice(dpy, info->id);
if (!device) {
device = XOpenDevice(dpy, info->id);
if (!device) {
- fprintf(stderr, "unable to open device %s\n", dev_name);
+ fprintf(stderr, "unable to open device '%s'\n", dev_name);
info = find_device_info(display, argv[idx], True);
if (!info) {
info = find_device_info(display, argv[idx], True);
if (!info) {
- fprintf(stderr, "unable to find device %s\n", argv[idx]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[idx]);
return EXIT_FAILURE;
} else {
if (register_events(display, info, argv[idx], handle_proximity)) {
return EXIT_FAILURE;
} else {
if (register_events(display, info, argv[idx], handle_proximity)) {
info = xi2_find_device_info(dpy, argv[0]);
if (!info)
{
info = xi2_find_device_info(dpy, argv[0]);
if (!info)
{
- fprintf(stderr, "unable to find device %s\n", argv[0]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[0]);
(is_id && devices[loop].id == id))) {
if (found) {
fprintf(stderr,
(is_id && devices[loop].id == id))) {
if (found) {
fprintf(stderr,
- "Warning: There are multiple devices named \"%s\".\n"
+ "Warning: There are multiple devices named '%s'.\n"
"To ensure the correct one is selected, please use "
"the device ID instead.\n\n", name);
return NULL;
"To ensure the correct one is selected, please use "
"the device ID instead.\n\n", name);
return NULL;