/* Indicate on the statusbar that the string at str was not found by the * last search. */ void not_found_msg(const char *str) { char *disp; int numchars; assert(str != NULL); disp = display_string(str, 0, (COLS / 2) + 1, FALSE); numchars = actual_x(disp, mbstrnlen(disp, COLS / 2)); statusbar(_("\"%.*s%s\" not found"), numchars, disp, (disp[numchars] == '\0') ? "" : "..."); free(disp); }
/* This function is equivalent to strlen() for multibyte strings. */ size_t mbstrlen(const char *s) { return mbstrnlen(s, (size_t)-1); }