diff --git a/ChangeLog b/ChangeLog index 636a5718b363f831c91841efd6b1fd980101a530..ccc9fbbdf9e0eb416d8d314ddbbe6fe126063623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ CVS code nano.c:global_init(), window_init(), and handle_sigwinch(). New macro MIN_EDITOR_COLS replaces MIN_FILL_LENGTH (David Benbennick). + - Change ngettext macro to P_(), to avoid a clash with the reserved C + __ identifier (Jordi). - files.c: cwd_tab_completion() - Memory leak fix (David Benbennick). diff --git a/files.c b/files.c index 2dfa1b60f45cc30db99f120ee653b6f53b3c9cf3..b5c684776cea2957387a6a2499fe2346afc5b3e5 100644 --- a/files.c +++ b/files.c @@ -312,16 +312,16 @@ int read_file(FILE *f, const char *filename, int quiet) #ifndef NANO_SMALL if (fileformat == 2) - statusbar(__("Read %d line (Converted from Mac format)", + statusbar(P_("Read %d line (Converted from Mac format)", "Read %d lines (Converted from Mac format)", num_lines), num_lines); else if (fileformat == 1) - statusbar(__("Read %d line (Converted from DOS format)", + statusbar(P_("Read %d line (Converted from DOS format)", "Read %d lines (Converted from DOS format)", num_lines), num_lines); else #endif - statusbar(__("Read %d line", "Read %d lines", num_lines), + statusbar(P_("Read %d line", "Read %d lines", num_lines), num_lines); totlines += num_lines; @@ -1679,7 +1679,7 @@ int write_file(const char *name, int tmp, int append, int nonamechange) /* Update originalfilestat to reference the file as it is now. */ stat(filename, &originalfilestat); #endif - statusbar(__("Wrote %d line", "Wrote %d lines", lineswritten), + statusbar(P_("Wrote %d line", "Wrote %d lines", lineswritten), lineswritten); UNSET(MODIFIED); titlebar(NULL); diff --git a/nano.h b/nano.h index 40a3ff80fbe88a751e4b2bd6688be2d15e7e3cf2..275c531615c6d3b31dd470e116596d35a2d26ea9 100644 --- a/nano.h +++ b/nano.h @@ -56,10 +56,10 @@ # include <libintl.h> # endif # define _(string) gettext(string) -# define __(singular, plural, number) ngettext(singular, plural, number) +# define P_(singular, plural, number) ngettext(singular, plural, number) #else # define _(string) (string) -# define __(singular, plural, number) (number == 1 ? singular : plural) +# define P_(singular, plural, number) (number == 1 ? singular : plural) #endif #include <sys/types.h> diff --git a/search.c b/search.c index 06dc82c5c3a878d216167f5bd405705ae8c5af26..0a074e59efb425c416addfe4e421153570cde6dc 100644 --- a/search.c +++ b/search.c @@ -758,7 +758,7 @@ int do_replace(void) edit_update(current, CENTER); if (numreplaced >= 0) - statusbar(__("Replaced %d occurrence", "Replaced %d occurrences", + statusbar(P_("Replaced %d occurrence", "Replaced %d occurrences", numreplaced), numreplaced); else not_found_msg(prevanswer);