Print this page
make: translate using gettext, rather than the unmaintainable catgets

*** 40,49 **** --- 40,50 ---- #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,110 **** (get_prop(target->prop, member_prop) != NULL)) { return read_archive(target); } if (debug_level > 1) { ! (void) printf(NOCATGETS("%*sstat(%s)\n"), recursion_level, "", target->string_mb); } --- 101,111 ---- (get_prop(target->prop, member_prop) != NULL)) { return read_archive(target); } if (debug_level > 1) { ! (void) printf("%*sstat(%s)\n", recursion_level, "", target->string_mb); }
*** 358,368 **** * 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"), line->body.line.target->string_mb, file->string_mb, mbs_buffer); } enter_dependency(line, file, false); --- 359,369 ---- * 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(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,405 **** 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"), line->body.line.target-> string_mb, plain_file->string_mb, mbs_buffer); } --- 396,406 ---- 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(gettext("'%s: %s' due to %s expansion\n"), line->body.line.target-> string_mb, plain_file->string_mb, mbs_buffer); }
*** 450,474 **** 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"), sccs_dir_path, mbs_buffer); *file_name_p = tmp_wchar; } else { ! (void) sprintf(mb_path, NOCATGETS("%s/SCCS"), sccs_dir_path); } MBSTOWCS(path, mb_path); (void) wscpy(file_name, path); } else { ! MBSTOWCS(wcs_buffer, NOCATGETS("SCCS")); (void) wscpy(file_name_p, wcs_buffer); } } else { ! MBSTOWCS(wcs_buffer, NOCATGETS(".")); (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. */ --- 451,475 ---- 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, "%s/%s/SCCS", sccs_dir_path, mbs_buffer); *file_name_p = tmp_wchar; } else { ! (void) sprintf(mb_path, "%s/SCCS", sccs_dir_path); } MBSTOWCS(path, mb_path); (void) wscpy(file_name, path); } else { ! MBSTOWCS(wcs_buffer, "SCCS"); (void) wscpy(file_name_p, wcs_buffer); } } else { ! 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,540 **** 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"), line->body.line.target-> string_mb, plain_file->string_mb, mbs_buffer); } --- 531,541 ---- 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(gettext("'%s: %s' due to %s expansion\n"), line->body.line.target-> string_mb, plain_file->string_mb, mbs_buffer); }