although i'm not around that often currently i wanna wish all old and new nekochaners nice and happy holidays and a great start into the new year
r-a-c.de
Servus Goetz. Same to you...foetz wrote: although i'm not around that often currently i wanna wish all old and new nekochaners nice and happy holidays and a great start into the new year
foetz wrote: although i'm not around that often currently i wanna wish all old and new nekochaners nice and happy holidays and a great start into the new year
smj wrote: I'm grateful to have Nekochan available - thanks to everybody who makes it such a valuable resource/community, and thanks to nekonoko for keeping it on the air.
Code: Select all
typedef unsigned int ui;
ui __[]={
10,9,32,123,33,1,34,16,39,24,42,1,44,4,46,24,47,6,58,1,
66,1,72,1,78,1,79,1,83,1,89,1,91,1,92,6,93,1,94,6,95,1,
96,4, 97,3,100,1, 101, 4,102,
1,104,1,108, 1, 112,2, 114, 1,117,1,119,
1, 121, 1, 126, 1, 128, 252, 255,
182, 161, 66, 127, 204, 207, 217, 113,
164, 178, 44, 227, 165, 98,
243, 205,121, 199, 231, 208,
154, 23,88, 7, 61, 36,
195, 150,44, 149, 52, 23,
56,192,42, 252,69,251, 39, 191,203,144,
29,149,148, 6,230,186, 6, 95,139,255,40,
132,2,36,214,120,154,155,159,85,63,18,247,241,143,
254,205,138,235,137,204,189,164,5,30,110,241,149,141,200,
213,207,65,37,134,74,205,22,92,106,111,84,187,217,173,50,0};
#define X(o_o) for(_=o_o^o_o;_<o_o;_++)
#define T (1<<24)
#define B (1<<16)
#define i __[p++]
#define f(t) ((c-l)/(r/=t))
int main(ui _) {
ui l,
c,r,p=0,
n[129],s,y,
cf; extern int
putchar(int); X(129)
_[n]=_^_; while
(__[p]!=255 && (y=
__[p],1)) y[n]=__[++p],
p++;p++; s=0;X(128)y=_[n],n
[_]=s,s+=y;n[128]=s; l=c=0, r=
(ui)-1; X(4) c=c<<8|i;
X(s) { for (cf=f(s),y=0;
n[y+1]<=cf||(putchar(y),0)
;y++); l+=n[y]*r; r*=n[y+1]-y[n];
while ((l^l+r)<T||r<B&&((r=-l&B-1),1)
)c=c<<8
|i,r<<=
8,l<<=8
;} return 0;
}
Code: Select all
$ cc -o card card.c
$ ./card
ShadeOfBlue wrote: Copy the above into a file (e.g. card.c)
ShadeOfBlue wrote: It works even if you don't have MIPSpro (use /var/sysgen/root/usr/bin/cc) or with other compilers on other OS's (tested with gcc, icc and clang).
josehill wrote:ShadeOfBlue wrote: It works even if you don't have MIPSpro (use /var/sysgen/root/usr/bin/cc) or with other compilers on other OS's (tested with gcc, icc and clang).
Nice! I just ran it an old Mac OS X machine I have kicking around.