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) {
- fprintf(stderr, "unable to open device %s\n", argv[0]);
+ fprintf(stderr, "unable to open device '%s'\n", argv[0]);
return 1;
}
}
if (id == -1) {
- fprintf(stderr, "unable to find PtrFeedbackClass for %s\n", argv[0]);
+ fprintf(stderr, "unable to find PtrFeedbackClass for '%s'\n", argv[0]);
return 1;
}
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) {
- fprintf(stderr, "unable to open device %s\n", argv[0]);
+ fprintf(stderr, "unable to open device '%s'\n", argv[0]);
return 1;
}
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]);
return EXIT_FAILURE;
}
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]);
return EXIT_FAILURE;
}
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]);
return EXIT_FAILURE;
}
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) {
- fprintf(stderr, "unable to find device %s\n", argv[1]);
+ fprintf(stderr, "unable to find device '%s'\n", argv[1]);
return EXIT_FAILURE;
}
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]);
return EXIT_FAILURE;
}
break;
}
- printf("\t... of unknown type %s\n",
+ printf("\t... of unknown type '%s'\n",
XGetAtomName(dpy, act_type));
done = True;
break;
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]);
continue;
}
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;
}
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;
}
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)
{
- fprintf(stderr, "unable to open device %s\n", argv[0]);
+ fprintf(stderr, "unable to open device '%s'\n", argv[0]);
return EXIT_FAILURE;
}
prop = parse_atom(dpy, name);
if (prop == None) {
- fprintf(stderr, "invalid property %s\n", name);
+ fprintf(stderr, "invalid property '%s'\n", name);
return EXIT_FAILURE;
}
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 {
}
if (type == None) {
- 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;
}
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) {
- 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]) {
- 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) {
- 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 {
- fprintf(stderr, "unexpected type for property %s\n", name);
+ fprintf(stderr, "unexpected type for property '%s'\n", name);
return EXIT_FAILURE;
}
}
prop = parse_atom(dpy, name);
if (prop == None) {
- fprintf(stderr, "invalid property %s\n", name);
+ fprintf(stderr, "invalid property '%s'\n", name);
return EXIT_FAILURE;
}
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 {
}
if (type == None) {
- 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;
}
}
} 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;
}
}
} 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 {
- fprintf(stderr, "unexpected type for property %s\n", name);
+ fprintf(stderr, "unexpected type for property '%s'\n", name);
return EXIT_FAILURE;
}
}
} 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 {
- fprintf(stderr, "invalid option %s\n", argv[i]);
+ fprintf(stderr, "invalid option '%s'\n", argv[i]);
return EXIT_FAILURE;
}