From d1322107a52f958f96531a3c9beba911b2f21d91 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 26 Aug 2004 04:22:54 +0000 Subject: [PATCH] do another int -> bool conversion, and simplify the search/replace "Cancelled" messages git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1914 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 1 + src/proto.h | 2 +- src/search.c | 16 ++++++++-------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index de692f1f..7c1428a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ CVS code - shortcut isn't clicked. New functions get_shortcut(), get_toggle(), get_edit_input(), and get_edit_mouse(); changes to do_browser(), do_justify(), do_help(), and main(). (DLR) + - Simplify a few more translated messages. (DLR) - global.c: shortcut_init() - Remove redundant NANO_SMALL #ifdef. (DLR) diff --git a/src/proto.h b/src/proto.h index 50752d15..5ea8c11b 100644 --- a/src/proto.h +++ b/src/proto.h @@ -391,7 +391,7 @@ void regexp_cleanup(void); void not_found_msg(const char *str); void search_abort(void); void search_init_globals(void); -int search_init(int replacing); +int search_init(bool replacing); int is_whole_word(int curr_pos, const char *datastr, const char *searchword); int findnextstr(int can_display_wrap, int wholeword, const filestruct diff --git a/src/search.c b/src/search.c index 8fbb9688..63596897 100644 --- a/src/search.c +++ b/src/search.c @@ -110,14 +110,14 @@ void search_init_globals(void) } /* Set up the system variables for a search or replace. Return -1 if - * the search should be cancelled (due to Cancel, Go to Line, or a - * failed regcomp()). Return 0 on success, and 1 on rerun calling - * program. Return -2 to run opposite program (search -> replace, - * replace -> search). + * the search should be canceled (due to Cancel, Go to Line, or a failed + * regcomp()). Return 0 on success, and 1 on rerun calling program. + * Return -2 to run opposite program (search -> replace, replace -> + * search). * - * replacing = 1 if we call from do_replace(), 0 if called from + * replacing is TRUE if we call from do_replace(), FALSE if called from * do_search(). */ -int search_init(int replacing) +int search_init(bool replacing) { int i = 0; char *buf; @@ -194,7 +194,7 @@ int search_init(int replacing) /* Cancel any search, or just return with no previous search. */ if (i == -1 || (i < 0 && last_search[0] == '\0') || (!replacing && i == 0 && answer[0] == '\0')) { - statusbar(_("Search Cancelled")); + statusbar(_("Cancelled")); #ifndef NANO_SMALL search_history.current = search_history.next; #endif @@ -805,7 +805,7 @@ void do_replace(void) if (i == -1) { /* Cancel. */ if (last_replace[0] != '\0') answer = mallocstrcpy(answer, last_replace); - statusbar(_("Replace Cancelled")); + statusbar(_("Cancelled")); } replace_abort(); return; -- 2.39.5