patch 9.1.0426: too many strlen() calls in search.c

Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: #14796

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/proto/cmdhist.pro b/src/proto/cmdhist.pro
index 9c9e56c..5bf4b8d 100644
--- a/src/proto/cmdhist.pro
+++ b/src/proto/cmdhist.pro
@@ -9,7 +9,7 @@
 void init_history(void);
 void clear_hist_entry(histentry_T *hisptr);
 int in_history(int type, char_u *str, int move_to_front, int sep, int writing);
-void add_to_history(int histype, char_u *new_entry, int in_map, int sep);
+void add_to_history(int histype, char_u *new_entry, size_t new_entrylen, int in_map, int sep);
 void f_histadd(typval_T *argvars, typval_T *rettv);
 void f_histdel(typval_T *argvars, typval_T *rettv);
 void f_histget(typval_T *argvars, typval_T *rettv);