diff --git a/src/cksum/Makefile b/src/cksum/Makefile new file mode 100644 index 0000000..f84ebce --- /dev/null +++ b/src/cksum/Makefile @@ -0,0 +1,5 @@ +OUT := cksum + +SRC := cksum.c + +include ../shared.mk diff --git a/src/cksum/cksum b/src/cksum/cksum new file mode 100755 index 0000000..60f4b96 Binary files /dev/null and b/src/cksum/cksum differ diff --git a/src/cksum/cksum.1 b/src/cksum/cksum.1 new file mode 100644 index 0000000..fca0bf6 --- /dev/null +++ b/src/cksum/cksum.1 @@ -0,0 +1 @@ +\" TODO \ No newline at end of file diff --git a/src/cksum/cksum.c b/src/cksum/cksum.c new file mode 100644 index 0000000..79c4500 --- /dev/null +++ b/src/cksum/cksum.c @@ -0,0 +1,26 @@ +#include +#include + +#define NAME "cksum (canoutils)" +#define VERSION "0.0.1" +#define AUTHOR "cospplredman" + +#include"../version_info.h" + +#define X(a,...) for(a)for(r=(r<<8)^(e&0xff)^__VA_ARGS__,e=0,i=31;i>23;i--)if(r&(1<>(32-i)),e^=q<<(i-24); + +uint32_t q=0x04c11db7,r,e;d,i=1,t,j,k,f=2;main(c,v)char**v;{ + if(c<2)exit(1); + for(;++k=0;t++,d)X(j=t;j;,(j&0xff),j>>=8)X(j=3;j--;,0) + if(printf("%u %d %s\n",~((r<<8)|(e&0xff)),t,v[k])<0)exit(1); + r=e=t=0; + } +}