From ad84a60e867db7e3f5e9357b4a16e619e1cacb43 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sun, 23 Oct 2016 01:18:49 +0100 Subject: [PATCH] Rename EndsWithC() to HasSuffixC(). --- h/utils.h | 2 +- sbr/utils.c | 4 ++-- uip/flist.c | 2 +- uip/folder.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/h/utils.h b/h/utils.h index b57a4d88..0ce68a7e 100644 --- a/h/utils.h +++ b/h/utils.h @@ -63,7 +63,7 @@ char *find_str (const char [], size_t, const char *); char *rfind_str (const char [], size_t, const char *); char *nmh_strcasestr (const char *, const char *); -bool EndsWithC(char *s, int c); +bool HasSuffixC(char *s, int c); void TrimSuffixC(char *s, int c); void ToLower(char *s); void ToUpper(char *s); diff --git a/sbr/utils.c b/sbr/utils.c index b7580252..d8a43c17 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -358,9 +358,9 @@ nmh_strcasestr (const char *s1, const char *s2) { } -/* EndsWithC returns true if non-NULL string s ends with a c before the +/* HasSuffixC returns true if non-NULL string s ends with a c before the * terminating NUL. */ -bool EndsWithC(char *s, int c) +bool HasSuffixC(char *s, int c) { return *s && s[strlen(s) - 1] == c; } diff --git a/uip/flist.c b/uip/flist.c index 914581e5..089c7617 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -118,7 +118,7 @@ main(int argc, char **argv) * If program was invoked with name ending * in `s', then add switch `-all'. */ - all = EndsWithC(argv[0], 's'); + all = HasSuffixC(argv[0], 's'); arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; diff --git a/uip/folder.c b/uip/folder.c index 505e3d34..7e00a812 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -118,7 +118,7 @@ main (int argc, char **argv) * If program was invoked with name ending * in `s', then add switch `-all'. */ - all = EndsWithC(argv[0], 's'); + all = HasSuffixC(argv[0], 's'); arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; -- 2.56.0