initial support for PCRE2

This commit is contained in:
cathugger 2018-01-20 19:55:45 +00:00
parent bc76dc4331
commit e32e8e06f6
3 changed files with 158 additions and 17 deletions

7
main.c
View file

@ -33,7 +33,8 @@ static char *workdir = 0;
static size_t workdirlen = 0;
static int quietflag = 0;
static int wantdedup = 0;
//static int wantdedup = 0;
#define wantdedup 0
#define SECRET_LEN 64
#define PUBLIC_LEN 32
@ -199,6 +200,7 @@ static void *dowork(void *task)
#ifdef STATISTICS
struct statstruct *st = (struct statstruct *)task;
#endif
PREFILTER
memcpy(secret,skprefix,skprefixlen);
wpk[PUBLIC_LEN] = 0;
@ -267,6 +269,7 @@ next:
end:
free(sname);
POSTFILTER
return 0;
}
@ -304,6 +307,7 @@ static void *dofastwork(void *task)
#ifdef STATISTICS
struct statstruct *st = (struct statstruct *)task;
#endif
PREFILTER
memcpy(secret, skprefix, skprefixlen);
wpk[PUBLIC_LEN] = 0;
@ -381,6 +385,7 @@ initseed:
end:
free(sname);
POSTFILTER
return 0;
}