mirror of the now-defunct rocklinux.org
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.

57 lines
1.8 KiB

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