rename do_word_count() do_wordlinechar_count(), and simplify its final
message a bit git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2925 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
72936854c4
commit
8e94234b00
|
@ -208,8 +208,9 @@ CVS code -
|
||||||
- Make parameters const where possible. (DLR)
|
- Make parameters const where possible. (DLR)
|
||||||
- text.c:
|
- text.c:
|
||||||
do_word_count()
|
do_word_count()
|
||||||
- Expand to also count the number of lines and characters in the
|
- Rename to do_wordlinechar_count(), and expand to also count
|
||||||
file or selection, as wc does. (DLR)
|
the number of lines and characters in the file or selection,
|
||||||
|
as wc does. (DLR)
|
||||||
- winio.c:
|
- winio.c:
|
||||||
edit_redraw(), edit_refresh()
|
edit_redraw(), edit_refresh()
|
||||||
- Clean up and simplify. (DLR)
|
- Clean up and simplify. (DLR)
|
||||||
|
|
|
@ -544,7 +544,7 @@ void shortcut_init(bool unjustify)
|
||||||
|
|
||||||
sc_init_one(&main_list, NANO_NO_KEY, N_("Word Count"),
|
sc_init_one(&main_list, NANO_NO_KEY, N_("Word Count"),
|
||||||
IFHELP(nano_wordcount_msg, NANO_WORDCOUNT_KEY), NANO_NO_KEY,
|
IFHELP(nano_wordcount_msg, NANO_WORDCOUNT_KEY), NANO_NO_KEY,
|
||||||
NANO_NO_KEY, VIEW, do_word_count);
|
NANO_NO_KEY, VIEW, do_wordlinechar_count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DISABLE_JUSTIFY
|
#ifndef DISABLE_JUSTIFY
|
||||||
|
|
|
@ -529,7 +529,7 @@ const char *do_alt_speller(char *tempfile_name);
|
||||||
void do_spell(void);
|
void do_spell(void);
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
void do_word_count(void);
|
void do_wordlinechar_count(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Public functions in utils.c. */
|
/* Public functions in utils.c. */
|
||||||
|
|
12
src/text.c
12
src/text.c
|
@ -2047,7 +2047,7 @@ void do_spell(void)
|
||||||
#endif /* !DISABLE_SPELLER */
|
#endif /* !DISABLE_SPELLER */
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
void do_word_count(void)
|
void do_wordlinechar_count(void)
|
||||||
{
|
{
|
||||||
size_t words = 0, lines = 0, chars = 0;
|
size_t words = 0, lines = 0, chars = 0;
|
||||||
size_t current_x_save = openfile->current_x;
|
size_t current_x_save = openfile->current_x;
|
||||||
|
@ -2115,10 +2115,10 @@ void do_word_count(void)
|
||||||
|
|
||||||
/* Display the total word, line, and character counts on the
|
/* Display the total word, line, and character counts on the
|
||||||
* statusbar. */
|
* statusbar. */
|
||||||
statusbar("%s: %lu %s, %lu %s, %lu %s", old_mark_set ?
|
statusbar("%s%lu %s, %lu %s, %lu %s", old_mark_set ?
|
||||||
_("In selection") : _("In file"), (unsigned long)words,
|
_("In selection: ") : "", (unsigned long)words, P_("word",
|
||||||
P_("word", "words", (unsigned long)words), (unsigned long)lines,
|
"words", (unsigned long)words), (unsigned long)lines, P_("line",
|
||||||
P_("line", "lines", (unsigned long)lines), (unsigned long)chars,
|
"lines", (unsigned long)lines), (unsigned long)chars, P_("char",
|
||||||
P_("char", "chars", (unsigned long)chars));
|
"chars", (unsigned long)chars));
|
||||||
}
|
}
|
||||||
#endif /* !NANO_SMALL */
|
#endif /* !NANO_SMALL */
|
||||||
|
|
Loading…
Reference in New Issue