suffix_fnc.c

changeset 30
d642fdb6745e
parent 20
43725438ac50
--- a/suffix_fnc.c	Thu Feb 02 16:55:51 2012 +0100
+++ b/suffix_fnc.c	Thu Feb 09 15:56:18 2012 +0100
@@ -7,19 +7,19 @@
 
 #include "suffix_fnc.h"
 
-bool testSuffix(char* filename, settings_t* settings) {
+bool testSuffix(char* filename, string_list_t* list) {
   bool ret = false;
   int tokenlen, fnamelen = strlen(filename);
-  for (int t = 0 ; t < settings->suffixList->count ; t++) {
-    tokenlen = strlen(settings->suffixList->items[t]);
+  for (int t = 0 ; t < list->count ; t++) {
+    tokenlen = strlen(list->items[t]);
     if (fnamelen >= tokenlen && tokenlen > 0) {
       if (strncmp(filename+fnamelen-tokenlen,
-                  settings->suffixList->items[t], tokenlen) == 0) {
+                  list->items[t], tokenlen) == 0) {
         ret = true;
         break;
       }
     }
   }
-  return ret ^ !settings->includeSuffixes;
+  return ret;
 }
 

mercurial