blob: 30289da113a6a6f9a84f1863c92959dfd0310897 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#define char_lower(c) ((c >= 'A' && c <= 'Z') ? c|32 : c)
/*void
str_lower(t, s)
char *t, *s;*/
void str_lower(char *t, char *s)
{
register char ch;
do
{
ch = *s++;
*t++ = char_lower(ch);
} while (ch);
}
#if 0 /* string.h , libc */
int
strcasestr(str, tag)
char *str, *tag; /* tag : lower-case string */
{
char buf[256];
str_lower(buf, str);
return (int) strstr(buf, tag);
}
#endif
int
bad_subject(char *subject)
{
char *badkey[] = {"無碼","avcd","mp3",NULL};
int i;
for(i=0; badkey[i]; i++)
if(strcasestr(subject, badkey[i])) return 1;
return 0;
}
|