Print this page
3764 Semantic of nawk's print statement changed
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libxcurses2/src/libc/xcurses/mkkey.awk
+++ new/usr/src/lib/libxcurses2/src/libc/xcurses/mkkey.awk
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License, Version 1.0 only
6 6 # (the "License"). You may not use this file except in compliance
7 7 # with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets "[]" replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22 # Copyright (c) 1995-1998 by Sun Microsystems, Inc.
23 23 # All rights reserved.
24 24 #
25 -# ident "%Z%%M% %I% %E% SMI"
26 -#
27 25 # mkkey.awk
28 26 #
29 27 # XCurses Library
30 28 #
31 29 # Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved.
32 30 #
33 31 # USAGE:
34 32 # awk -f mkkey.awk caps >keyindex.c
35 33 #
36 34 # rcsid = $Header: /rd/src/libc/xcurses/rcs/mkkey.awk 1.1 1995/05/11 14:39:17 ant Exp $
37 35 #
38 36
39 37 BEGIN {
40 38 print "/*"
41 39 print " * Copyright (c) 1998 by Sun Microsystems, Inc."
42 40 print " * All rights reserved."
43 41 print " */"
44 -print
42 +print ""
45 43 print "#pragma ident \"@(#)keyindex.c\t%I%\t%E% SMI\""
46 -print
44 +print ""
47 45 print "/*"
48 46 print " * keyindex.c"
49 47 print " *"
50 48 print " * XCurses Library"
51 49 print " *"
52 50 print " * **** THIS FILE IS MACHINE GENERATED."
53 51 print " * **** DO NOT EDIT THIS FILE."
54 52 print " *"
55 53 print " * Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved."
56 54 print " *"
57 55 print " */"
58 -print
56 +print ""
59 57 print "#include <private.h>"
60 -print
58 +print ""
61 59 print "/*"
62 60 print " * This table is used to map a KEY_ constant to an"
63 61 print " * index for cur_term->_str[] for use by keyname()."
64 62 print " */"
65 63 print "const short __m_keyindex[][2] = {"
66 64 strcount = 0;
67 65 }
68 66
69 67 $4 == "str" {
70 68 if ($1 ~ /^key_f[0-9][0-9]*/)
71 69 printf("\t{ %d, KEY_F(%d) },\n", strcount, substr($1, 6, 2));
72 70 else if ($1 ~ /^key_/)
73 71 printf "\t{ %d, %s },\n", strcount, toupper($1);
74 72 ++strcount;
75 73 }
76 74
77 75 END {
78 76 print "\t{ -1, -1 }"
79 77 print "};"
80 78 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX