#include #include #include typedef unsigned int uint; char v3[] = {0,0,0,0,0,0,0,0,0,0}; char a3[] = {1,1,1,1,1,1,1,1,1,1}; char x003[] = {0,0,0,0,1,0,0,0,1,0}; char x006[] = {1,0,1,0,0,0,0,0,0,0}; char x025[] = {1,1,1,1,1,1,0,0,0,0}; char x033[] = {0,0,0,0,0,0,0,0,1,1}; char x035[] = {0,0,1,1,0,0,0,0,0,0}; char x037[] = {0,0,0,0,0,0,1,0,0,0}; char x091[] = {0,0,0,1,1,1,1,1,1,1}; char x093[] = {0,1,1,1,1,1,1,1,0,0}; char x094[] = {0,0,0,0,0,1,1,1,1,1}; char x097[] = {0,0,0,0,0,0,0,1,1,0}; char xtwo[] = {0,0,1,0,0,0,0,0,0,0}; char x819[] = {0,0,0,0,1,1,0,0,0,0}; char x820[] = {0,1,0,0,1,1,1,1,0,0}; char x821[] = {0,1,1,0,0,0,1,1,1,0}; char x822[] = {1,1,1,0,1,1,1,0,0,0}; char xzer[] = {1,0,0,0,0,0,0,0,0,0}; char x824[] = {1,0,1,1,0,0,0,0,0,1}; char x825[] = {1,0,0,0,1,0,0,0,0,0}; char x826[] = {1,0,0,0,0,0,0,0,0,0}; char x836[] = {0,0,0,0,1,0,0,0,0,0}; char x846[] = {0,0,0,0,0,1,0,0,0,0}; char x847[] = {0,0,1,0,0,0,1,0,0,0}; char x859[] = {0,0,1,1,1,1,1,0,0,0}; char x862[] = {0,0,0,0,0,0,0,0,0,1}; char x865[] = {0,0,0,0,0,0,1,1,1,1}; char x870[] = {0,0,0,0,1,0,1,1,0,1}; char x871[] = {0,1,1,1,0,1,0,0,0,1}; char x872[] = {0,1,1,0,0,0,0,1,0,0}; char x873[] = {1,0,0,1,1,0,1,0,0,0}; char x874[] = {0,0,0,1,1,1,1,1,0,0}; char x875[] = {0,0,0,0,0,0,1,0,0,0}; char x876[] = {0,0,0,0,1,0,0,0,0,0}; char x877[] = {0,0,0,1,0,0,1,0,0,0}; char x880[] = {1,1,0,0,1,1,0,0,0,0}; char x883[] = {0,0,0,0,1,1,1,0,1,1}; char x885[] = {0,0,0,1,0,1,0,0,0,0}; char x886[] = {0,0,0,0,0,0,0,0,0,1}; char just1[] = {0,1,0,0,0,0,0,0,0,0}; char x896[] = {0,0,0,0,0,0,0,0,1,1}; char x897[] = {1,1,0,0,0,0,0,0,0,0}; char x900[] = {0,1,1,0,0,0,0,0,0,0}; char x967[] = {0,0,0,0,1,0,0,0,0,0}; char x982[] = {0,0,0,0,1,0,0,1,0,1}; char x983[] = {1,0,0,0,0,0,0,0,0,0}; char * v2[] = {v3, v3, v3, v3, v3, v3, v3, v3, v3, v3}; char * x00[] = {v3, v3, v3, x003, v3, v3, x006, v3, v3, v3}; char * x01[] = {v3, v3, v3, v3, v3, v3, v3, v3, v3, v3}; char * x02[] = {a3, a3, a3, a3, a3, x025, v3, v3, v3, v3}; char * x03[] = {v3, v3, v3, x033, v3, x035, v3, x037, v3, v3}; char * x07[] = {v3, xzer, v3, xtwo, v3, v3, v3, v3, v3, v3}; char * x09[] = {v3, x091, a3, x093, x094, a3, a3, x097, xtwo, v3}; char * x81[] = {v3, v3, v3, v3, v3, v3, v3, v3, v3, x819}; char * x82[] = {x820, x821, x822, xzer, x824, x825, x826, v3, v3, v3}; char * x83[] = {v3, v3, v3, v3, v3, v3, x836, v3, v3, v3}; char * x84[] = {v3, v3, v3, v3, v3, v3, x846, x847, xtwo, v3}; char * x85[] = {just1, v3, v3, v3, v3, v3, v3, v3, v3, x859}; char * x86[] = {v3, v3, x862, v3, v3, x865, xzer, v3, v3, v3}; char * x87[] = {x870, x871, x872, x873, x874, x875, x876, x877, v3, v3}; char * x88[] = {x880, v3, v3, x883, v3, x885, x886, v3, v3, v3}; char * x89[] = {just1, v3, v3, v3, v3, v3, x896, x897, v3, v3}; char * x90[] = {x900, v3, v3, v3, v3, v3, v3, v3, v3, v3}; char * x96[] = {v3, v3, v3, v3, v3, v3, v3, x967, v3, v3}; char * x98[] = {v3, v3, x982, x983, v3, v3, v3, v3, v3, v3}; char * * x0[] = {x00, x01, x02, x03, v2, v2, v2, x07, v2, x09}; char * * x8[] = {v2, x81, x82, x83, x84, x85, x86, x87, x88, x89}; char * * x9[] = {x90, v2, v2, v2, v2, v2, x96, v2, x98, v2}; char * * v1[] = {v2, v2, v2, v2, v2, v2, v2, v2, v2, v2}; char * * * v[] = {x0, v1, v1, v1, v1, v1, v1, v1, x8, x9}; char utf; void Utf(int m, uint a){ if (a & m) {Utf(m>>1, a>>6); putchar(128 | a & 63);} else putchar((m<<1)&255 | a);} void utf8(uint a){if(a & -128) { Utf(-32, a>>6); putchar(128 | a & 63);} else putchar(a);} void s(uint j){ printf("%08X", j); utf8(j); printf("\n");} char val(uint j){return j<10000? v[j/1000][j%1000/100][j%100/10][j%10]:1;} void p(int j){int k, l; for(l = 0; l<10; ++l) {printf("\n%3d", l); for(k = 0; k<10; ++k) {int cc = 10*l+j+k; printf(""); if(utf) utf8(cc); else printf("&#%d;", cc);}} } int main(){ char * ag = getenv("QUERY_STRING"); printf("content-type: text/html"); if(memcmp(ag, "xx=", 3)) { printf("\n\nThe following string should end the URL for this function:\n" "
"?xx=n" where n is a code block number.\n"); } else { int j = atoi(ag+3); utf = !!strchr(ag+3, ','); if(utf) printf("; charset=UTF-8"); printf("\n\n"); printf("\nYield of " "\"&#%dyx;\":" "" "" "" " hex\n", j, j-1, j+1, j*100/256); if(utf) printf("ASCII-7", j); else printf("utf-8", j); printf("\n
"); {int J; for(J=0; J<10; ++J) printf("%d", J);} {int J; for(J = j*100; J<(j+1)*100; J += 100) p(J);} printf("\n
"); printf("\n");} return 0;}