Print this page
make: translate using gettext, rather than the unmaintainable catgets
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/make/bin/depvar.cc
+++ new/usr/src/cmd/make/bin/depvar.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.
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 *
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 1995 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 /*
27 27 * Included files
28 28 */
29 +#include <libintl.h>
30 +
29 31 #include <mk/defs.h>
30 32 #include <mksh/misc.h> /* getmem() */
31 33
32 34 /*
33 35 * This file deals with "Dependency Variables".
34 36 * The "-V var" command line option is used to indicate
35 37 * that var is a dependency variable. Used in conjunction with
36 38 * the -P option the user is asking if the named variables affect
37 39 * the dependencies of the given target.
38 40 */
39 41
40 42 struct _Depvar {
41 43 Name name; /* Name of variable */
42 44 struct _Depvar *next; /* Linked list */
43 45 Boolean cmdline; /* Macro defined on the cmdline? */
44 46 };
45 47
46 48 typedef struct _Depvar *Depvar;
47 49
48 50 static Depvar depvar_list;
49 51 static Depvar *bpatch = &depvar_list;
50 52 static Boolean variant_deps;
51 53
52 54 /*
53 55 * Add a name to the list.
54 56 */
55 57
56 58 void
57 59 depvar_add_to_list(Name name, Boolean cmdline)
58 60 {
59 61 Depvar dv;
60 62
61 63 dv = ALLOC(Depvar);
62 64 dv->name = name;
63 65 dv->next = NULL;
64 66 dv->cmdline = cmdline;
65 67 *bpatch = dv;
66 68 bpatch = &dv->next;
67 69 }
68 70
69 71 /*
70 72 * The macro `name' has been used in either the left-hand or
71 73 * right-hand side of a dependency. See if it is in the
72 74 * list. Two things are looked for. Names given as args
73 75 * to the -V list are checked so as to set the same/differ
74 76 * output for the -P option. Names given as macro=value
75 77 * command-line args are checked and, if found, an NSE
76 78 * warning is produced.
77 79 */
78 80 void
79 81 depvar_dep_macro_used(Name name)
80 82 {
81 83 Depvar dv;
82 84
83 85 for (dv = depvar_list; dv != NULL; dv = dv->next) {
84 86 if (name == dv->name) {
85 87 variant_deps = true;
86 88 break;
87 89 }
88 90 }
89 91 }
90 92
↓ open down ↓ |
52 lines elided |
↑ open up ↑ |
91 93
92 94 /*
93 95 * Print the results. If any of the Dependency Variables
94 96 * affected the dependencies then the dependencies potentially
95 97 * differ because of these variables.
96 98 */
97 99 void
98 100 depvar_print_results(void)
99 101 {
100 102 if (variant_deps) {
101 - printf(catgets(catd, 1, 234, "differ\n"));
103 + printf(gettext("differ\n"));
102 104 } else {
103 - printf(catgets(catd, 1, 235, "same\n"));
105 + printf(gettext("same\n"));
104 106 }
105 107 }
106 108
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX