Print this page
make: remove SCCS ident stuff
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/make/lib/mksh/src/i18n.cc
+++ new/usr/src/cmd/make/lib/mksh/src/i18n.cc
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 (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 -/*
26 - * @(#)i18n.cc 1.3 06/12/12
27 - */
28 25
29 -#pragma ident "@(#)i18n.cc 1.3 06/12/12"
30 26
31 27 /*
32 28 * i18n.cc
33 29 *
34 30 * Deal with internationalization conversions
35 31 */
36 32
37 33 /*
38 34 * Included files
39 35 */
40 36 #include <mksh/i18n.h>
41 37 #include <mksh/misc.h> /* setup_char_semantics() */
42 38 #if defined (linux)
43 39 # include <wctype.h>
44 40 # include <wchar.h>
45 41 # define wschr(x,y) wcschr(x,y)
46 42 #endif
47 43
48 44 /*
49 45 * get_char_semantics_value(ch)
50 46 *
51 47 * Return value:
52 48 * The character semantics of ch.
53 49 *
54 50 * Parameters:
55 51 * ch character we want semantics for.
56 52 *
57 53 */
58 54 char
59 55 get_char_semantics_value(wchar_t ch)
60 56 {
61 57 static Boolean char_semantics_setup;
62 58
63 59 if (!char_semantics_setup) {
64 60 setup_char_semantics();
65 61 char_semantics_setup = true;
66 62 }
67 63 return char_semantics[get_char_semantics_entry(ch)];
68 64 }
69 65
70 66 /*
71 67 * get_char_semantics_entry(ch)
72 68 *
73 69 * Return value:
74 70 * The slot number in the array for special make chars,
75 71 * else the slot number of the last array entry.
76 72 *
77 73 * Parameters:
78 74 * ch The wide character
79 75 *
80 76 * Global variables used:
81 77 * char_semantics_char[] array of special wchar_t chars
82 78 * "&*@`\\|[]:$=!>-\n#()%?;^<'\""
83 79 */
84 80 int
85 81 get_char_semantics_entry(wchar_t ch)
86 82 {
87 83 wchar_t *char_sem_char;
88 84
89 85 char_sem_char = (wchar_t *) wschr(char_semantics_char, ch);
90 86 if (char_sem_char == NULL) {
91 87 /*
92 88 * Return the integer entry for the last slot,
93 89 * whose content is empty.
94 90 */
95 91 return (CHAR_SEMANTICS_ENTRIES - 1);
96 92 } else {
97 93 return (char_sem_char - char_semantics_char);
98 94 }
99 95 }
100 96
↓ open down ↓ |
61 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX