3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License, Version 1.0 only
6 # (the "License"). You may not use this file except in compliance
7 # with the License.
8 #
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22 #
23 # Copyright 1997 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26
27 #
28 # Copyright (c) 1988 AT&T
29 # All Rights Reserved
30 #
31
32 #
33 # University Copyright- Copyright (c) 1982, 1986, 1988
34 # The Regents of the University of California
35 # All Rights Reserved
36 #
37 # University Acknowledgment- Portions of this document are derived from
38 # software developed by the University of California, Berkeley, and its
39 # contributors.
40 #
41
42 #ident "%Z%%M% %I% %E% SMI"
43
44 rm -f keyname.c
45 /usr/bin/echo "#include \"curses_inc.h\"\n" > keyname.c
46 /usr/bin/echo "static char *keystrings[] =\n\t\t{" >> keyname.c
47 {
48 grep -v 'KEY_F(' keycaps | awk '{ print $5, $4 }' | sed -e 's/,//g' -e 's/KEY_//'
49 # These three aren't in keycaps
50 echo '0401 BREAK\n0530 SRESET\n0531 RESET'
51 } | sort -n | awk '
52 {
53 print "\t\t \"" $2 "\", /* " $1 " */"
54 }
55 ' >> keyname.c
56
57 LAST=`tail -1 keyname.c | awk -F'"' '{print $2}'`
58 cat << ! >> keyname.c
59 };
60
61 char *
62 keyname(int key)
63 {
64 static char buf[16];
65
66 if (key >= 0400) {
|
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License, Version 1.0 only
6 # (the "License"). You may not use this file except in compliance
7 # with the License.
8 #
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22 #
23 # Copyright 2015 Gary Mills
24 # Copyright 1997 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27
28 #
29 # Copyright (c) 1988 AT&T
30 # All Rights Reserved
31 #
32
33 #
34 # University Copyright- Copyright (c) 1982, 1986, 1988
35 # The Regents of the University of California
36 # All Rights Reserved
37 #
38 # University Acknowledgment- Portions of this document are derived from
39 # software developed by the University of California, Berkeley, and its
40 # contributors.
41 #
42
43 rm -f keyname.c
44 /usr/bin/print "#include \"curses_inc.h\"\n" > keyname.c
45 /usr/bin/print "static char *keystrings[] =\n\t\t{" >> keyname.c
46 {
47 grep -v 'KEY_F(' keycaps | awk '{ print $5, $4 }' | sed -e 's/,//g' -e 's/KEY_//'
48 # These three aren't in keycaps
49 echo '0401 BREAK\n0530 SRESET\n0531 RESET'
50 } | sort -n | awk '
51 {
52 print "\t\t \"" $2 "\", /* " $1 " */"
53 }
54 ' >> keyname.c
55
56 LAST=`tail -1 keyname.c | awk -F'"' '{print $2}'`
57 cat << ! >> keyname.c
58 };
59
60 char *
61 keyname(int key)
62 {
63 static char buf[16];
64
65 if (key >= 0400) {
|