--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/kbd_mode/Makefile Tue Aug 12 15:06:00 2008 -0700
@@ -0,0 +1,60 @@
+###############################################################################
+#
+# kbd_mode module Makefile
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+# @(#)Makefile 1.1 08/08/12
+#
+
+# Package name used in tarballs
+MODULE_NAME=kbd_mode
+
+# No upstream sources, only local sources
+MODULE_VERSION=src
+SOURCE_TARBALL_NAME=NONE
+SOURCE_TARBALL_NAME_SET=yes
+ADDITIONAL_SOURCE_DIR=sun-src
+
+# Man pages to apply Sun footer to & attributes to list
+SUNTOUCHED_MANPAGES= # None
+SUN_PACKAGE=SUNWxwplt
+MODULE_STABILITY=Committed
+
+# No configure script to run
+CONFIGURE_TARGETS=
+CONFIGURE_TARGETS_SET=yes
+
+# Since we don't have a configure script, pass configure flags to make
+MODULE_BUILD_MAKEFLAGS=$(CONFIG_ENV) PREFIX=$(MODULE_PREFIX)
+MODULE_INSTALL_MAKEFLAGS=$(CONFIG_ENV) PREFIX=$(MODULE_PREFIX)
+
+include ../Makefile.inc
+
+source_gen:: $(LNDIR)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/kbd_mode/sun-src/Makefile Tue Aug 12 15:06:00 2008 -0700
@@ -0,0 +1,40 @@
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+# @(#)Makefile 1.1 08/08/12
+
+SRCS = kbd_mode.c
+OBJS = $(SRCS:.c=.o)
+
+kbd_mode: $(OBJS)
+ $(LD) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS)
+
+install: kbd_mode
+ mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1
+ $(INSTALL) kbd_mode $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) kbd_mode.1 $(DESTDIR)$(PREFIX)/share/man/man1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/kbd_mode/sun-src/kbd_mode.1 Tue Aug 12 15:06:00 2008 -0700
@@ -0,0 +1,89 @@
+'\" t
+.\" Copyright 2008, Sun Microsystems, Inc. All rights reserved.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, provided that the above
+.\" copyright notice(s) and this permission notice appear in all copies of
+.\" the Software and that both the above copyright notice(s) and this
+.\" permission notice appear in supporting documentation.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+.\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+.\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+.\" INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+.\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of a copyright holder
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" of the copyright holder.
+.\"
+.TH kbd_mode 1 "12 August 2008"
+.IX "kbd_mode" "" "\f3kbd_mode\f1(1) \(em keyboard translation utility" ""
+.IX "keyboard" "trans" "keyboard" "translation utility \(em \f3kbd_mode\f1(1)"
+.SH NAME
+/usr/X11/bin/kbd_mode \- change the keyboard translation mode
+.SH SYNOPSIS
+.B kbd_mode -a | -n |
+.B -e | -u
+.SH DESCRIPTION
+.IX "keyboard" "reset" "keyboard" "resetting input \(em \f3kbd_mode\f1(1)" ""
+.B kbd_mode
+sets the translation mode of the console's keyboard (\f3/dev/kbd\f1)
+to one of the four values defined for
+.SB KIOCTRANS
+in
+.BR kb (7M) .
+This is useful when a program that resets the translation mode
+terminates abnormally and fails to restore the original translation mode.
+.LP
+Note that the text console desires ASCII characters (\f3kbd_mode -a\f1), while
+.BR Xorg (1)
+and
+.BR Xsun (1)
+desire untranslated events (\f3kbd_mode -u\f1).
+.SH OPTIONS
+.TP
+.B -a
+ASCII: the keyboard will generate simple ASCII characters.
+.TP
+.B -n
+None: the keyboard will generate unencoded bytes
+\- a distinct value for up and down on each switch on the keyboard.
+.TP
+.B -e
+Events: the keyboard will generate firm_events
+with ASCII characters in the \fIvalue\fP field.
+.TP
+.B -u
+Unencoded: the keyboard will generate input events
+with unencoded bytes in the \fIvalue\fP field
+such as those desired by the X server.
+.SH FILES
+.nf
+/dev/kbd
+.fi
+.SH ATTRIBUTES
+See
+.BR attributes (5)
+for descriptions of the following attributes:
+.sp
+.TS
+box;
+cbp-1 | cbp-1
+l | l .
+ATTRIBUTE TYPE ATTRIBUTE VALUE
+=
+Availability SUNWxwplt
+Interface Stability Committed
+.TE
+.SH "SEE ALSO"
+.BR kb (7M)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/kbd_mode/sun-src/kbd_mode.c Tue Aug 12 15:06:00 2008 -0700
@@ -0,0 +1,131 @@
+/* $XConsortium: kbd_mode.c,v 4.6 94/04/17 20:29:33 kaleb Exp $ */
+/* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)kbd_mode.c 1.4 08/08/12 SMI";
+#endif
+
+/*
+ * kbd_mode: set keyboard encoding mode
+ */
+
+#include <sys/types.h>
+#include <sys/file.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/kbio.h>
+#include <sys/kbd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static void die(const char *);
+static void usage(void);
+static int kbd_fd;
+
+int
+main(int argc, char** argv)
+{
+ int code = 0, translate, direct = -1;
+ char led;
+ int click;
+
+ if ((kbd_fd = open("/dev/kbd", O_RDONLY, 0)) < 0) {
+ die("Couldn't open /dev/kbd");
+ }
+ argc--; argv++;
+ if (argc-- && **argv == '-') {
+ code = *(++*argv);
+ } else {
+ usage();
+ }
+ switch (code) {
+ case 'a':
+ case 'A':
+ translate = TR_ASCII;
+ direct = 0;
+ break;
+ case 'e':
+ case 'E':
+ translate = TR_EVENT;
+ break;
+ case 'n':
+ case 'N':
+ translate = TR_NONE;
+ break;
+ case 'u':
+ case 'U':
+ translate = TR_UNTRANS_EVENT;
+ break;
+ default:
+ usage();
+ }
+#ifdef KIOCSLED
+ led = 0;
+ if (ioctl(kbd_fd, KIOCSLED, &led))
+ die("Couldn't set LEDs");
+#endif
+#ifdef KIOCCMD
+ click = KBD_CMD_NOCLICK;
+ if (ioctl(kbd_fd, KIOCCMD, &click))
+ die("Couldn't set click");
+#endif
+ if (ioctl(kbd_fd, KIOCTRANS, (caddr_t) &translate))
+ die("Couldn't set translation");
+ if (direct != -1 && ioctl(kbd_fd, KIOCSDIRECT, (caddr_t) &direct))
+ die("Couldn't set redirect");
+ return 0;
+}
+
+static void
+die(const char *msg)
+{
+ fprintf(stderr, "%s\n", msg);
+ exit(1);
+}
+
+static void
+usage(void)
+{
+ int translate;
+
+ if (ioctl(kbd_fd, KIOCGTRANS, (caddr_t) &translate)) {
+ die("Couldn't inquire current translation");
+ }
+ fprintf(stderr, "kbd_mode {-a | -e | -n | -u }\n");
+ fprintf(stderr, "\tfor ascii, encoded (normal) SunView events,\n");
+ fprintf(stderr, " \tnon-encoded, or unencoded SunView events, resp.\n");
+ fprintf(stderr, "Current mode is %s.\n",
+ ( translate == 0 ? "n (non-translated bytes)" :
+ ( translate == 1 ? "a (ascii bytes)" :
+ ( translate == 2 ? "e (encoded events)" :
+ /* translate == 3 */ "u (unencoded events)"))));
+ exit(1);
+}
+
+
--- a/open-src/xserver/Makefile.inc Tue Aug 12 14:14:17 2008 -0700
+++ b/open-src/xserver/Makefile.inc Tue Aug 12 15:06:00 2008 -0700
@@ -28,7 +28,7 @@
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
-# @(#)Makefile.inc 1.4 08/08/08
+# @(#)Makefile.inc 1.5 08/08/12
#
PWD:sh=pwd
@@ -57,6 +57,7 @@
--disable-xdm-auth-1 --enable-xcsecurity \
--enable-shared --disable-static \
--disable-xsdl --disable-xwin --disable-xgl \
+ --disable-kbd_mode \
--disable-install-setuid \
--with-vendor-name="Sun Microsystems, Inc." \
--with-vendor-web="http://sunsolve.sun.com/" \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xorg/kbd_mode.patch Tue Aug 12 15:06:00 2008 -0700
@@ -0,0 +1,24 @@
+From 50382652afc13021f041c42ae6e8893643ea2bfa Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <[email protected]>
+Date: Tue, 12 Aug 2008 14:53:14 -0700
+Subject: [PATCH] Fix --disable/--enable-kbd_mode configure flag
+---
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6b3b1ee..efef454 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2056,7 +2056,7 @@ AM_CONDITIONAL(USE_CURSES, [test x$CURSE
+
+ AC_ARG_ENABLE(kbd_mode, AS_HELP_STRING([--enable-kbd_mode],
+ [Build kbd_mode utility (default: auto)]),
+- [BUILD_KBD_MODE=$enable_val], [BUILD_KBD_MODE="auto"])
++ [BUILD_KBD_MODE=$enableval], [BUILD_KBD_MODE="auto"])
+ if test x$BUILD_KBD_MODE != xno ; then
+ case $host_os in
+ *bsd*)
+--
+1.4.1
+
--- a/open-src/xserver/xorg/patch-list Tue Aug 12 14:14:17 2008 -0700
+++ b/open-src/xserver/xorg/patch-list Tue Aug 12 15:06:00 2008 -0700
@@ -63,3 +63,4 @@
driver-autoconfig.patch
6683567.patch
6685465.patch
+kbd_mode.patch,-p1
--- a/packages/SUNWxwman/prototype_com Tue Aug 12 14:14:17 2008 -0700
+++ b/packages/SUNWxwman/prototype_com Tue Aug 12 15:06:00 2008 -0700
@@ -26,7 +26,7 @@
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
-# ident "@(#)prototype_com 35.98 08/08/08 SMI"
+# ident "@(#)prototype_com 35.99 08/08/12 SMI"
#
# X Window System online user man pages
@@ -68,7 +68,6 @@
f none openwin/share/man/man1/cmap_compact.1 0444 root bin
f none openwin/share/man/man1/fs.1 0444 root bin
f none openwin/share/man/man1/fsadmin.1 0444 root bin
-f none openwin/share/man/man1/kbd_mode.1 0444 root bin
f none openwin/share/man/man1/makedepend.1 0444 root bin
f none openwin/share/man/man1/makepsres.1 0444 root bin
f none openwin/share/man/man1/mkfontdir.1 0444 root bin
@@ -146,6 +145,9 @@
# open-src/app/luit
f none X11/share/man/man1/luit.1 0444 root bin
+# open-src/app/kbd_mode
+f none X11/share/man/man1/kbd_mode.1 0444 root bin
+
# open-src/app/mkfontscale
f none X11/share/man/man1/mkfontscale.1 0444 root bin
--- a/packages/SUNWxwplt/prototype_com Tue Aug 12 14:14:17 2008 -0700
+++ b/packages/SUNWxwplt/prototype_com Tue Aug 12 15:06:00 2008 -0700
@@ -26,7 +26,7 @@
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
-# "@(#)prototype_com 35.194 08/08/12 Sun Microsystems"
+# "@(#)prototype_com 35.195 08/08/12 Sun Microsystems"
#
# X Window System required core package
@@ -50,7 +50,6 @@
!search $HOME/openwin/bin
d none openwin/bin 0755 root bin
-f none openwin/bin/kbd_mode 0755 root bin
f none openwin/bin/cmap_compact 0755 root bin
f none openwin/bin/cmap_alloc 0755 root bin
f none openwin/bin/fbconsole 0755 root bin
@@ -93,6 +92,10 @@
f none X11/bin/lbxproxy 2755 root root
s none openwin/bin/lbxproxy=../../X11/bin/lbxproxy
+# open-src/app/kbd_mode
+f none X11/bin/kbd_mode 0755 root bin
+s none openwin/bin/kbd_mode=../../X11/bin/kbd_mode
+
# open-src/app/rgb
f none X11/bin/showrgb 0755 root bin
s none openwin/bin/showrgb=../../X11/bin/showrgb