Tue, 28 Aug 2012 16:44:32 +0200
changed version output slightly
10 | 1 | /* |
2 | * suffix_fnc.c | |
3 | * | |
4 | * Created on: 15.09.2011 | |
20
43725438ac50
Changed author comments + added signatures for upcomming bfile heuristics
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
5 | * Author: Mike |
10 | 6 | */ |
7 | ||
8 | #include "suffix_fnc.h" | |
9 | ||
30
d642fdb6745e
allow parallel use of -s and -S
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
10 | bool testSuffix(char* filename, string_list_t* list) { |
10 | 11 | bool ret = false; |
12 | int tokenlen, fnamelen = strlen(filename); | |
30
d642fdb6745e
allow parallel use of -s and -S
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
13 | for (int t = 0 ; t < list->count ; t++) { |
d642fdb6745e
allow parallel use of -s and -S
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
14 | tokenlen = strlen(list->items[t]); |
10 | 15 | if (fnamelen >= tokenlen && tokenlen > 0) { |
16 | if (strncmp(filename+fnamelen-tokenlen, | |
30
d642fdb6745e
allow parallel use of -s and -S
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
17 | list->items[t], tokenlen) == 0) { |
10 | 18 | ret = true; |
19 | break; | |
20 | } | |
21 | } | |
22 | } | |
30
d642fdb6745e
allow parallel use of -s and -S
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
23 | return ret; |
10 | 24 | } |
25 |