summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/git-access.c15
-rw-r--r--core/subsurface-string.h15
2 files changed, 15 insertions, 15 deletions
diff --git a/core/git-access.c b/core/git-access.c
index 18db832a1..233af66ae 100644
--- a/core/git-access.c
+++ b/core/git-access.c
@@ -28,6 +28,21 @@ bool is_subsurface_cloud = false;
int (*update_progress_cb)(const char *) = NULL;
+static bool includes_string_caseinsensitive(const char *haystack, const char *needle)
+{
+ if (!needle)
+ return 1; /* every string includes the NULL string */
+ if (!haystack)
+ return 0; /* nothing is included in the NULL string */
+ int len = strlen(needle);
+ while (*haystack) {
+ if (strncasecmp(haystack, needle, len))
+ return 1;
+ haystack++;
+ }
+ return 0;
+}
+
void set_git_update_cb(int(*cb)(const char *))
{
update_progress_cb = cb;
diff --git a/core/subsurface-string.h b/core/subsurface-string.h
index 33849e217..90ee4fc8c 100644
--- a/core/subsurface-string.h
+++ b/core/subsurface-string.h
@@ -45,21 +45,6 @@ static inline bool empty_string(const char *s)
return !s || !*s;
}
-static inline bool includes_string_caseinsensitive(const char *haystack, const char *needle)
-{
- if (!needle)
- return 1; /* every string includes the NULL string */
- if (!haystack)
- return 0; /* nothing is included in the NULL string */
- int len = strlen(needle);
- while (*haystack) {
- if (strncasecmp(haystack, needle, len))
- return 1;
- haystack++;
- }
- return 0;
-}
-
static inline char *copy_string(const char *s)
{
return (s && *s) ? strdup(s) : NULL;