OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.7 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../kbd/kbdrate-sparc.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2004 Clifford Wolf
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- T2-COPYRIGHT-NOTE-END ---
  17. The field is named differently on SPARC (?) ...
  18. - Rene Rebe <rene@exactcode.de>
  19. --- kbd-1.12/src/kbdrate.c 2004-06-10 08:24:48.450000000 +0200
  20. +++ kbd-1.12-fixed/src/kbdrate.c 2004-06-10 08:21:57.000000000 +0200
  21. @@ -164,10 +164,19 @@
  22. exit( 1 );
  23. }
  24. +#ifdef __sparc__
  25. + kbdrate_s.rate = (int) (rate + 0.5); /* round up */
  26. +#else
  27. kbdrate_s.period = (int) (rate + 0.5); /* round up */
  28. +#endif
  29. kbdrate_s.delay = delay * HZ / 1000; /* convert ms to Hz */
  30. +#ifdef __sparc__
  31. + if (kbdrate_s.rate > 50)
  32. + kbdrate_s.rate = 50;
  33. +#else
  34. if (kbdrate_s.period > 50)
  35. kbdrate_s.period = 50;
  36. +#endif
  37. if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
  38. perror( "ioctl(KIOCSRATE)" );
  39. @@ -177,7 +186,11 @@
  40. if (!silent)
  41. printf( "Typematic Rate set to %d cps (delay = %d ms)\n",
  42. +#ifdef __sparc__
  43. + kbdrate_s.rate, kbdrate_s.delay * 1000 / HZ );
  44. +#else
  45. kbdrate_s.period, kbdrate_s.delay * 1000 / HZ );
  46. +#endif
  47. return 1;
  48. #else /* no KIOCSRATE */