debian/0000775000000000000000000000000012216037113007164 5ustar debian/patches/0000755000000000000000000000000012216037113010611 5ustar debian/patches/debian-changes0000644000000000000000000015076612216037113013403 0ustar Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . xjokes (1.0-14) unstable; urgency=low . * dh9 * bump standards version, no changes required * update collab-maint git repo url to naming scheme du jour Author: Barak A. Pearlmutter --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- xjokes-1.0.orig/mori.xbm +++ xjokes-1.0/mori.xbm @@ -1,46 +1,47 @@ #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}; + 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/u2.xbm +++ xjokes-1.0/u2.xbm @@ -1,14 +1,15 @@ #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}; + 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/yasiti.c +++ xjokes-1.0/yasiti.c @@ -1,5 +1,7 @@ #include #include +#include +#include #include "u1.xbm" #include "u2.xbm" @@ -7,195 +9,217 @@ #include "u4.xbm" #define DIN 11 -Display *dpy; -Window win; -int screen; +Display *dpy; +Window win; +int screen; -usage(filename) -char *filename; +void +usage (char *filename) { - fprintf(stderr, "Usage: %s [-display ]\n", filename); - exit(1); + 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); +extern void do_all (); - 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); +int +main (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(); + XSync (dpy, 0); + do_all (); - exit(0); + exit (0); } -do_all() +void +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++; + int height, width; + int dir, w, h, ox, oy; + int i, 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; + 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; + default: + fprintf (stderr, "internal error\n"); + exit (1); + 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); + 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; + + dir = (dir + 1) & 3; + lx = x; + ly = y; } - - if( --lc1 == 0){ - lcc--; - ln--; - if( lcc == 0){ - lc2--; - lcc = 3; + + if (--lc1 == 0) + { + lcc--; + ln--; + if (lcc == 0) + { + lc2--; + lcc = 3; } - lc1 = lc2; + lc1 = lc2; } - - + + } - XSync( dpy, 0); + XSync (dpy, 0); } - --- xjokes-1.0.orig/mori1.c +++ xjokes-1.0/mori1.c @@ -1,151 +1,174 @@ #include #include +#include +#include #include "mori.xbm" #include "mori2.xbm" -Display *dpy; -Window win; -int screen; +Display *dpy; +Window win; +int screen; -usage(filename) -char *filename; +void +usage (char *filename) { - fprintf(stderr, "Usage: %s [-display ]\n", filename); - exit(1); + 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); - } +extern void do_all (); - 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); +int +main (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); + XSync (dpy, 0); - do_all(); + do_all (); - exit(0); + exit (0); } -typedef struct{ - int x, y; - int d; +typedef struct +{ + int x, y; + int d; } mask_type; -int comp( i, j ) +int +comp (i, j) mask_type *i, *j; { - return i->d - j->d; + return i->d - j->d; } -#define SQR(a) (a) * (a) -do_all() +inline int +isqr (int a) { - 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++; + return a * a; +} + +void +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 = isqr (x - (xn / 2)) + isqr (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], + qsort (mask, xn * yn, sizeof (mask_type), comp); + + gcvals.foreground = BlackPixel (dpy, screen); + gcvals.background = WhitePixel (dpy, screen); + gcvals.function = GXcopy; + 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); -} + 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/mori2.xbm +++ xjokes-1.0/mori2.xbm @@ -1,46 +1,47 @@ #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}; + 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/u1.xbm +++ xjokes-1.0/u1.xbm @@ -1,14 +1,15 @@ #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}; + 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/README +++ xjokes-1.0/README @@ -1,16 +1,16 @@ -meltdown に影響されて作ったプログラムです。 +meltdown 綵演帥篏c違с -4つの独立したプログラムから構成されています。簡単なプロフィールなど +鐚ゃ腴違罕障膂≦c若 - yasiti : ブラックホールのつもりが風車に見える - blackhole : 内輪では、一番評判がいい - mori1 : 見た人を呆れさせたかった - mori2 : ビットマップを大きくしろとの要望に答えて + yasiti : 若ゃ蘂荵荀 + blackhole : 莠с筝荅ゃ + mori1 : 荀篋冴c + mori2 : 紊с荀膈 -手抜きの Makefile をつけておきましたので、コンパイル実行して下さい。 + Makefile ゃ障с潟潟ゃ絎茵筝 -配布・改造 問答無用、好きにして下さい。楽しんでいたたければ幸いです。 +絽紙拷 靁∞絅純筝罐純с医晃с ^^^^^^^^ -日本たばこ産業株式会社 生産技術開発センター -古谷 努 E-mail : furuya@joyful1.jtim.snet.or.jp +ユ違fキ綣鋍腓 f茵冴祉潟帥 +よ扱 E-mail : furuya@joyful1.jtim.snet.or.jp --- xjokes-1.0.orig/Makefile +++ xjokes-1.0/Makefile @@ -1,20 +1,28 @@ -CFLAGS = -O -LDFLAGS = -lX11 -CC = cc +CFLAGS += -O +CPPFLAGS += -Wall +LOADLIBES = -lX11 -all: yasiti blackhole mori1 mori2 +progs = yasiti blackhole mori1 mori2 + +prefix = /usr/local +exec_prefix = $(prefix) +bindir = $(exec_prefix)/bin + +all: $(progs) -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 +INSTALL = install +INSTALL_PROGRAM = $(INSTALL) + +install: all + mkdir -p $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) $(progs) $(DESTDIR)$(bindir)/ + +uninstall: + -cd $(DESTDIR)$(bindir) && rm -f $(progs) + +clean: + -rm -f $(progs) *.o + +.PHONY: all install uninstall clean --- xjokes-1.0.orig/u3.xbm +++ xjokes-1.0/u3.xbm @@ -1,14 +1,15 @@ #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}; + 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/mori2.c +++ xjokes-1.0/mori2.c @@ -1,161 +1,190 @@ #include #include +#include +#include #include "mori.xbm" #include "mori2.xbm" -#define SQR(a) ((a) * (a)) - -Display *dpy; -Window win; -int screen; - -usage(filename) -char *filename; +inline int +isqr (int a) { - fprintf(stderr, "Usage: %s [-display ]\n", filename); - exit(1); + return a * a; } -main(argc, argv) - int argc; - char **argv; -{ - char *display = NULL; - unsigned long vmask; - XSetWindowAttributes xswat; +Display *dpy; +Window win; +int screen; - 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); - } +void +usage (char *filename) +{ + fprintf (stderr, "Usage: %s [-display ]\n", filename); + exit (1); +} - screen = DefaultScreen(dpy); +extern void do_all (); - 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); +int +main (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); + XSync (dpy, 0); - do_all(); + do_all (); - /* NOTREACHED */ - exit(0); + /* NOTREACHED */ + exit (0); } -typedef struct{ - int x, y, m; - int d; +typedef struct +{ + int x, y, m; + int d; } mask_type; -int comp( i, j ) - mask_type *i, *j; +int +comp (const void *ii, const void *jj) { - return i->d - j->d; + const mask_type *i = ii; + const mask_type *j = jj; + 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++; +int +bit (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 = isqr (xx - mori_width / 2) + isqr (y - mori_height / 2); + if (m->d <= isqr (mori_width / 3) * 2) + { + num++; + m++; } } } } - return num; + return num; } -do_all() +void +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++; + 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 < numt; i++) + { + if (mask[i].m != maskt[i].m) + { + m->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++; + 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; + if (ox < 300) + break; } - m = mask2; + m = mask2; - XSync( dpy, 0); - sleep(1); + 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++; + 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); + XSync (dpy, 0); + sleep (2); } --- xjokes-1.0.orig/blackhole.c +++ xjokes-1.0/blackhole.c @@ -1,147 +1,170 @@ #include #include +#include +#include #define N 10 -Display *dpy; -Window win; -GC copygc, fillgc; -int screen; +Display *dpy; +Window win; +GC copygc, fillgc; +int screen; -usage(filename) -char *filename; +void +usage (char *filename) { - fprintf(stderr, "Usage: %s [-display ]\n", filename); - exit(1); + 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; - +extern void do_all (); - switch( argc ){ - case 1: break; - case 3: display = argv[2]; break; - default: usage( argv[0]); exit(1); +int +main (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); + 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); + screen = DefaultScreen (dpy); - gcvals.graphics_exposures = False; + 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 = 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); - fillgc = XCreateGC(dpy, win, GCForeground, &gcvals); + XSync (dpy, 0); - XSync(dpy, 0); + do_all (); - do_all(); - - exit(0); + exit (0); } -typedef struct{ - int x, y; - int d; +typedef struct +{ + int x, y; + int d; } mask_type; -int comp( i, j ) - mask_type *i, *j; +int +comp (const void *ii, const void *jj) { - return i->d - j->d; + const mask_type *i = ii; + const mask_type *j = jj; + return i->d - j->d; } -mask_type *mask; -#define SQR(a) ((a) * (a)) +mask_type *mask; -mov( fw, tw, width, height) - int fw, tw, width, height; +inline int +isqr (int a) { - 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; + return a * a; +} - 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++; +void +mov (int fw, int tw, int width, int 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); + 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++; +void +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 = isqr ((x + 1) * 2 - N) + isqr ((y + 1) * 2 - N); + ma++; } } - qsort( mask, N * N, sizeof( mask_type), comp); + qsort (mask, N * N, sizeof (mask_type), comp); - for( w = width; w > 30; w -= 10){ - mov( w, w - 10, width, height); + 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); + + XFillRectangle (dpy, win, fillgc, 0, 0, width, height); + + XSync (dpy, 0); + sleep (1); + exit (1); } --- xjokes-1.0.orig/u4.xbm +++ xjokes-1.0/u4.xbm @@ -1,14 +1,15 @@ #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}; + 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 +}; debian/patches/series0000644000000000000000000000001712216037113012024 0ustar debian-changes debian/source/0000775000000000000000000000000011646763446010511 5ustar debian/source/format0000664000000000000000000000001411635613755011712 0ustar 3.0 (quilt) debian/control0000664000000000000000000000075312216035727010605 0ustar Source: xjokes Section: games Priority: optional Maintainer: Barak A. Pearlmutter Build-Depends: debhelper (>= 9), libx11-dev Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/collab-maint/xjokes.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/xjokes.git Package: xjokes Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: X11 jokes Four small funny programs to tweak an X11 display: yasiti, blackhole, mori1, and mori2. debian/xjokes.manpages0000664000000000000000000000002311711523611012201 0ustar debian/blackhole.6 debian/changelog0000664000000000000000000000500612216036340011040 0ustar xjokes (1.0-14) unstable; urgency=low * dh9 * bump standards version, no changes required * update collab-maint git repo url to naming scheme du jour -- Barak A. Pearlmutter Tue, 17 Sep 2013 12:28:32 +0100 xjokes (1.0-13) unstable; urgency=low * Adopted * Update packaging scripts * Tweak sources into modernity -- Barak A. Pearlmutter Mon, 30 Jan 2012 14:11:40 +0000 xjokes (1.0-12) unstable; urgency=low * Orphaned (#448111). Set maintainer to QA Group. -- Kenshi Muto Fri, 26 Oct 2007 15:30:34 +0900 xjokes (1.0-11) unstable; urgency=low * Changed rules base from debmake to standard build rule. -- Kenshi Muto Sun, 15 Jan 2006 14:20:42 +0000 xjokes (1.0-10) unstable; urgency=low * Remove /usr/doc link. * Fix FTBFS of xlibs-dev transition (closes: #346931) -- Kenshi Muto Mon, 15 Aug 2005 23:35:56 +0000 xjokes (1.0-9) unstable; urgency=low * Apply manpage created by Timo. Thanks! (closes: #225819) -- Kenshi Muto Sun, 24 Jul 2005 02:52:27 +0000 xjokes (1.0-8) unstable; urgency=low * xjokes binaries are moved /usr/games. They are not important, but their file name will be conflict with more important package. -- Kenshi Muto Wed, 11 Sep 2002 14:09:45 +0900 xjokes (1.0-7) unstable; urgency=low * Really modified for Policy 3.2.1.0 (Oops, I must read it more carefully...) Thanks Watson. (closes: Bug#82784, Bug#82786) -- Kenshi Muto Fri, 19 Jan 2001 19:46:36 +0900 xjokes (1.0-6) unstable; urgency=low * Applied TrueColor patch. Thanks Bill. (closes: Bug#81925) * Compiled with glibc 2.2 and X 4.0. * Modified for Policy 3.2.1.0. -- Kenshi Muto Tue, 16 Jan 2001 21:51:02 +0900 xjokes (1.0-5) unstable; urgency=low * Fixed source missing. -- Kenshi Muto Mon, 30 Aug 1999 10:14:52 +0900 xjokes (1.0-4) unstable; urgency=low * Initial official release for Debian Project. -- Kenshi Muto Mon, 23 Aug 1999 11:27:07 +0900 xjokes (1.0-3) frozen-jp; urgency=low * Fixed lintian check errors. * Fixed Bug#JP/365. -- Masahiro TANAKA Thu, 11 Jun 1998 02:37:00 +0900 xjokes (1.0-2) hamm-jp; urgency=low * hamm Release. -- Masahiro TANAKA Sat, 8 Nov 1997 22:29:18 +0900 xjokes (1.0-1) unstable; urgency=low * Initial Release. -- Masahiro TANAKA Tue, 14 Oct 1997 02:59:37 +0900 debian/copyright0000664000000000000000000000146511711527362011136 0ustar This package was debianized by Kenshi Muto kmuto@debian.org on Mon, 23 Aug 1999 10:57:40 +0900. It was downloaded from ftp://stardust.sfc.wide.ad.jp/pub/JG/sources/xjokes.tar.Z Copyright: Copyright 1997 Tsutomu Hurutani This program inspirated by meltdown. This package contains four unique programs. Profile: yasiti : Blackhole or windmill. blackhole : This program has good reputation on my friends. mori1 : I want everyone amaze. mori2 : This is same as mori1, but bitmap is more large. I added roughly Makefile,so you can compile this and run. License: You can distribute and modify this without any permission.Enjoy this. Japan Tabako Co.,Ltd. Tsutomu Hurutani E-mail: furuya@joyful1.jtim.snet.or.jp This file translated by Kenshi Muto See also original file copyright.jp. debian/xjokes.links0000664000000000000000000000030711711523425011536 0ustar /usr/share/man/man6/blackhole.6.gz /usr/share/man/man6/yasiti.6.gz /usr/share/man/man6/blackhole.6.gz /usr/share/man/man6/mori1.6.gz /usr/share/man/man6/blackhole.6.gz /usr/share/man/man6/mori2.6.gz debian/compat0000664000000000000000000000000212216035661010370 0ustar 9 debian/README.Debian0000664000000000000000000000030011711521167011224 0ustar xjokes for DEBIAN ---------------------- Run X and type following commands on terminal window. blackhole yasiti mori1 mori2 Kenshi Muto , Mon, 23 Aug 1999 13:09:46 +0900 debian/docs0000664000000000000000000000002411711521166010040 0ustar debian/copyright.jp debian/copyright.jp0000664000000000000000000000146511711527320011540 0ustar This package was debianized by Kenshi Muto kmuto@debian.org on Mon, 23 Aug 1999 10:57:40 +0900. It was downloaded from ftp://stardust.sfc.wide.ad.jp/pub/JG/sources/xjokes.tar.Z Copyright: meltdown $B$K1F6A$5$l$F:n$C$?%W%m%0%i%`$G$9!#(B $B#4$D$NFHN)$7$?%W%m%0%i%`$+$i9=@.$5$l$F$$$^$9!#4JC1$J%W%m%U%#!<%k$J$I(B yasiti : $B%V%i%C%/%[!<%k$N$D$b$j$,IwH=$,$$$$(B mori1 : $B8+$??M$rJr$l$5$;$?$+$C$?(B mori2 : $B%S%C%H%^%C%W$rBg$-$/$7$m$H$NMWK>$KEz$($F(B $B] .SH DESCRIPTION .TP .B blackhole produces an animated zoom-out effect on a display. The display will be restored afterwards. .TP .B mori1 tiles a display with the face of a girl winking at you. The display will be restored afterwards. .TP .B mori2 displays the face of a girl winking at you. The display will be restored afterwards. .TP .B yasiti displays a rotating black object at the center of the screen. The display will be restored afterwards. .SH OPTIONS .TP .B \-display displayname With this argument you can determine on which display the programs should draw. By default, the display specified by the DISPLAY environment variable is used. .SH "SEE ALSO" .BR X (7) .SH AUTHOR This manual page was written by Timo Schneider , for the Debian project (but may be used by others). debian/rules0000775000000000000000000000015211711615141010244 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_install: dh_auto_install -- prefix=/usr bindir=/usr/games