lib/wildmat.c broken?

Christian Wuerdig <[email protected]>
Newsgroups gmane.network.sn
Message-ID <[email protected]>
Hi,

it seems that XPAT doesn't work properly. Mozilla uses XPAT to search
all subjects in a group for an expression but sn returns always all
subjects if you search for a single word e.g. nerd. Mozilla generates
the following: XPAT SUBJECT  1- *[Nn][Ee][Rr][Dd]*

Example:

------------------------------------------------
#include "wildmat.h"

int main(void) {
   char *s = "12345678\r\n";
   char *p = "*[Nn][Ee][Rr][Dd]*\r\n";
   printf("wildmat says: %d\n", wildmat(s, p));
   return 0;
}
------------------------------------------------

Return value of wildmat is 1 should be 0.

Another example:

------------------------------------------------
#include "wildmat.h"

int main(void) {
   char *s = "1234nerd5678\r\n";
   char *p = "*nerd*\r\n";
   printf("wildmat says: %d\n", wildmat(s, p));
   return 0;
}
------------------------------------------------

Return value of wildmat is 0 should be 1.

so long Chris
-- 
Alkoholiker sucht Brauereibesitzerin zwecks Heirat!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.