dos33fsprogs/basic/appleiibot/convert_xor/convert_back.c
Vince Weaver b1238af49d re-arranged the entire directory structure
this will probably upset people
2021-01-05 15:29:31 -05:00

27 lines
288 B
C

#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv) {
int i,a,x,len;
char buf[BUFSIZ];
char out[BUFSIZ];
len=read(0,buf,BUFSIZ)-2;
len/=2;
i=1;
while(buf[i]!='\"') {
a=buf[i]<<3;
a^=buf[i+len];
out[i-1]=a;
i++;
}
write(1,out,len);
return 0;
}