Two functions strcnt() with distinct prototypes where defined and only one was used,

causing a -Wunused-function warning. Also strcnt() is used in WIN32 only, so should not
belong to Fl_Native_File_Chooser_common.cxx that contains functions used across
platforms.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10064 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2014-01-16 16:10:19 +00:00
parent a170c95787
commit f1bc3999d6
2 changed files with 13 additions and 19 deletions
+13
View File
@@ -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'.
//
-19
View File
@@ -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$".