Print this page
make: translate using gettext, rather than the unmaintainable catgets
@@ -40,10 +40,11 @@
#include <errno.h> /* errno */
#include <mk/defs.h>
#include <mksh/macro.h> /* getvar() */
#include <mksh/misc.h> /* get_prop(), append_prop() */
#include <sys/stat.h> /* lstat() */
+#include <libintl.h>
/*
* Defined macros
*/
@@ -100,11 +101,11 @@
(get_prop(target->prop, member_prop) != NULL)) {
return read_archive(target);
}
if (debug_level > 1) {
- (void) printf(NOCATGETS("%*sstat(%s)\n"),
+ (void) printf("%*sstat(%s)\n",
recursion_level,
"",
target->string_mb);
}
@@ -358,11 +359,11 @@
* If we are expanding a wildcard pattern, we
* enter the file as a dependency for the target.
*/
if (debug_level > 0){
WCSTOMBS(mbs_buffer, pattern);
- (void) printf(catgets(catd, 1, 231, "'%s: %s' due to %s expansion\n"),
+ (void) printf(gettext("'%s: %s' due to %s expansion\n"),
line->body.line.target->string_mb,
file->string_mb,
mbs_buffer);
}
enter_dependency(line, file, false);
@@ -395,11 +396,11 @@
MBSTOWCS(tmp_wcs_buffer, dp->d_name + 2);
if ((pattern != NULL) &&
amatch(tmp_wcs_buffer, pattern)) {
if (debug_level > 0) {
WCSTOMBS(mbs_buffer, pattern);
- (void) printf(catgets(catd, 1, 232, "'%s: %s' due to %s expansion\n"),
+ (void) printf(gettext("'%s: %s' due to %s expansion\n"),
line->body.line.target->
string_mb,
plain_file->string_mb,
mbs_buffer);
}
@@ -450,25 +451,25 @@
if (file_name_p - file_name > 0) {
tmp_wchar = *file_name_p;
*file_name_p = 0;
WCSTOMBS(mbs_buffer, file_name);
- (void) sprintf(mb_path, NOCATGETS("%s/%s/SCCS"),
+ (void) sprintf(mb_path, "%s/%s/SCCS",
sccs_dir_path,
mbs_buffer);
*file_name_p = tmp_wchar;
} else {
- (void) sprintf(mb_path, NOCATGETS("%s/SCCS"), sccs_dir_path);
+ (void) sprintf(mb_path, "%s/SCCS", sccs_dir_path);
}
MBSTOWCS(path, mb_path);
(void) wscpy(file_name, path);
} else {
- MBSTOWCS(wcs_buffer, NOCATGETS("SCCS"));
+ MBSTOWCS(wcs_buffer, "SCCS");
(void) wscpy(file_name_p, wcs_buffer);
}
} else {
- MBSTOWCS(wcs_buffer, NOCATGETS("."));
+ MBSTOWCS(wcs_buffer, ".");
(void) wscpy(file_name_p, wcs_buffer);
}
/* Internalize the constructed SCCS dir name. */
(void) exists(dir = GETNAME(file_name, FIND_LENGTH));
/* Just give up if the directory file doesnt exist. */
@@ -530,11 +531,11 @@
MBSTOWCS(tmp_wcs_buffer, dp->d_name + 2);
if ((pattern != NULL) &&
amatch(tmp_wcs_buffer, pattern)) {
if (debug_level > 0) {
WCSTOMBS(mbs_buffer, pattern);
- (void) printf(catgets(catd, 1, 233, "'%s: %s' due to %s expansion\n"),
+ (void) printf(gettext("'%s: %s' due to %s expansion\n"),
line->body.line.target->
string_mb,
plain_file->string_mb,
mbs_buffer);
}