xjokes-1.0.orig/ 40755 1750 1750 0 5226200576 12524 5ustar tanakatanakaxjokes-1.0.orig/mori1.c100644 1750 1750 6752 5225733070 14025 0ustar tanakatanaka#include #include #include "mori.xbm" #include "mori2.xbm" Display *dpy; Window win; int screen; usage(filename) char *filename; { fprintf(stderr, "Usage: %s [-display ]\n", filename); exit(1); } main(argc, argv) int argc; char **argv; { char *display = NULL; unsigned long vmask; XSetWindowAttributes xswat; switch( argc ){ case 1: break; case 3: display = argv[2]; break; default: usage( argv[0]); exit(1); } if ((dpy = XOpenDisplay(display)) == NULL){ fprintf(stderr, "can't open display\n"); exit(0); } screen = DefaultScreen(dpy); xswat.override_redirect = True; xswat.do_not_propagate_mask = KeyPressMask | KeyReleaseMask |ButtonPressMask | ButtonReleaseMask; vmask = CWOverrideRedirect | CWDontPropagate; win = XCreateWindow(dpy, RootWindow(dpy, screen), 0, 0, DisplayWidth(dpy, screen), DisplayHeight(dpy, screen), 0, CopyFromParent, CopyFromParent, CopyFromParent, vmask, &xswat); XMapWindow(dpy, win); XSync(dpy, 0); do_all(); exit(0); } typedef struct{ int x, y; int d; } mask_type; int comp( i, j ) mask_type *i, *j; { return i->d - j->d; } #define SQR(a) (a) * (a) do_all() { int height, width; int xn, yn, i; GC morigc[2]; Pixmap mori[2], p[2]; mask_type *mask, *m; int x, y; XGCValues gcvals; static char *(bit[2]) = {mori_bits, mori2_bits}; GC copygc, fillgc; gcvals.graphics_exposures = False; gcvals.foreground = 1; gcvals.background = 0; copygc = XCreateGC(dpy, win, GCForeground | GCBackground | GCGraphicsExposures, &gcvals); gcvals.foreground = WhitePixel(dpy, screen); fillgc = XCreateGC(dpy, win, GCForeground, &gcvals); width = DisplayWidth(dpy, screen); height = DisplayHeight(dpy, screen); xn = width / mori_width; yn = height /mori_height; m = mask = (mask_type *)malloc( sizeof(mask_type) * xn * yn); for( y = 0; y < yn; y++){ for( x = 0; x < xn; x++){ m->d = SQR(x - ( xn / 2)) + SQR(y - ( yn / 2)); m->x = x; m->y = y; m++; } } qsort( mask, xn * yn, sizeof( mask_type), comp); gcvals.foreground = BlackPixel(dpy, screen); gcvals.background = WhitePixel(dpy, screen); gcvals.function = GXset; gcvals.fill_style = FillStippled; for( i = 0; i < 2; i++){ mori[i] = XCreateBitmapFromData(dpy, win, bit[i], mori_width, mori_height); morigc[i] = XCreateGC(dpy, win, GCForeground|GCBackground|GCFillStyle|GCFunction, &gcvals); XSetStipple( dpy, morigc[i], mori[i]); p[i] = XCreatePixmap(dpy, win, mori_width, mori_height, DefaultDepth( dpy, 0)); XFillRectangle(dpy, p[i], fillgc, 0, 0, mori_width, mori_height); XFillRectangle(dpy, p[i], morigc[i], 0, 0, mori_width, mori_height); } for( m = mask, i = 0; i < xn * yn; i++, m++){ XCopyArea(dpy, p[0], win, copygc, 0, 0, mori_width, mori_height, m->x * mori_width, m->y * mori_height); XSync( dpy, 0 ); usleep(1000); } XSync( dpy, 0); sleep(1); for( m = mask, i = 0; i < xn * yn; i++, m++){ XCopyArea(dpy, p[1], win, copygc, 0, 0, mori_width, mori_height, m->x * mori_width, m->y * mori_height); } XSync( dpy, 0); sleep(1); for( m = mask, i = 0; i < xn * yn; i++, m++){ XCopyArea(dpy, p[0], win, copygc, 0, 0, mori_width, mori_height, m->x * mori_width, m->y * mori_height); } XSync( dpy, 0); sleep(1); } xjokes-1.0.orig/u1.xbm100644 1750 1750 1545 5222762326 13665 0ustar tanakatanaka#define u1_width 32 #define u1_height 32 static char u1_bits[] = { 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x07, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfe, 0xff, 0x0f, 0x80, 0xff, 0xff, 0x1f, 0xc1, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x8f, 0xf0, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00}; xjokes-1.0.orig/u2.xbm100644 1750 1750 1545 5222762451 13665 0ustar tanakatanaka#define u2_width 32 #define u2_height 32 static char u2_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x3e, 0x18, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xff, 0x5f, 0x80, 0xff, 0xff, 0x0f, 0x80, 0xff, 0xff, 0x07, 0x80, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x07, 0x80, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07, 0xf4, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x03, 0x80, 0xff, 0xe7, 0x03, 0x00, 0xf8, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00}; xjokes-1.0.orig/u3.xbm100644 1750 1750 1545 5222762550 13666 0ustar tanakatanaka#define u3_width 32 #define u3_height 32 static char u3_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0xf0, 0x37, 0xe0, 0x80, 0xff, 0x1f, 0xe0, 0xc0, 0xff, 0x0f, 0xe0, 0xe1, 0xff, 0x07, 0xc0, 0xf3, 0xff, 0x07, 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x03, 0x00, 0xfe, 0xff, 0x07, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0xff, 0xff, 0x0f, 0x00, 0xff, 0xff, 0x0f, 0x00, 0xff, 0xff, 0x0f, 0x80, 0xff, 0xef, 0x0f, 0xc0, 0xff, 0x83, 0x0f, 0xe0, 0xfe, 0x01, 0x1c, 0x68, 0xf8, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xjokes-1.0.orig/u4.xbm100644 1750 1750 1545 5222762615 13671 0ustar tanakatanaka#define u4_width 32 #define u4_height 32 static char u4_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x04, 0xfc, 0x7f, 0x00, 0xfe, 0xfc, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0x1f, 0xc0, 0xff, 0xff, 0x3f, 0x80, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xff, 0x40, 0x00, 0xfc, 0x7f, 0x40, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xe6, 0x0f, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xjokes-1.0.orig/Makefile100644 1750 1750 556 5225731552 14251 0ustar tanakatanakaCFLAGS = -O LDFLAGS = -lX11 CC = cc all: yasiti blackhole mori1 mori2 yasiti: yasiti.o $(CC) $@.o -o $@ $(LDFLAGS) yasiti.o: yasiti.c u1.xbm u2.xbm u3.xbm u4.xbm blackhole: blackhole.o $(CC) $@.o -o $@ $(LDFLAGS) blackhole.o: blackhole.c mori1: mori1.o $(CC) $@.o -o $@ $(LDFLAGS) mori1.o: mori1.c mori2: mori2.o $(CC) $@.o -o $@ $(LDFLAGS) mori2.o: mori2.c xjokes-1.0.orig/mori2.c100644 1750 1750 6231 5226200436 14012 0ustar tanakatanaka#include #include #include "mori.xbm" #include "mori2.xbm" #define SQR(a) ((a) * (a)) Display *dpy; Window win; int screen; usage(filename) char *filename; { fprintf(stderr, "Usage: %s [-display ]\n", filename); exit(1); } main(argc, argv) int argc; char **argv; { char *display = NULL; unsigned long vmask; XSetWindowAttributes xswat; switch( argc ){ case 1: break; case 3: display = argv[2]; break; default: usage( argv[0]); exit(1); } if ((dpy = XOpenDisplay(display)) == NULL){ fprintf(stderr, "can't open display\n"); exit(0); } screen = DefaultScreen(dpy); xswat.override_redirect = True; xswat.do_not_propagate_mask = KeyPressMask | KeyReleaseMask |ButtonPressMask | ButtonReleaseMask; vmask = CWOverrideRedirect | CWDontPropagate; win = XCreateWindow(dpy, RootWindow(dpy, screen), 0, 0, DisplayWidth(dpy, screen), DisplayHeight(dpy, screen), 0, CopyFromParent, CopyFromParent, CopyFromParent, vmask, &xswat); XMapWindow(dpy, win); XSync(dpy, 0); do_all(); /* NOTREACHED */ exit(0); } typedef struct{ int x, y, m; int d; } mask_type; int comp( i, j ) mask_type *i, *j; { return i->d - j->d; } int bit( s, mask) char *s; mask_type **mask; { int num, x, y; mask_type *m; m = *mask = (mask_type*)malloc( sizeof(mask_type)*mori_width* mori_height); num = 0; for( y = 0; y < mori_height; y++){ for( x = 0; x < mori_width / 8; x++){ unsigned char c; int i, xx; c = *s++; for( i = 0; i < 8; i++){ xx = x * 8 + i; m->x = xx; m->y = y; m->m = c & 1; c >>= 1; m->d = SQR( xx - mori_width / 2) + SQR( y - mori_height / 2); if ( m->d <= SQR( mori_width / 3) * 2 ){ num++; m++; } } } } return num; } do_all() { int height, width; mask_type *mask, *m, *maskt, *mask2; int i, sc; int num, numt, num2; int ox, oy; GC bgc[2]; XGCValues gcvals; gcvals.foreground = WhitePixel( dpy, screen); bgc[0] = XCreateGC(dpy, win, GCForeground, &gcvals); gcvals.foreground = BlackPixel( dpy, screen); bgc[1] = XCreateGC(dpy, win, GCForeground, &gcvals); width = DisplayWidth(dpy, screen); height = DisplayHeight(dpy, screen); num = bit( mori_bits, &mask); numt = bit( mori2_bits, &maskt); m = mask2 = (mask_type*)malloc( sizeof( mask_type) * numt); num2 = 0; for( i = 0; i x = maskt[i].x; m->y = maskt[i].y; m->m = maskt[i].m; m++; num2++; } } qsort( mask, num, sizeof( mask_type), comp); for( sc = 1; ; sc++){ m = mask; ox = (width - sc * mori_width) /2 ; oy = (height - sc * mori_height) /2 ; for( i = 0; i < num; i++){ XFillRectangle(dpy, win, bgc[ m->m], ox + m->x * sc, oy + m->y * sc, sc, sc); m++; } if ( ox < 300 ) break; } m = mask2; XSync( dpy, 0); sleep(1); for( i = 0; i < num2; i++){ XFillRectangle(dpy, win, bgc[ m->m], ox + m->x * sc, oy + m->y * sc, sc, sc); m++; } XSync( dpy, 0); sleep(2); } xjokes-1.0.orig/mori.xbm100644 1750 1750 6313 5224203445 14276 0ustar tanakatanaka#define mori_width 64 #define mori_height 64 static char mori_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x1d, 0x11, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4c, 0x44, 0x74, 0x00, 0x00, 0x00, 0x00, 0x30, 0x11, 0x11, 0xf1, 0x00, 0x00, 0x00, 0x00, 0x78, 0x44, 0x44, 0xc4, 0x01, 0x00, 0x00, 0x00, 0x16, 0x11, 0x11, 0x11, 0x03, 0x00, 0x00, 0x00, 0x47, 0x44, 0x44, 0x64, 0x06, 0x00, 0x00, 0x80, 0x11, 0x11, 0x11, 0x91, 0x0c, 0x00, 0x00, 0x60, 0x44, 0xfe, 0x5f, 0x44, 0x19, 0x00, 0x00, 0x20, 0x91, 0xff, 0xff, 0x11, 0x13, 0x00, 0x00, 0x50, 0xc4, 0xff, 0xff, 0x47, 0x34, 0x00, 0x00, 0x10, 0xf1, 0x01, 0xe0, 0x1f, 0x29, 0x00, 0x00, 0x48, 0x7c, 0x58, 0x44, 0x7f, 0x6c, 0x00, 0x00, 0x38, 0x19, 0x1d, 0x11, 0xf8, 0x51, 0x00, 0x00, 0x58, 0x4c, 0x44, 0x54, 0xc4, 0x74, 0x00, 0x00, 0x08, 0x71, 0x1d, 0x29, 0x91, 0x71, 0x00, 0x00, 0x50, 0x24, 0x48, 0x6d, 0x4c, 0xe4, 0x00, 0x00, 0x10, 0x73, 0x1d, 0x39, 0x15, 0xd1, 0x00, 0x00, 0x50, 0xa6, 0x48, 0x75, 0x53, 0xc4, 0x00, 0x00, 0x10, 0xb3, 0x15, 0x55, 0x13, 0xd1, 0x00, 0x00, 0x48, 0xe4, 0x53, 0xa5, 0x51, 0x84, 0x00, 0x00, 0x18, 0x39, 0x1e, 0x57, 0x53, 0x91, 0x00, 0x00, 0x48, 0x2c, 0x72, 0x96, 0xe2, 0xc4, 0x00, 0x00, 0x78, 0x3b, 0x74, 0xf7, 0xc1, 0x91, 0x00, 0x00, 0xa8, 0x76, 0xd4, 0x3a, 0x80, 0x87, 0x00, 0x00, 0x78, 0x5b, 0xf8, 0x15, 0x80, 0x92, 0x00, 0x00, 0x30, 0x6e, 0x00, 0x0f, 0x80, 0xa6, 0x01, 0x00, 0x70, 0x1f, 0x00, 0xe0, 0x8f, 0xb2, 0x01, 0x00, 0x20, 0x96, 0x3f, 0xf0, 0x91, 0x0e, 0x01, 0x00, 0x70, 0xc7, 0x1e, 0xe0, 0x81, 0x52, 0x01, 0x00, 0xc0, 0x06, 0x0e, 0x00, 0x80, 0x0e, 0x01, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x80, 0x52, 0x01, 0x00, 0x40, 0x0e, 0x40, 0x00, 0x80, 0x0d, 0x01, 0x00, 0x40, 0x0f, 0x40, 0x00, 0x80, 0x41, 0x01, 0x00, 0xc0, 0x1a, 0x40, 0x00, 0xc0, 0x17, 0x01, 0x00, 0x40, 0x13, 0x40, 0x00, 0xc0, 0x40, 0x01, 0x00, 0x40, 0x12, 0x00, 0x00, 0xc0, 0x14, 0x01, 0x00, 0x40, 0x1d, 0x00, 0x00, 0x60, 0x41, 0x01, 0x00, 0x40, 0x10, 0x00, 0x00, 0x60, 0x16, 0x01, 0x00, 0x40, 0x21, 0xc0, 0x07, 0x50, 0x41, 0x01, 0x00, 0x40, 0x54, 0xc0, 0x07, 0x48, 0x94, 0x00, 0x00, 0x40, 0xc1, 0x80, 0x01, 0x4c, 0xc1, 0x00, 0x00, 0x40, 0x94, 0x03, 0x00, 0x4e, 0x94, 0x00, 0x00, 0x40, 0x41, 0x07, 0x00, 0xc7, 0xc0, 0x00, 0x00, 0x40, 0x14, 0x3f, 0xc0, 0x47, 0x97, 0x00, 0x00, 0x40, 0x41, 0xf3, 0xff, 0x63, 0x7e, 0x00, 0x00, 0x40, 0x14, 0xc3, 0xff, 0x61, 0x15, 0x00, 0x00, 0x40, 0x41, 0x03, 0x7f, 0xe0, 0x01, 0x00, 0x00, 0x40, 0x14, 0x03, 0x3e, 0x70, 0x00, 0x00, 0x00, 0xc0, 0x41, 0x03, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xjokes-1.0.orig/mori2.xbm100644 1750 1750 6316 5224203445 14363 0ustar tanakatanaka#define mori2_width 64 #define mori2_height 64 static char mori2_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x1d, 0x11, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4c, 0x44, 0x74, 0x00, 0x00, 0x00, 0x00, 0x30, 0x11, 0x11, 0xf1, 0x00, 0x00, 0x00, 0x00, 0x78, 0x44, 0x44, 0xc4, 0x01, 0x00, 0x00, 0x00, 0x16, 0x11, 0x11, 0x11, 0x03, 0x00, 0x00, 0x00, 0x47, 0x44, 0x44, 0x64, 0x06, 0x00, 0x00, 0x80, 0x11, 0x11, 0x11, 0x91, 0x0c, 0x00, 0x00, 0x60, 0x44, 0xfe, 0x5f, 0x44, 0x19, 0x00, 0x00, 0x20, 0x91, 0xff, 0xff, 0x11, 0x13, 0x00, 0x00, 0x50, 0xc4, 0xff, 0xff, 0x47, 0x34, 0x00, 0x00, 0x10, 0xf1, 0x01, 0xe0, 0x1f, 0x29, 0x00, 0x00, 0x48, 0x7c, 0x58, 0x44, 0x7f, 0x6c, 0x00, 0x00, 0x38, 0x19, 0x1d, 0x11, 0xf8, 0x51, 0x00, 0x00, 0x58, 0x4c, 0x44, 0x54, 0xc4, 0x74, 0x00, 0x00, 0x08, 0x71, 0x1d, 0x29, 0x91, 0x71, 0x00, 0x00, 0x50, 0x24, 0x48, 0x6d, 0x4c, 0xe4, 0x00, 0x00, 0x10, 0x73, 0x1d, 0x39, 0x15, 0xd1, 0x00, 0x00, 0x50, 0xa6, 0x48, 0x75, 0x53, 0xc4, 0x00, 0x00, 0x10, 0xb3, 0x15, 0x55, 0x13, 0xd1, 0x00, 0x00, 0x48, 0xe4, 0x53, 0xa5, 0x51, 0x84, 0x00, 0x00, 0x18, 0x39, 0x1e, 0x57, 0x53, 0x91, 0x00, 0x00, 0x48, 0x2c, 0x72, 0x96, 0xe2, 0xc4, 0x00, 0x00, 0x78, 0x3b, 0x74, 0xf7, 0xc1, 0x91, 0x00, 0x00, 0xa8, 0x76, 0xd4, 0x3a, 0x80, 0x87, 0x00, 0x00, 0x78, 0x5b, 0xf8, 0x15, 0x80, 0x92, 0x00, 0x00, 0x30, 0x6e, 0x00, 0x0f, 0x80, 0xa6, 0x01, 0x00, 0x70, 0x1f, 0x00, 0xe0, 0x8f, 0xb2, 0x01, 0x00, 0x20, 0x36, 0x00, 0xf0, 0x91, 0x0e, 0x01, 0x00, 0x70, 0xc7, 0x1f, 0xe0, 0x81, 0x52, 0x01, 0x00, 0xc0, 0x16, 0x00, 0x00, 0x80, 0x0e, 0x01, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x80, 0x52, 0x01, 0x00, 0x40, 0x0e, 0x40, 0x00, 0x80, 0x0d, 0x01, 0x00, 0x40, 0x0f, 0x40, 0x00, 0x80, 0x41, 0x01, 0x00, 0xc0, 0x1a, 0x40, 0x00, 0xc0, 0x17, 0x01, 0x00, 0x40, 0x13, 0x40, 0x00, 0xc0, 0x40, 0x01, 0x00, 0x40, 0x12, 0x00, 0x00, 0xc0, 0x14, 0x01, 0x00, 0x40, 0x1d, 0x00, 0x00, 0x60, 0x41, 0x01, 0x00, 0x40, 0x10, 0x00, 0x00, 0x60, 0x16, 0x01, 0x00, 0x40, 0x21, 0xc0, 0x07, 0x50, 0x41, 0x01, 0x00, 0x40, 0x54, 0xc0, 0x07, 0x48, 0x94, 0x00, 0x00, 0x40, 0xc1, 0x80, 0x01, 0x4c, 0xc1, 0x00, 0x00, 0x40, 0x94, 0x03, 0x00, 0x4e, 0x94, 0x00, 0x00, 0x40, 0x41, 0x07, 0x00, 0xc7, 0xc0, 0x00, 0x00, 0x40, 0x14, 0x3f, 0xc0, 0x47, 0x97, 0x00, 0x00, 0x40, 0x41, 0xf3, 0xff, 0x63, 0x7e, 0x00, 0x00, 0x40, 0x14, 0xc3, 0xff, 0x61, 0x15, 0x00, 0x00, 0x40, 0x41, 0x03, 0x7f, 0xe0, 0x01, 0x00, 0x00, 0x40, 0x14, 0x03, 0x3e, 0x70, 0x00, 0x00, 0x00, 0xc0, 0x41, 0x03, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xjokes-1.0.orig/yasiti.c100644 1750 1750 10366 5225732063 14315 0ustar tanakatanaka#include #include #include "u1.xbm" #include "u2.xbm" #include "u3.xbm" #include "u4.xbm" #define DIN 11 Display *dpy; Window win; int screen; usage(filename) char *filename; { fprintf(stderr, "Usage: %s [-display ]\n", filename); exit(1); } main(argc, argv) int argc; char **argv; { char *display = NULL; unsigned long vmask; XSetWindowAttributes xswat; switch( argc ){ case 1: break; case 3: display = argv[2]; break; default: usage( argv[0]); exit(1); } if ((dpy = XOpenDisplay(display)) == NULL){ fprintf(stderr, "can't open display\n"); exit(0); } screen = DefaultScreen(dpy); xswat.override_redirect = True; xswat.do_not_propagate_mask = KeyPressMask | KeyReleaseMask |ButtonPressMask | ButtonReleaseMask; vmask = CWOverrideRedirect | CWDontPropagate; win = XCreateWindow(dpy, RootWindow(dpy, screen), 0, 0, DisplayWidth(dpy, screen), DisplayHeight(dpy, screen), 0, CopyFromParent, CopyFromParent, CopyFromParent, vmask, &xswat); XMapWindow(dpy, win); XSync(dpy, 0); do_all(); exit(0); } do_all() { int height, width; int dir, w, h, ox, oy; int i, j, ll, xp, yp, xd, yd; int x, y, lx, ly, wi, hi; int lc1, lc2, lcc, ln; GC uzugc[4], copygc, fillgc; Pixmap uzu[4], circ; XGCValues gcvals; static char *(bit[4]) = {u4_bits, u3_bits, u2_bits, u1_bits}; width = DisplayWidth(dpy, screen); height = DisplayHeight(dpy, screen); w = width / DIN; h = height / DIN; ox = (DIN / 2) * w + (w - u1_width) / 2; oy = (DIN / 2) * h + (h - u1_height) /2; gcvals.graphics_exposures = False; gcvals.foreground = 1; gcvals.background = 0; copygc = XCreateGC(dpy, win, GCForeground | GCBackground | GCGraphicsExposures, &gcvals); gcvals.foreground = BlackPixel(dpy, screen); fillgc = XCreateGC(dpy, win, GCForeground, &gcvals); gcvals.foreground = BlackPixel(dpy, screen); gcvals.background = WhitePixel(dpy, screen); gcvals.fill_style = FillStippled; for( i = 0; i < 4; i++){ uzu[i] = XCreateBitmapFromData(dpy, win, bit[i], u1_width, u1_height); uzugc[i] = XCreateGC(dpy, win, GCForeground| GCBackground | GCFillStyle| GCGraphicsExposures, &gcvals); XSetStipple( dpy, uzugc[i], uzu[i]); XSetTSOrigin( dpy, uzugc[i], ox % u1_width , oy % u1_height); } circ = XCreatePixmap(dpy, win, u1_width, u1_height, DefaultDepth( dpy, 0)); XCopyArea(dpy, win, circ, copygc, ox, oy, u1_width, u1_height, 0, 0); for( i = 1; i < 20; i++){ XDrawArc( dpy, win, fillgc, ox + ( u1_width - i) / 2, oy + ( u1_height - i )/ 2 , i, i, 0, 360 * 64); XSync(dpy, 0); usleep(100000); } for( i = 50; i ; i--){ XCopyArea(dpy, circ, win, copygc, 0, 0, u1_width, u1_height, ox, oy); XFillRectangle(dpy, win, uzugc[ i & 3], ox, oy, u1_width, u1_height); XSync( dpy, 0); usleep( 100000 ); } XFillRectangle(dpy, win, fillgc, 0, 0, w, h); XFillRectangle(dpy, win, fillgc, 0, h * DIN, width, height - h * DIN); XFillRectangle(dpy, win, fillgc, w * DIN, 0, width - w * DIN, height); lc2 = DIN - 1; lc1 = lc2; lcc = 3; for( ln = DIN * 2 - 1; ln > 1; ){ lx = ly = DIN / 2; ll = 0; for( i = dir = 0; i < ln; i++){ if ( !(i & 1)){ ll++; } switch( dir ){ case 0: x = lx; y = ly - ll; wi = 1; hi = ll; xd = xp = x * w; yp = y * h; yd = ( y + 1) * h; break; case 1: x = lx + ll; y = ly; wi = ll; hi = 1; xd = lx * w; xp = (lx + 1) * w; yd = yp = y * h; break; case 2: x = x; y = ly + ll; wi = 1; hi = ll; xd = xp = x * w; yp = (ly + 1)* h; yd = ly * h; break; case 3: x = lx - ll; y = ly; wi = ll; hi = 1; xd = (x + 1) * w; xp = x * w; yd = yp = y * h; break; } wi *= w; hi *= h; XCopyArea(dpy, win, win, copygc, xp, yp, wi, hi, xd, yd); if( i == 0){ XFillRectangle(dpy, win, uzugc[ lc1 & 3], ox, oy, u1_width, u1_height); } dir = ( dir + 1 ) & 3; lx = x; ly = y; } if( --lc1 == 0){ lcc--; ln--; if( lcc == 0){ lc2--; lcc = 3; } lc1 = lc2; } } XSync( dpy, 0); } xjokes-1.0.orig/blackhole.c100644 1750 1750 6072 5226200400 14700 0ustar tanakatanaka#include #include #define N 10 Display *dpy; Window win; GC copygc, fillgc; int screen; usage(filename) char *filename; { fprintf(stderr, "Usage: %s [-display ]\n", filename); exit(1); } main(argc, argv) int argc; char **argv; { char *display = NULL; unsigned long vmask; XSetWindowAttributes xswat; XGCValues gcvals; switch( argc ){ case 1: break; case 3: display = argv[2]; break; default: usage( argv[0]); exit(1); } if ((dpy = XOpenDisplay(display)) == NULL){ fprintf(stderr, "can't open display\n"); exit(0); } screen = DefaultScreen(dpy); xswat.override_redirect = True; xswat.do_not_propagate_mask = KeyPressMask | KeyReleaseMask |ButtonPressMask | ButtonReleaseMask; vmask = CWOverrideRedirect | CWDontPropagate; win = XCreateWindow(dpy, RootWindow(dpy, screen), 0, 0, DisplayWidth(dpy, screen), DisplayHeight(dpy, screen), 0, CopyFromParent, CopyFromParent, CopyFromParent, vmask, &xswat); XMapWindow(dpy, win); gcvals.graphics_exposures = False; gcvals.foreground = 1; gcvals.background = 0; copygc = XCreateGC(dpy, win, GCForeground | GCBackground | GCGraphicsExposures, &gcvals); gcvals.foreground = BlackPixel(dpy, screen); fillgc = XCreateGC(dpy, win, GCForeground, &gcvals); XSync(dpy, 0); do_all(); exit(0); } typedef struct{ int x, y; int d; } mask_type; int comp( i, j ) mask_type *i, *j; { return i->d - j->d; } mask_type *mask; #define SQR(a) ((a) * (a)) mov( fw, tw, width, height) int fw, tw, width, height; { int w, h; int wx, hy, fox, foy, tox, toy, fh, th, i; mask_type *ma; th = height * tw / (width); w = tw / N; h = th / N; fh = height * fw / (width); wx = fw / N; hy = fh / N; fox = ( width - fw ) / 2; foy = ( height - fh ) / 2; tox = ( width - tw ) / 2; toy = ( height - th ) / 2; ma = mask; for( i = 0; i < N * N ; i++){ XCopyArea(dpy, win, win, copygc, fox + wx * ma->x, foy + hy * ma->y, w, h, tox + w * ma->x, toy + h * ma->y); ma++; } XFillRectangle(dpy, win, fillgc, fox, foy , fw, toy - foy); XFillRectangle(dpy, win, fillgc, fox, foy , tox - fox, fh); XFillRectangle(dpy, win, fillgc, fox, foy + hy * N , fw, toy - foy+5); XFillRectangle(dpy, win, fillgc, fox + wx * N, foy , tox - fox + 5, fh +5); } do_all() { int height, width; int w; int x, y; mask_type *ma; width = DisplayWidth(dpy, screen); height = DisplayHeight(dpy, screen); ma = mask = ( mask_type*)malloc( sizeof( mask_type) * N * N); for( y = 0; y < N; y++){ for( x = 0; x < N; x++){ ma->x = x; ma->y = y; ma->d = SQR( (x+1) * 2 - N ) + SQR( (y+1) * 2 - N); ma++; } } qsort( mask, N * N, sizeof( mask_type), comp); for( w = width; w > 30; w -= 10){ mov( w, w - 10, width, height); } XFillRectangle(dpy, win, fillgc, 0, 0, width, height); XSync( dpy, 0); sleep(1); exit(1); } xjokes-1.0.orig/README100644 1750 1750 1036 5226200645 13476 0ustar tanakatanakameltdown に影響されて作ったプログラムです。 4つの独立したプログラムから構成されています。簡単なプロフィールなど yasiti : ブラックホールのつもりが風車に見える blackhole : 内輪では、一番評判がいい mori1 : 見た人を呆れさせたかった mori2 : ビットマップを大きくしろとの要望に答えて 手抜きの Makefile をつけておきましたので、コンパイル実行して下さい。 配布・改造 問答無用、好きにして下さい。楽しんでいたたければ幸いです。 ^^^^^^^^ 日本たばこ産業株式会社 生産技術開発センター 古谷 努 E-mail : furuya@joyful1.jtim.snet.or.jp