fixing up some shit

This commit is contained in:
cathugger 2017-10-06 00:14:33 +00:00
parent 130d88c171
commit 76325bdaa6
3 changed files with 13 additions and 10 deletions

View file

@ -19,6 +19,7 @@ ED25519OBJ= $(ED25519_@ED25519IMPL@)
MAINOBJ= \ MAINOBJ= \
main.c.o \ main.c.o \
cpucount.c.o \
base32_to.c.o \ base32_to.c.o \
base32_from.c.o \ base32_from.c.o \
$(ED25519OBJ) \ $(ED25519OBJ) \
@ -91,6 +92,7 @@ base16_from.c.o: types.h base16.h
base16_to.c.o: types.h base16.h base16_to.c.o: types.h base16.h
base32_from.c.o: types.h base32.h base32_from.c.o: types.h base32.h
base32_to.c.o: types.h base32.h base32_to.c.o: types.h base32.h
cpucount.c.o: cpucount.h
ed25519/amd64-51-30k/batch.c.o: ed25519/amd64-51-30k/crypto_sign.h ed25519/amd64-51-30k/batch.c.o: ed25519/amd64-51-30k/crypto_sign.h
ed25519/amd64-51-30k/batch.c.o: ed25519/amd64-51-30k/ed25519.h ed25519/amd64-51-30k/batch.c.o: ed25519/amd64-51-30k/ed25519.h
ed25519/amd64-51-30k/batch.c.o: ed25519/amd64-51-30k/crypto_verify_32.h ed25519/amd64-51-30k/batch.c.o: ed25519/amd64-51-30k/crypto_verify_32.h
@ -351,12 +353,12 @@ ed25519/ref10/sign.c.o: ed25519/amd64-51-30k/crypto_hash_sha512.h
ed25519/ref10/sign.c.o: ed25519/ref10/ge.h ed25519/ref10/fe.h ed25519/ref10/sign.c.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
ed25519/ref10/sign.c.o: ed25519/ref10/crypto_int32.h ed25519/ref10/sc.h ed25519/ref10/sign.c.o: ed25519/ref10/crypto_int32.h ed25519/ref10/sc.h
keccak.c.o: types.h keccak.h keccak.c.o: types.h keccak.h
main.c.o: types.h likely.h vec.h base32.h keccak.h ed25519/ed25519.h main.c.o: types.h likely.h vec.h base32.h cpucount.h keccak.h
main.c.o: ed25519/ref10/ed25519.h ed25519/ref10/ge.h ed25519/ref10/fe.h main.c.o: ed25519/ed25519.h ed25519/ref10/ed25519.h ed25519/ref10/ge.h
main.c.o: ed25519/ref10/crypto_int32.h ed25519/amd64-51-30k/ed25519.h main.c.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
main.c.o: ed25519/amd64-51-30k/ge25519.h ed25519/amd64-51-30k/fe25519.h main.c.o: ed25519/amd64-51-30k/ed25519.h ed25519/amd64-51-30k/ge25519.h
main.c.o: ed25519/amd64-51-30k/sc25519.h ed25519/amd64-64-24k/ed25519.h main.c.o: ed25519/amd64-51-30k/fe25519.h ed25519/amd64-51-30k/sc25519.h
main.c.o: ed25519/amd64-64-24k/ge25519.h main.c.o: ed25519/amd64-64-24k/ed25519.h ed25519/amd64-64-24k/ge25519.h
main.c.o: ed25519/ed25519-donna/ed25519-donna.h main.c.o: ed25519/ed25519-donna/ed25519-donna.h
main.c.o: ed25519/ed25519-donna/ed25519-donna-portable.h main.c.o: ed25519/ed25519-donna/ed25519-donna-portable.h
main.c.o: ed25519/ed25519-donna/ed25519-donna-portable-identify.h main.c.o: ed25519/ed25519-donna/ed25519-donna-portable-identify.h

@ -1 +0,0 @@
Subproject commit 8757bd4cd209cb032853ece0ce413f122eef212c

6
main.c
View file

@ -13,6 +13,7 @@
#include "likely.h" #include "likely.h"
#include "vec.h" #include "vec.h"
#include "base32.h" #include "base32.h"
#include "cpucount.h"
#include "keccak.h" #include "keccak.h"
#include "ed25519/ed25519.h" #include "ed25519/ed25519.h"
@ -169,7 +170,7 @@ static void loadfilterfile(const char *fname)
FILE *f = fopen(fname,"r"); FILE *f = fopen(fname,"r");
while (fgets(buf,sizeof(buf),f)) { while (fgets(buf,sizeof(buf),f)) {
for (char *p = buf;*p;++p) { for (char *p = buf;*p;++p) {
if(*p == '\n') { if (*p == '\n') {
*p = 0; *p = 0;
break; break;
} }
@ -707,7 +708,8 @@ int main(int argc,char **argv)
} }
if (numthreads <= 0) { if (numthreads <= 0) {
// TODO: autodetect numthreads = cpucount();
if (numthreads <= 0)
numthreads = 1; numthreads = 1;
} }