summaryrefslogtreecommitdiff
path: root/xset.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:49:12 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:49:12 +0000
commit4688fc22d02bf85ef00b6dca4cedb5f7d7140b76 (patch)
tree3ab4e00e19259e9ad646554cdf38a9158e1488b6 /xset.c
parent219156b43341302dfd8338a80838feb4d0950c8b (diff)
merge latest (4.3.99.16) from XFree86 (vendor) branchXORG-RELEASE-1-BASEXEVIE-MERGEXEVIE-BASE
Diffstat (limited to 'xset.c')
-rw-r--r--xset.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xset.c b/xset.c
index 41194a4..53bb0a6 100644
--- a/xset.c
+++ b/xset.c
@@ -27,7 +27,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/programs/xset/xset.c,v 3.30 2003/02/06 18:48:17 dawes Exp $ */
+/* $XFree86: xc/programs/xset/xset.c,v 3.32 2003/09/24 02:43:39 dawes Exp $ */
/* Modified by Stephen so keyboard rate is set using XKB extensions */
#include <stdio.h>
@@ -487,15 +487,15 @@ for (i = 1; i < argc; ) {
}
arg = argv[i];
if (*arg >= '0' && *arg <= '9') {
- sscanf(arg, "%hd", &standby_timeout);
+ sscanf(arg, "%hu", &standby_timeout);
i++;
arg = argv[i];
if ((arg)&&(*arg >= '0' && *arg <= '9')) {
- sscanf(arg, "%hd", &suspend_timeout);
+ sscanf(arg, "%hu", &suspend_timeout);
i++;
arg = argv[i];
if ((arg)&&(*arg >= '0' && *arg <= '9')) {
- sscanf(arg, "%hd", &off_timeout);
+ sscanf(arg, "%hu", &off_timeout);
i++;
arg = argv[i];
}
@@ -691,8 +691,8 @@ for (i = 1; i < argc; ) {
#if defined(XF86MISC) || defined(XKB)
else if (strcmp(arg, "rate") == 0) { /* ...or this one. */
int delay = 0, rate = 0;
- int rate_set = 0;
#ifdef XF86MISC
+ int rate_set = 0;
if (XF86MiscQueryVersion(dpy, &major, &minor)) {
delay=KBDDELAY_DEFAULT, rate=KBDRATE_DEFAULT;
} else {
@@ -728,7 +728,9 @@ for (i = 1; i < argc; ) {
#ifdef XKB
if (xkbpresent) {
xkbset_repeatrate(dpy, delay, 1000/rate);
+#ifdef XF86MISC
rate_set = 1;
+#endif
}
#endif
#ifdef XF86MISC