Change ngettext macro to P_(), to avoid clash with C's __ identifier.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1447 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
65f998e429
commit
d16f9f66a1
|
@ -9,6 +9,8 @@ CVS code
|
||||||
nano.c:global_init(), window_init(), and handle_sigwinch().
|
nano.c:global_init(), window_init(), and handle_sigwinch().
|
||||||
New macro MIN_EDITOR_COLS replaces MIN_FILL_LENGTH
|
New macro MIN_EDITOR_COLS replaces MIN_FILL_LENGTH
|
||||||
(David Benbennick).
|
(David Benbennick).
|
||||||
|
- Change ngettext macro to P_(), to avoid a clash with the reserved C
|
||||||
|
__ identifier (Jordi).
|
||||||
- files.c:
|
- files.c:
|
||||||
cwd_tab_completion()
|
cwd_tab_completion()
|
||||||
- Memory leak fix (David Benbennick).
|
- Memory leak fix (David Benbennick).
|
||||||
|
|
8
files.c
8
files.c
|
@ -312,16 +312,16 @@ int read_file(FILE *f, const char *filename, int quiet)
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
if (fileformat == 2)
|
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)",
|
"Read %d lines (Converted from Mac format)",
|
||||||
num_lines), num_lines);
|
num_lines), num_lines);
|
||||||
else if (fileformat == 1)
|
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)",
|
"Read %d lines (Converted from DOS format)",
|
||||||
num_lines), num_lines);
|
num_lines), num_lines);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
statusbar(__("Read %d line", "Read %d lines", num_lines),
|
statusbar(P_("Read %d line", "Read %d lines", num_lines),
|
||||||
num_lines);
|
num_lines);
|
||||||
|
|
||||||
totlines += 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. */
|
/* Update originalfilestat to reference the file as it is now. */
|
||||||
stat(filename, &originalfilestat);
|
stat(filename, &originalfilestat);
|
||||||
#endif
|
#endif
|
||||||
statusbar(__("Wrote %d line", "Wrote %d lines", lineswritten),
|
statusbar(P_("Wrote %d line", "Wrote %d lines", lineswritten),
|
||||||
lineswritten);
|
lineswritten);
|
||||||
UNSET(MODIFIED);
|
UNSET(MODIFIED);
|
||||||
titlebar(NULL);
|
titlebar(NULL);
|
||||||
|
|
4
nano.h
4
nano.h
|
@ -56,10 +56,10 @@
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
# endif
|
# endif
|
||||||
# define _(string) gettext(string)
|
# define _(string) gettext(string)
|
||||||
# define __(singular, plural, number) ngettext(singular, plural, number)
|
# define P_(singular, plural, number) ngettext(singular, plural, number)
|
||||||
#else
|
#else
|
||||||
# define _(string) (string)
|
# define _(string) (string)
|
||||||
# define __(singular, plural, number) (number == 1 ? singular : plural)
|
# define P_(singular, plural, number) (number == 1 ? singular : plural)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
2
search.c
2
search.c
|
@ -758,7 +758,7 @@ int do_replace(void)
|
||||||
edit_update(current, CENTER);
|
edit_update(current, CENTER);
|
||||||
|
|
||||||
if (numreplaced >= 0)
|
if (numreplaced >= 0)
|
||||||
statusbar(__("Replaced %d occurrence", "Replaced %d occurrences",
|
statusbar(P_("Replaced %d occurrence", "Replaced %d occurrences",
|
||||||
numreplaced), numreplaced);
|
numreplaced), numreplaced);
|
||||||
else
|
else
|
||||||
not_found_msg(prevanswer);
|
not_found_msg(prevanswer);
|
||||||
|
|
Loading…
Reference in New Issue