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

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