summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Native_File_Chooser_WIN32.cxx13
-rw-r--r--src/Fl_Native_File_Chooser_common.cxx19
2 files changed, 13 insertions, 19 deletions
diff --git a/src/Fl_Native_File_Chooser_WIN32.cxx b/src/Fl_Native_File_Chooser_WIN32.cxx
index c7ad2ea62..cc8903028 100644
--- a/src/Fl_Native_File_Chooser_WIN32.cxx
+++ b/src/Fl_Native_File_Chooser_WIN32.cxx
@@ -663,6 +663,19 @@ void Fl_Native_File_Chooser::add_filter(const char *name_in, // name of filter (
//DEBUG printf("DEBUG: ADD FILTER name=<%s> winfilter=<%s>\n", name, winfilter);
}
+// COUNT OCCURRENCES OF ANY CHARS FROM 'find' IN 's'.
+static int strcnt(const char *s, const char *find) {
+ int cnt = 0;
+ const char *f;
+ while ( *s ) {
+ for (f=find; *f; f++) {
+ if (*s == *f) { ++cnt; break; }
+ }
+ ++s;
+ }
+ return cnt;
+}
+
// CONVERT FLTK STYLE PATTERN MATCHES TO WINDOWS 'DOUBLENULL' PATTERN
// Returns with the parsed double-null result in '_parsedfilt'.
//
diff --git a/src/Fl_Native_File_Chooser_common.cxx b/src/Fl_Native_File_Chooser_common.cxx
index 07e2a1ad6..6636dfecd 100644
--- a/src/Fl_Native_File_Chooser_common.cxx
+++ b/src/Fl_Native_File_Chooser_common.cxx
@@ -71,25 +71,6 @@ static void chrcat(char *s, char c) {
strcat(s, tmp);
}
-// COUNT OCCURRENCES OF CHAR 'c' IN 'find'.
-static int strcnt(const char *s, char c) {
- int cnt = 0;
- while ( *s ) { if (*s++ == c ) ++cnt; }
- return cnt;
-}
-
-// COUNT OCCURRENCES OF ANY CHARS FROM 'find' IN 's'.
-static int strcnt(const char *s, const char *find) {
- int cnt = 0;
- const char *f;
- while ( *s ) {
- for (f=find; *f; f++) {
- if (*s == *f) { ++cnt; break; }
- }
- ++s;
- }
- return cnt;
-}
//
// End of "$Id$".