]> git.pld-linux.org Git - packages/XFree86-Servers.git/blob - XFree86-Servers-period.patch
- patch with rate to period name change to fix build with new llh
[packages/XFree86-Servers.git] / XFree86-Servers-period.patch
1 --- XFree86-Servers-3.3.6/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c~     2000-01-08 19:26:25.000000000 +0100
2 +++ XFree86-Servers-3.3.6/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c      2004-09-01 02:11:22.413163720 +0200
3 @@ -82,7 +82,7 @@
4     struct kbd_repeat kbdrep_s;
5  
6     /* don't change, just test */
7 -   kbdrep_s.rate = -1;
8 +   kbdrep_s.period = -1;
9     kbdrep_s.delay = -1;
10     if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
11         return 0;
12 @@ -90,11 +90,11 @@
13  
14     /* do the change */
15     if (rate == 0)                              /* switch repeat off */
16 -     kbdrep_s.rate = 0;
17 +     kbdrep_s.period = 0;
18     else
19 -     kbdrep_s.rate  = 10000 / rate;            /* convert cps to msec */
20 -   if (kbdrep_s.rate < 1)
21 -     kbdrep_s.rate = 1;
22 +     kbdrep_s.period  = 10000 / rate;          /* convert cps to msec */
23 +   if (kbdrep_s.period < 1)
24 +     kbdrep_s.period = 1;
25     kbdrep_s.delay = delay;
26     if (kbdrep_s.delay < 1)
27       kbdrep_s.delay = 1;
28 @@ -120,10 +120,10 @@
29     if (fd == -1) 
30       return 0;   
31  
32 -   kbdrate_s.rate = (rate + 5) / 10;     /* must be integer, so round up */
33 +   kbdrate_s.period = (rate + 5) / 10;     /* must be integer, so round up */
34     kbdrate_s.delay = delay * HZ / 1000;  /* convert ms to Hz */
35 -   if (kbdrate_s.rate > 50)
36 -     kbdrate_s.rate = 50;
37 +   if (kbdrate_s.period > 50)
38 +     kbdrate_s.period = 50;
39  
40     if (ioctl( fd, KIOCSRATE, &kbdrate_s ))
41       return 0;
This page took 0.029508 seconds and 3 git commands to generate.