41
41
unsigned long long int tmp;
47
*window = (xcb_window_t)0;
48
*device_id = (uint16_t)0;
50
*mask = malloc(sizeof(uint32_t) * *mask_len);
51
(*mask)[0] = 0xffffffff;
52
(*mask)[1] = 0xffffffff;
55
tmp = strtoul(argv[1], &end, 0);
56
if (*end != '\0' || tmp > UINT_MAX) {
60
*window = (xcb_window_t)tmp;
62
tmp = strtoul(argv[2], &end, 0);
63
if (*end != '\0' || tmp > USHRT_MAX) {
67
*device_id = (uint16_t)tmp;
69
tmp = strtoull(argv[3], &end, 0);
74
*mask_len = (tmp > UINT_MAX) ? 2 : 1;
76
*mask = malloc(sizeof(uint32_t) * *mask_len);
78
perror("Error: Failed to allocate event mask");
82
for (i = 0; i < *mask_len; i++)
83
(*mask)[i] = tmp >> (32 * i);
47
*window = (xcb_window_t)0;
48
*device_id = (uint16_t)0;
50
*mask = malloc(sizeof(uint32_t) * *mask_len);
51
(*mask)[0] = 0xffffffff;
52
(*mask)[1] = 0xffffffff;
55
tmp = strtoul(argv[1], &end, 0);
56
if (*end != '\0' || tmp > UINT_MAX) {
60
*window = (xcb_window_t)tmp;
62
tmp = strtoul(argv[2], &end, 0);
63
if (*end != '\0' || tmp > USHRT_MAX) {
67
*device_id = (uint16_t)tmp;
69
tmp = strtoull(argv[3], &end, 0);
74
*mask_len = (tmp > UINT_MAX) ? 2 : 1;
76
*mask = malloc(sizeof(uint32_t) * *mask_len);
78
perror("Error: Failed to allocate event mask");
82
for (i = 0; i < *mask_len; i++)
83
(*mask)[i] = tmp >> (32 * i);