Initial commit!

This commit is contained in:
reddsik
2017-03-26 13:00:19 +02:00
commit c85716f60e
90 changed files with 28790 additions and 0 deletions

478
Amilogo.bm Normal file
View File

@@ -0,0 +1,478 @@
#define amiwmlogo_width 237
#define amiwmlogo_height 237
static char amiwmlogo_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,0x80,0x10,0x11,0x91,0x24,0xe1,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x00,0x00,
0x92,0x24,0x49,0x95,0x00,0x00,0x00,0x00,0x00,0x20,0xa5,0xa4,0x24,0x49,0xe2,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x01,0x00,0x20,0x01,0x00,0x80,
0x00,0x40,0x00,0x20,0x02,0x00,0x00,0x00,0x00,0x10,0x12,0x4a,0x92,0x24,0xe1,
0x00,0x00,0x00,0x00,0x00,0x10,0x92,0x24,0x21,0x40,0x05,0xf8,0x00,0x00,0x20,
0x48,0x0a,0x55,0x80,0x00,0x00,0x00,0x00,0x00,0xa5,0x48,0x21,0x49,0x92,0xe4,
0x00,0x00,0x00,0x20,0x22,0x41,0x00,0x00,0x00,0x08,0x10,0xf8,0x00,0x00,0x00,
0x02,0x20,0x00,0x20,0x14,0x00,0x00,0x00,0x40,0x12,0xa5,0x94,0x24,0xa9,0xf2,
0x00,0x20,0x44,0x02,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0xfd,0x00,0x00,0x90,
0x50,0x85,0x24,0x80,0x42,0x00,0x00,0x00,0x20,0xa4,0x10,0x4a,0xaa,0x24,0xe9,
0x00,0x01,0x00,0x00,0x00,0x00,0x20,0x92,0x24,0x40,0x48,0xfc,0x00,0x00,0x04,
0x04,0x20,0x08,0x00,0x10,0x02,0x00,0x00,0x4a,0x49,0x4a,0x21,0x91,0x92,0xe4,
0x08,0x00,0x00,0x00,0x88,0x88,0x04,0x00,0x80,0x08,0x01,0xfc,0x00,0x00,0x50,
0x11,0x89,0x12,0x00,0x48,0x09,0x00,0x80,0x24,0x12,0xa5,0x94,0x4a,0x4a,0xe0,
0x00,0x80,0x00,0x90,0x00,0x00,0x00,0x00,0x00,0x02,0x28,0x79,0x00,0x00,0x00,
0x00,0x20,0x00,0x00,0x20,0x20,0x00,0x50,0x92,0xa4,0x10,0x52,0x24,0x29,0xe0,
0x00,0x04,0x10,0x01,0x00,0x00,0x90,0x24,0x09,0x20,0x02,0x04,0x00,0x00,0x4a,
0x02,0x08,0x09,0x00,0x80,0x8a,0x00,0x00,0x49,0x01,0xca,0x8a,0xaa,0x0a,0xe0,
0x20,0x00,0x00,0x00,0x88,0x24,0x01,0x00,0x40,0x00,0x50,0x00,0x00,0x80,0x00,
0x00,0x40,0x04,0x00,0x40,0x50,0x0a,0xaa,0x24,0x00,0x28,0x51,0x22,0x09,0xe0,
0x00,0x00,0x02,0x08,0x01,0x00,0x04,0x10,0x00,0x94,0x04,0x01,0x00,0x00,0xa4,
0x00,0x00,0x01,0x00,0x00,0x05,0x41,0x11,0x12,0x00,0x80,0x4a,0x95,0x02,0xe0,
0x02,0x21,0x40,0x20,0x00,0x00,0x40,0x02,0x25,0x01,0xa0,0x08,0x00,0x80,0x08,
0x00,0x00,0x00,0x00,0x00,0x52,0x2a,0xa4,0x04,0x00,0x00,0x2a,0x52,0x00,0xe0,
0x00,0x00,0x00,0x00,0x48,0x22,0x08,0x40,0x00,0x40,0x44,0x22,0x00,0x20,0x10,
0x00,0x00,0x00,0x00,0x00,0x08,0x91,0x12,0x01,0x00,0x00,0xa0,0x29,0x00,0xe0,
0x08,0x04,0xfc,0x7b,0x00,0xbc,0xc0,0x0b,0xe0,0x0b,0x11,0xbd,0x00,0xb8,0x02,
0x08,0xc0,0x00,0x70,0x00,0x57,0xca,0x4f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x20,0x40,0xff,0x7f,0xe2,0x3f,0xf8,0x2f,0xfa,0x0f,0xe0,0x3f,0xe2,0x3f,0x00,
0x0f,0xe0,0xc1,0x7f,0xe0,0x3f,0xf1,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0xc0,0x0f,0x3e,0xf0,0x7f,0xfc,0x8f,0xfc,0x2f,0xf9,0x3f,0xf0,0xbf,0x82,
0x0f,0xe0,0xc3,0x7f,0xf8,0x9f,0xfc,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0xf0,0x03,0xbe,0x40,0x3f,0x9e,0x1f,0x9f,0x0f,0x00,0x1f,0x09,0x3f,0x80,
0x0f,0xe0,0x03,0x3e,0x1c,0x5f,0x1e,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x80,0xf8,0x11,0x3e,0x04,0x1f,0x07,0x8f,0x83,0x5f,0x52,0x5f,0x40,0x1f,0x80,
0x0f,0xe0,0x03,0x3e,0x06,0x1e,0x07,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x04,0x7a,0x00,0x3e,0x00,0x9f,0x03,0x9f,0x01,0x0f,0x00,0x9f,0x00,0x1f,0x80,
0x07,0xe0,0x01,0x3c,0x03,0x1e,0x03,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x10,0x7c,0x00,0x9f,0x10,0xdf,0x41,0xef,0xa8,0x2f,0xa5,0x1f,0x00,0x1f,0xc0,
0x07,0xe0,0x03,0xbe,0x01,0x9e,0x01,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x3f,0x24,0x1f,0x02,0xef,0x90,0xef,0x82,0x0f,0x80,0x4f,0x01,0x0f,0xc0,
0x07,0xe0,0x01,0x9e,0x01,0xde,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x9f,0x00,0x1f,0x88,0x6f,0x82,0x37,0x90,0xaf,0x94,0x3f,0x80,0x0f,0xc0,
0x07,0xe0,0x01,0xde,0x00,0x6f,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x82,0x1f,0x80,0x1f,0x80,0x3f,0x88,0x3f,0xc2,0x0f,0xc0,0xbf,0x80,0x0f,0xe0,
0x7f,0xe0,0x06,0x7f,0x00,0x6f,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x90,0x0f,0x88,0x0f,0xa1,0x3f,0xa0,0x5f,0xc8,0x87,0x92,0xff,0x80,0x0f,0xf0,
0x1f,0xfa,0x05,0x2f,0x00,0x3f,0x80,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xc0,0x2f,0xc1,0x4f,0x84,0x1f,0xc2,0x1f,0xc1,0x27,0xc0,0xc7,0x85,0x3f,0xf8,
0xe3,0xff,0x14,0x3f,0x00,0x1f,0x80,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xc0,0x07,0xc0,0x0f,0xc0,0x9f,0xc0,0x0f,0xe8,0x17,0xd5,0xff,0xdf,0x3f,0xf8,
0x5b,0x77,0xfd,0x1f,0x80,0x1f,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe4,0x07,0xe4,0x2f,0xc8,0x0f,0xc8,0x8f,0xe2,0x83,0xe0,0x3b,0xfe,0xb7,0xf8,
0x03,0x78,0xcc,0x1f,0x80,0x0f,0xc0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe0,0x97,0xe0,0x07,0xc1,0x4f,0xe2,0x27,0xe8,0x27,0xe4,0xdf,0xf5,0xef,0xff,
0xa3,0x7a,0xbb,0xff,0x80,0x0f,0xc0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe0,0x03,0xf2,0x07,0xd0,0x07,0xe0,0x07,0xf1,0xa9,0xff,0xff,0xe7,0xcf,0xff,
0x41,0xf8,0xd1,0x0f,0xc6,0x07,0xc0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe4,0x23,0xf0,0x57,0xe2,0x27,0xe5,0x23,0xf2,0xff,0xff,0xf7,0xe1,0x9f,0xfe,
0x81,0x1e,0xf2,0xbf,0xdd,0x07,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe0,0x83,0xd8,0x07,0xe0,0x03,0xe0,0x8b,0xf0,0xb7,0xe0,0xfb,0xe3,0x37,0xfe,
0x01,0x0d,0xe1,0xff,0xff,0x07,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe0,0x03,0xec,0x93,0xe4,0x93,0xf2,0x23,0xfd,0x49,0xf2,0x41,0xef,0xeb,0xfe,
0x81,0x8e,0xe2,0x37,0xff,0x0f,0xe0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe9,0x23,0xee,0xc3,0xf0,0x0b,0xf0,0x09,0xfc,0x3a,0xf1,0x69,0xed,0x43,0xfe,
0x01,0x87,0xc0,0x17,0xe0,0x3f,0xe0,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe0,0x09,0xe7,0x63,0xf2,0xa1,0xf4,0xa1,0xfe,0xb9,0xf4,0x39,0xfa,0x87,0xf3,
0x03,0x03,0xe0,0x33,0xe0,0x7b,0xf0,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe2,0x23,0xf3,0xf3,0xf0,0x05,0xf0,0x0a,0xfd,0x18,0xfa,0x3b,0xf4,0x81,0xf5,
0x87,0x03,0xe1,0x23,0xe0,0xe1,0xf0,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe8,0xc3,0xf3,0x39,0xf0,0x91,0xfa,0x81,0x7c,0x4c,0xf9,0x18,0xf0,0xcb,0xf5,
0xc7,0x04,0xe0,0x33,0xf0,0x41,0xf0,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe0,0xe7,0xf0,0x39,0xfa,0x02,0xf8,0x54,0x7e,0x2f,0xfa,0x1e,0xf0,0xf3,0xf0,
0x7f,0x00,0xe2,0x27,0xf0,0x41,0xf8,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xe0,0x7f,0xf2,0x8f,0xf8,0x50,0xfa,0x00,0xff,0x87,0xf8,0xef,0xef,0x7f,0xf0,
0x3f,0x00,0xf0,0x67,0xf0,0x60,0xf0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xc9,0x3f,0xf0,0x0f,0xf8,0x85,0xf8,0xaa,0xfe,0x43,0xff,0xff,0xfe,0x1f,0xe0,
0x3f,0x00,0xf0,0x4f,0xf0,0xe0,0xf0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x20,0x4f,0xc2,0x23,0x59,0x10,0x3c,0x20,0xfc,0xe0,0xff,0x01,0xc1,0x97,0xc2,
0x77,0x00,0x70,0xd6,0x20,0xc0,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x02,0x00,0x10,0x40,0x00,0x44,0x81,0x4a,0x47,0xf2,0x57,0x95,0xb6,0x2e,0x08,
0xc0,0x00,0x00,0xcc,0x0b,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x90,0x10,0x85,0x08,0x55,0x11,0x24,0x10,0x9e,0xe8,0xad,0xff,0xff,0xff,0x0a,
0xd2,0x20,0x00,0xb8,0x2f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x42,0x20,0x22,0x00,0x44,0x09,0x45,0x27,0xc2,0xfe,0xff,0xff,0xdf,0x10,
0x80,0x01,0x28,0xd8,0x7a,0xc0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x4a,0x08,0x89,0x88,0x4a,0x11,0xa0,0x24,0x97,0xf0,0xff,0xff,0xff,0xbf,0x41,
0x40,0xa3,0x90,0xb0,0x72,0xc0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x21,0x00,0x20,0x10,0x84,0x0a,0x92,0x26,0xb5,0xff,0xff,0xf7,0xff,0x03,
0x05,0x46,0x40,0xe0,0x7b,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x24,0x04,0xaa,0x0a,0x42,0x51,0xa0,0x08,0x43,0xd2,0xfe,0xff,0xdd,0xfe,0x05,
0x50,0x85,0x72,0xb2,0x76,0xc0,0x01,0x00,0x00,0x80,0xbd,0x00,0x00,0x00,0xe0,
0x80,0xa0,0x00,0x40,0x11,0x04,0x15,0x52,0x17,0xb9,0x7e,0xbf,0xf6,0xfd,0x8f,
0x02,0x0a,0xc5,0x60,0x7f,0x80,0x03,0x00,0x00,0x60,0x61,0x00,0x00,0x00,0xe0,
0x12,0x08,0x24,0x29,0x44,0xa2,0x40,0x81,0x43,0xd2,0xff,0x55,0x95,0xd6,0x17,
0x10,0x18,0x73,0xc1,0x7d,0x80,0x01,0x00,0x00,0x10,0x60,0x00,0x00,0x00,0xe0,
0x84,0x22,0x41,0x84,0x12,0x11,0x2a,0x54,0x17,0xa9,0xf7,0x57,0x49,0x51,0x6f,
0x20,0x1a,0xec,0x8d,0xef,0xc0,0x03,0x00,0x00,0x04,0xc1,0x01,0x00,0x00,0xe0,
0x20,0x44,0x14,0x21,0xa0,0x48,0x41,0x89,0x4b,0xd9,0xff,0x5f,0x20,0x84,0xbe,
0x80,0x30,0xb4,0x15,0x7d,0x80,0x01,0x00,0x00,0x41,0x84,0x01,0x00,0x00,0xe0,
0x89,0x10,0x41,0x94,0x0a,0x25,0x94,0xa4,0x83,0xd8,0xff,0x3f,0x01,0x00,0xbd,
0x41,0x70,0x58,0x33,0x6f,0x80,0x03,0x00,0x40,0x10,0x00,0x02,0x00,0x00,0xe0,
0x02,0x42,0x14,0x49,0x52,0x90,0x22,0x92,0x4b,0xc8,0xde,0x7f,0x00,0x40,0xf6,
0x02,0xe2,0xe8,0x57,0xea,0x80,0x01,0x00,0x20,0x8e,0x00,0x02,0x00,0x00,0xf8,
0xa8,0x08,0x81,0x24,0x89,0x4a,0x94,0xa4,0x93,0xec,0xeb,0xff,0x00,0x00,0xdd,
0x4f,0xd4,0xe0,0x26,0x2e,0x80,0x03,0x00,0x90,0x47,0x05,0x04,0x80,0x00,0xfe,
0x01,0x42,0x28,0x92,0x24,0x91,0x4a,0xc9,0x41,0xa4,0xf5,0xff,0x87,0xb4,0xd6,
0x0b,0xc8,0x43,0xaf,0x7c,0x80,0x01,0x00,0xc8,0xe0,0x03,0x00,0xfe,0x83,0xe6,
0x94,0x10,0x85,0x48,0x92,0x24,0x21,0xa4,0x93,0xec,0xf9,0xff,0x2b,0x4a,0x5d,
0x1f,0x91,0x87,0x4b,0xfa,0x80,0x03,0x00,0x7e,0xaa,0x4f,0x10,0x0f,0x56,0xfb,
0x20,0x4a,0x20,0x25,0x55,0x92,0x94,0xca,0x4b,0xe4,0xd4,0xfe,0x9f,0xaa,0x5c,
0x3f,0x24,0x8f,0xae,0x70,0x80,0x03,0x00,0x0f,0xdf,0x2c,0xd0,0x03,0xfa,0xfd,
0x89,0x20,0x95,0x50,0x91,0x4a,0x4a,0xd1,0xad,0xf6,0xba,0xff,0xbf,0x52,0x7b,
0x6f,0xa0,0x0e,0x56,0x68,0x80,0x01,0x80,0xc3,0x0b,0x70,0x61,0xc1,0x6f,0xef,
0x22,0x0a,0x22,0x25,0x4a,0x24,0x25,0xca,0x49,0x6c,0xc9,0xfe,0xff,0xa5,0xbc,
0xff,0x80,0x1e,0xbd,0x40,0x80,0x03,0xc0,0xf4,0x02,0xc0,0x86,0xbf,0xba,0xfd,
0x08,0xa1,0x88,0x48,0xa5,0xaa,0x50,0xd1,0xa2,0xd4,0xac,0xff,0xe3,0x8b,0x7a,
0xef,0x47,0x3b,0xb4,0x44,0x80,0x03,0xe0,0x7a,0x00,0x80,0x07,0xbe,0x5e,0xf7,
0xa2,0x14,0x25,0x95,0x28,0x91,0x8a,0xe4,0x1d,0x6e,0x54,0xff,0x49,0x77,0xbd,
0xd7,0x05,0x7d,0xb8,0x80,0x00,0x03,0x38,0x0f,0x00,0x00,0x2f,0xdb,0xf7,0xe3,
0x08,0x48,0x52,0x42,0x92,0x4a,0x2a,0xd5,0x4f,0x6a,0xc5,0xff,0x03,0xfd,0xfa,
0x53,0x4b,0x6b,0x60,0x92,0x80,0x03,0xd8,0x03,0x00,0x80,0x9b,0xf4,0x7d,0xe0,
0xa2,0x52,0x09,0xa9,0x4a,0x24,0x51,0xe2,0x5b,0xea,0x94,0xfe,0x07,0xfc,0xff,
0x2b,0x1e,0xec,0x61,0x09,0x81,0x03,0xee,0x00,0x00,0xc0,0x7e,0xea,0x0f,0xe0,
0x10,0x89,0x64,0x4a,0xa4,0xaa,0x24,0xd5,0xad,0x66,0x42,0xff,0x05,0xdc,0xfd,
0xeb,0x17,0xad,0x41,0x29,0x02,0x17,0x3f,0x00,0x00,0x60,0xed,0xa0,0x01,0xf8,
0x4a,0x52,0x12,0x91,0x52,0x22,0x95,0xd0,0x5f,0xea,0x04,0xff,0x03,0x9c,0xfe,
0x7f,0x30,0xb0,0xc6,0x11,0x84,0xff,0x0f,0x00,0x00,0x90,0xff,0x43,0xf0,0xff,
0x81,0x88,0xaa,0x4a,0x29,0x95,0xa2,0xea,0x3b,0x6b,0x02,0xf6,0x03,0xf8,0x7b,
0xff,0x60,0x88,0x86,0x46,0x08,0xd7,0x01,0x00,0x00,0x8c,0xfa,0x0b,0xec,0xfe,
0x54,0x52,0x44,0x24,0x8a,0x48,0x28,0xe5,0x5e,0x74,0x8a,0xfc,0x07,0xf0,0xff,
0x7e,0x80,0x40,0x0a,0xa3,0x98,0xe7,0x01,0x00,0x00,0xc4,0x2e,0x80,0x82,0xf7,
0x09,0x89,0xaa,0x92,0xa4,0x52,0x95,0xd2,0x2f,0x6a,0x01,0xeb,0x0f,0xe0,0xff,
0xbb,0x85,0x01,0x1a,0x0c,0xb1,0x76,0x01,0x00,0x00,0x62,0x0f,0x20,0x00,0xf6,
0xa2,0x54,0x11,0xa9,0x52,0x8a,0x4a,0x68,0x1f,0x76,0x85,0xb6,0x1f,0x50,0xad,
0xc2,0x12,0x93,0x18,0x0a,0xa3,0xb7,0x1f,0x00,0x00,0xa3,0x03,0x00,0x00,0xe8,
0x14,0x22,0xaa,0x14,0x29,0x51,0xa4,0xf6,0x0e,0x74,0x04,0x6e,0x6b,0xd2,0x00,
0xe8,0x4a,0x07,0x30,0x88,0xc6,0xde,0x7f,0x01,0x80,0xe9,0x00,0x00,0x00,0xf8,
0xa1,0x54,0x49,0xa2,0x84,0x4a,0x29,0xe9,0x1f,0x6b,0x83,0xfe,0xfe,0x3b,0x00,
0xc0,0xa7,0x07,0x70,0x00,0xce,0xff,0xef,0xff,0x2b,0x38,0x00,0x00,0x00,0xe0,
0x14,0x49,0x25,0x15,0x55,0x29,0xa5,0xe4,0x2b,0x36,0x0a,0xfe,0xdf,0x3f,0x00,
0x00,0xaf,0x1e,0xe0,0x28,0x1c,0xfe,0xfd,0x0a,0x00,0x1c,0x00,0x00,0x00,0xe0,
0xc9,0xa4,0xaa,0xa2,0x52,0x94,0x52,0xf5,0x1f,0x76,0x85,0xfa,0xff,0x17,0x00,
0x00,0xbe,0x1a,0xe0,0x01,0x38,0xbc,0xfa,0xaf,0x26,0x07,0x00,0x00,0x00,0xe0,
0x24,0x52,0x94,0x54,0x24,0x65,0x49,0x6a,0x37,0x36,0x06,0xfa,0xff,0x2a,0x10,
0x80,0xfc,0x3a,0xc0,0x03,0x60,0x3c,0x5c,0xff,0x15,0x03,0x00,0x00,0x00,0xe0,
0x92,0x8a,0x52,0x8a,0x92,0xf2,0xaa,0xf2,0x1f,0x76,0xab,0xd5,0xff,0x16,0x44,
0x00,0xe8,0x7d,0xa0,0x87,0xe0,0x1a,0xa0,0x08,0xe0,0x00,0x00,0x00,0x00,0xe0,
0x49,0xa9,0x4a,0x51,0xa9,0xbc,0x49,0x6a,0x0f,0x37,0x07,0xed,0x7f,0x2b,0x21,
0x00,0xd1,0xff,0x80,0x07,0xc0,0x3d,0x00,0x15,0x30,0x00,0x00,0x00,0x00,0xe0,
0x24,0x54,0x29,0x4d,0x4a,0x3d,0x2b,0x75,0x37,0x76,0xab,0x54,0xad,0x54,0xfc,
0x02,0x64,0xed,0x01,0x0f,0xa0,0x2b,0x00,0x60,0x19,0x00,0x00,0x00,0x00,0xe0,
0x80,0x22,0xa5,0x24,0xa5,0x66,0xa5,0xf2,0x2f,0x76,0x4b,0xd5,0xb7,0xaa,0xff,
0x07,0xa0,0xeb,0x83,0x1e,0x60,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0xaa,0xaa,0x52,0x29,0xe7,0x56,0xf5,0x5e,0x37,0x2f,0xb5,0x94,0xda,0xc1,
0x1f,0x48,0x95,0x07,0x3c,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x40,0x58,0x95,0xaa,0xd4,0xd3,0x2b,0xf5,0x5b,0x72,0x4f,0x55,0xab,0xfe,0x00,
0x1c,0x20,0x55,0x0f,0x6c,0x80,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xb5,0xa7,0x54,0x55,0xa5,0x8b,0xa7,0xf4,0x29,0x3f,0x2f,0xb5,0x54,0xff,0x40,
0x70,0xa0,0xaa,0x0e,0xdc,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x96,0x58,0xa5,0x2a,0xd5,0x8f,0x5f,0x75,0x34,0x73,0xbd,0xaa,0xd2,0xff,0x41,
0xa0,0xa8,0x56,0x3d,0xb8,0x40,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xa9,0x4a,0x95,0xa4,0xea,0xf7,0x4a,0xf5,0xaa,0x76,0x57,0xab,0xfa,0xbf,0x7f,
0xc1,0x51,0x55,0x3b,0x98,0xa1,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xa4,0xaa,0x6a,0x95,0xd2,0x7b,0x5e,0x75,0x24,0x33,0xbf,0xa9,0xfe,0x45,0x04,
0xc6,0x53,0x55,0x7b,0x31,0x83,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x55,0x55,0x55,0x55,0xea,0x7e,0x5d,0xf5,0x12,0x77,0x5f,0x55,0xfd,0x7a,0x29,
0x3c,0xaa,0xaa,0x74,0x32,0x86,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x92,0xaa,0xaa,0x55,0xe9,0xff,0x79,0xf5,0x54,0x73,0xbd,0x4a,0x75,0x95,0xaa,
0x1a,0x56,0x49,0xf1,0x64,0x8c,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x55,0x4a,0x55,0x55,0xd5,0x7f,0xfe,0xda,0x92,0x77,0x6e,0xaa,0x9a,0xaa,0xaa,
0xaa,0x3c,0x2d,0xe8,0xe3,0xc8,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x56,0x55,0x95,0xaa,0xea,0xff,0xfd,0x7a,0x48,0x6b,0xfb,0xaa,0x6a,0x55,0x55,
0x55,0xda,0x5a,0xd2,0xc7,0x18,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0xf0,0xae,0x0a,0x55,0xb5,0x7f,0xf3,0xfd,0x2a,0x6f,0xfe,0x55,0x95,0xaa,0x4a,
0xaa,0x7a,0xaa,0xd6,0xa7,0x31,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x40,0xa1,0x0a,0x2a,0xa9,0xfd,0xef,0x6f,0x48,0xa7,0xea,0xab,0x54,0xa5,0xf4,
0x4b,0xd5,0x4a,0xa2,0x9f,0x61,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x80,0x82,0x0a,0xb5,0xaa,0xfe,0xca,0xff,0x25,0xbf,0xf6,0x97,0xaa,0x54,0xff,
0x5f,0x55,0x25,0xd0,0x5f,0x83,0x1d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x80,0x42,0x15,0x4a,0x55,0xff,0x9f,0x7f,0x4a,0xef,0xd4,0x7d,0xa5,0xca,0xff,
0x55,0xa9,0x12,0x50,0x3f,0xc7,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x40,0x45,0x15,0xaa,0xaa,0xfe,0x57,0xff,0x24,0xb7,0xde,0xff,0x5b,0xf5,0x7e,
0xab,0xaa,0x0a,0xa8,0xff,0x86,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x80,0x82,0x2a,0x55,0x49,0xfd,0x7f,0xfe,0x89,0xee,0xa9,0xf7,0x7f,0x55,0xeb,
0x57,0x92,0x40,0xd2,0x6e,0x0d,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x85,0x2a,0x56,0x55,0xfd,0xff,0x7d,0x52,0xaf,0xd9,0xda,0xb6,0xab,0xd5,
0x5a,0x49,0x62,0x48,0xff,0x1a,0x7d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x8a,0x2a,0xaa,0xaa,0xee,0xbf,0xf2,0xa1,0xee,0x55,0xb7,0x6a,0x75,0x6d,
0xad,0xa8,0x86,0xd6,0xef,0x1b,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x8a,0x2a,0xab,0xaa,0xfe,0xfd,0xef,0x88,0xee,0xa9,0x5a,0x95,0x96,0xb5,
0x55,0xab,0x2a,0x55,0xef,0x37,0xbd,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x16,0xd5,0xaa,0xaa,0xe6,0xfb,0xf5,0x52,0xee,0x43,0xa9,0x54,0x54,0x4a,
0xb6,0xed,0xaa,0xa8,0xef,0x3e,0xfd,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x14,0x55,0xad,0xaa,0xe6,0xf6,0xdf,0xa8,0xce,0x1f,0x50,0x52,0xab,0xaa,
0xaa,0x2a,0x55,0x85,0xaf,0xec,0xfe,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x28,0xaa,0x55,0x55,0xe7,0xde,0xff,0x45,0xfe,0x3d,0x00,0x88,0x54,0x55,
0x95,0xa4,0x55,0xf8,0xc5,0x78,0xbe,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x28,0xd5,0xb6,0xaa,0x73,0x7f,0xff,0x29,0xdd,0xe7,0x15,0x00,0xaa,0x92,
0x44,0x90,0xa4,0xff,0x6e,0xe8,0xfe,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x58,0x6d,0xd5,0x56,0xa3,0xfd,0xfd,0x95,0x9c,0x1e,0xbf,0xab,0x40,0x20,
0x91,0x4a,0xfd,0xef,0x87,0xe0,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0xa0,0xaa,0xab,0x6a,0xf3,0xfe,0xff,0x49,0x7e,0xf2,0xff,0x5f,0x5f,0xaf,
0xfe,0xff,0x17,0xf8,0x57,0x32,0x77,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0xd0,0x56,0xad,0xaa,0xb3,0xbf,0xff,0xa5,0x7a,0x14,0xed,0xfd,0xeb,0xf7,
0x95,0x68,0xe9,0xff,0xc7,0x64,0xb7,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x60,0xdb,0x55,0x5f,0xf3,0x1f,0xff,0x2b,0xfd,0xbb,0xa2,0xee,0xfe,0xd5,
0x43,0xf6,0xaf,0x92,0x6a,0x80,0xf6,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x80,0x6a,0xb5,0xf7,0xb9,0x0f,0xbe,0x93,0xf4,0x7f,0x2d,0x20,0x83,0xee,
0xfe,0x15,0x00,0x48,0x6a,0x00,0xe7,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x60,0xab,0xd6,0xd0,0xf3,0x07,0xfe,0x49,0x65,0xff,0x5f,0xbd,0x10,0x00,
0x00,0x48,0xa2,0x92,0x32,0x00,0xc6,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x80,0xb6,0xea,0x00,0xf9,0x0b,0xfe,0x25,0xb1,0xe0,0xff,0xff,0xff,0x07,
0x92,0x02,0x08,0x24,0x3d,0x00,0x42,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x80,0xae,0x35,0x80,0xf8,0x0b,0xb7,0x91,0x72,0x05,0x40,0xff,0xff,0xff,
0xff,0xff,0xaa,0xdb,0x1f,0x30,0x02,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0xab,0xb6,0x80,0xe8,0x07,0xde,0xab,0xa8,0x94,0x02,0x00,0xea,0xd4,
0xde,0xff,0xff,0xff,0x12,0x00,0x02,0x7d,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0xbd,0xba,0x80,0xbc,0x4b,0xb5,0x0e,0x72,0x6e,0x12,0x00,0x00,0xf5,
0xb7,0x6f,0x00,0x00,0x00,0x00,0x03,0x5c,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0xcb,0x2a,0x81,0xec,0x07,0x7b,0x7f,0x61,0xef,0x4b,0x1c,0x00,0x00,
0xfd,0x5f,0x00,0x00,0x12,0x00,0x01,0xf9,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x7d,0x75,0x40,0xb4,0x82,0xad,0xfd,0xb0,0xef,0x77,0x0c,0x00,0x00,
0x78,0x2b,0x40,0x00,0x10,0x00,0x03,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x95,0x6d,0x43,0xec,0x85,0xd9,0xf6,0xff,0xbf,0xbf,0x2f,0x00,0x00,
0xed,0x76,0x10,0x05,0x14,0x00,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0xc0,0x76,0xf5,0x4a,0xd4,0xd3,0x7d,0xdb,0xff,0x68,0xdf,0x1f,0x00,0x00,
0xc0,0x25,0x00,0x00,0x0a,0x80,0x03,0xf0,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x40,0xab,0xfd,0x65,0xe6,0xc1,0xac,0xf6,0xff,0x23,0x75,0xaf,0x00,0x00,
0xd0,0x1a,0x00,0x00,0x14,0xa0,0x03,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0xc0,0x7a,0xaf,0x25,0xd5,0xc2,0xde,0xfb,0xfb,0x7f,0x08,0x18,0x00,0x00,
0x08,0x01,0x00,0x00,0x0c,0xdd,0x03,0xc0,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0xed,0xa3,0x6b,0x72,0x69,0x6d,0xfd,0xaf,0xff,0x17,0x42,0x02,0x00,
0x00,0x11,0x00,0x00,0x8e,0xff,0x07,0xc0,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x80,0x7b,0xdd,0x36,0xeb,0x61,0xb7,0xfe,0xaf,0xfe,0xff,0x2d,0x09,0x00,
0x00,0x44,0x00,0xd0,0xff,0xbf,0x03,0x40,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x3e,0x4f,0x2b,0x77,0xf1,0xde,0xdf,0x7d,0xff,0xfa,0xff,0xff,0x7f,
0x05,0x30,0xa5,0x6b,0xfb,0xff,0x03,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x1d,0x23,0x3c,0xff,0x30,0xb7,0xa6,0xf7,0xf5,0xdf,0xde,0x4a,0x80,
0x50,0xd2,0xba,0xbc,0xff,0x4b,0x03,0xc0,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0xce,0x05,0x38,0xb7,0xf0,0xdb,0x47,0x5e,0x6f,0xff,0x7f,0x92,0x2a,
0x0a,0x49,0xd5,0xd6,0xfd,0xa6,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0xae,0x01,0xb0,0xff,0x98,0xb7,0x23,0xf0,0xbd,0xd4,0xff,0xff,0xff,
0xfb,0xb5,0xb7,0x7f,0x3c,0x52,0x03,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0xd6,0x01,0x10,0x5f,0xf8,0xfa,0x07,0x80,0x6b,0x42,0xfe,0xff,0xff,
0xaf,0xfe,0xff,0x0b,0x5c,0xa3,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x6c,0x00,0x30,0xbf,0xd8,0xef,0x09,0x00,0xfe,0x09,0xff,0xff,0xff,
0xff,0xff,0xff,0x02,0x86,0x12,0x03,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x64,0x00,0xb0,0x6f,0xec,0xfa,0x34,0x00,0xe8,0x07,0xe0,0xff,0xae,
0xfa,0xff,0x2e,0x01,0x17,0xc9,0x03,0x00,0x03,0x20,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x64,0x00,0x10,0x7f,0x7c,0xef,0xd0,0x01,0x80,0x0e,0x00,0xff,0xff,
0x00,0x0e,0xbf,0x80,0x83,0x92,0x01,0x00,0x03,0xc0,0x01,0x00,0x00,0x00,0xe0,
0x00,0x00,0x34,0x00,0xb0,0x2f,0xf6,0x7a,0x2e,0x07,0x00,0x3d,0x00,0x7c,0xb5,
0x07,0x17,0x05,0xe0,0x81,0xc2,0x01,0x00,0x1f,0x00,0x07,0x00,0x00,0x00,0xe0,
0x00,0x00,0x98,0x00,0x38,0x3f,0xbe,0x6f,0x5f,0x1d,0x00,0xf0,0x00,0xf0,0xcb,
0xbd,0xc1,0x02,0xe0,0x90,0x52,0x01,0x80,0x7f,0x00,0x38,0x00,0x00,0x00,0xe0,
0x00,0x00,0x14,0x00,0x34,0x2f,0xfe,0x7a,0xbe,0xf4,0x00,0xc0,0x07,0x80,0x5f,
0xd6,0x43,0x00,0x38,0x00,0xc1,0x01,0xf4,0xef,0x00,0xe0,0x01,0x00,0x00,0xe0,
0x00,0x00,0x5a,0x00,0x9b,0x27,0x5f,0x7f,0xf7,0x8a,0x02,0x00,0x1e,0x00,0xfa,
0xa9,0x23,0x00,0x34,0x48,0xb1,0x00,0xff,0x0f,0x03,0x20,0x0e,0x00,0x00,0xe0,
0x00,0x00,0x08,0x48,0xbe,0x9a,0xee,0xf5,0xce,0xa9,0x0e,0x00,0x78,0x00,0x70,
0x2f,0x1b,0x00,0x1a,0x40,0xa9,0x02,0xbd,0x0f,0x04,0x20,0x70,0x00,0x00,0xe0,
0x00,0x00,0x2a,0xfa,0xbf,0x0f,0x73,0xfb,0xd6,0x4c,0x32,0x00,0xe0,0x01,0x80,
0x55,0x0b,0x00,0x0c,0x88,0x60,0x80,0x8f,0x6f,0x08,0x20,0x80,0x03,0x00,0xe0,
0x00,0x00,0x14,0x20,0xbf,0x2b,0xbb,0xef,0xde,0x77,0xd9,0x01,0x00,0x07,0x00,
0x5a,0x07,0x80,0x06,0xa0,0xb4,0x80,0x03,0x1e,0x10,0x20,0x80,0x1f,0x00,0xe0,
0x00,0x00,0x52,0x00,0xd8,0xaf,0xe1,0xfa,0x70,0xbf,0xaa,0x07,0x00,0x7c,0x00,
0x00,0x01,0x20,0x03,0x80,0x90,0x80,0x09,0x00,0x60,0x20,0xf0,0x7f,0x00,0xe0,
0x00,0x00,0x4a,0x00,0xf0,0xd7,0xa1,0xef,0xd4,0xf7,0xa5,0x1e,0x00,0xe0,0x05,
0x00,0x00,0x80,0x02,0xc0,0x34,0x81,0x05,0x00,0x60,0x20,0xfe,0x7f,0x00,0xe0,
0x00,0x00,0xaa,0x00,0xe0,0xcb,0x40,0xfb,0x93,0xff,0x17,0xf1,0x00,0x80,0x3f,
0x00,0x00,0x80,0x01,0x50,0x4a,0x00,0x57,0x00,0x30,0xe0,0xff,0x1f,0x00,0xe0,
0x00,0x00,0xd8,0x02,0xe0,0xc7,0x80,0xfe,0xcb,0xec,0xbb,0xc4,0x03,0x00,0x14,
0x00,0x00,0xc8,0x00,0x40,0x5a,0x01,0xfd,0x01,0x1e,0xf8,0xff,0x03,0x00,0xe0,
0x00,0x00,0x3a,0x03,0xe0,0x4b,0x00,0xec,0x5f,0xdc,0xce,0xc1,0x1f,0x00,0xd0,
0x00,0x00,0x20,0x00,0x20,0x6a,0x00,0xfe,0x04,0x3d,0xff,0x7f,0x00,0x00,0xe0,
0x00,0x00,0xf2,0x15,0xf0,0xa3,0x00,0xfc,0x3f,0xa5,0xff,0x84,0x77,0x00,0x00,
0x0d,0x00,0x00,0x00,0x40,0x24,0x80,0xff,0x92,0xee,0xff,0x0f,0x00,0x00,0xe0,
0x00,0x00,0xd4,0x57,0xf4,0x47,0x00,0xfc,0xfd,0xca,0xfb,0xde,0xdd,0x03,0x00,
0x60,0x00,0x0c,0x00,0x10,0x35,0xc0,0xd7,0xff,0xef,0xff,0x01,0x00,0x00,0xe0,
0x00,0x00,0x94,0x5f,0xba,0x51,0x00,0xec,0xff,0xaf,0xfe,0xce,0x61,0x3d,0x00,
0x00,0x03,0x0e,0x00,0x20,0x15,0xe0,0x00,0xff,0xe9,0x3f,0x00,0x00,0x00,0xe0,
0x00,0x00,0xb0,0x5e,0xfd,0x43,0x00,0xff,0xfb,0xbf,0xde,0xfa,0xc0,0xc3,0x00,
0x00,0x28,0x06,0x00,0xa0,0x1a,0x30,0x02,0xf0,0xea,0x07,0x00,0x00,0x00,0xe0,
0x00,0x00,0x24,0x7d,0xfb,0x2b,0xe0,0xef,0xe9,0xfb,0xf2,0xd6,0x03,0x0a,0x06,
0x00,0x80,0x03,0x00,0x90,0x0c,0x8c,0x01,0x00,0xe4,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x94,0x72,0xbc,0x31,0xf8,0xfd,0xe3,0x7f,0x95,0xfe,0x8f,0x40,0x38,
0x00,0x00,0x03,0x00,0x90,0x0c,0x26,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0xbc,0xea,0xfe,0x12,0xfc,0xdb,0x13,0xdf,0xdf,0xb6,0x7f,0x00,0xc7,
0x01,0x80,0x03,0x00,0x50,0x05,0x07,0x40,0x00,0x28,0x01,0x00,0x40,0x00,0xe0,
0x00,0x00,0xe0,0x81,0xff,0x09,0x6f,0xff,0xcb,0x7a,0x37,0xbd,0xeb,0x05,0x14,
0x0e,0xc0,0x06,0x00,0x48,0x06,0x16,0x48,0x00,0x20,0x01,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x17,0xff,0x89,0xff,0xed,0x25,0xf5,0xfb,0xca,0x4e,0x87,0x42,
0x74,0x40,0x02,0x00,0x08,0x03,0x0e,0x64,0x00,0x00,0x00,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0xfc,0xf7,0xc4,0xaf,0xff,0x57,0xaa,0x77,0x57,0x3f,0x5d,0x08,
0x04,0x20,0x06,0x00,0xa4,0x01,0x26,0x28,0x00,0xe8,0xff,0xff,0x7f,0x00,0xe0,
0x00,0x00,0x00,0xc0,0xfd,0xe4,0xfb,0xd6,0x27,0x51,0xfe,0xab,0xf9,0xe1,0xa5,
0x04,0x02,0x04,0x00,0x40,0x03,0x16,0xb8,0x06,0xc0,0xaa,0xaa,0x7a,0x00,0xe0,
0x00,0x00,0x00,0xc0,0xbf,0xe0,0xde,0xff,0x4f,0x95,0xfa,0xdf,0xfc,0x87,0x17,
0x36,0x10,0x92,0x01,0xc2,0x01,0x5e,0xb8,0x01,0x00,0x00,0x00,0x7c,0x00,0xe0,
0x00,0x00,0x00,0x80,0x1e,0xe0,0xf7,0xf6,0x3f,0x4a,0xed,0x7b,0xf9,0x7f,0xfc,
0xf6,0x18,0x12,0x01,0x62,0x04,0x0d,0xf8,0x0e,0x00,0x04,0xc0,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x80,0x3f,0xb1,0xbd,0xdf,0xff,0x29,0xda,0xef,0x62,0xfd,0x43,
0x27,0x0b,0xc6,0x00,0x70,0x02,0x57,0x78,0x03,0x00,0x00,0xf8,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x80,0xbe,0xea,0xef,0xfb,0xff,0xa3,0xaa,0xbf,0x9f,0xe8,0x9f,
0x37,0x1a,0xc6,0x00,0x39,0x06,0x17,0xf8,0x01,0x00,0x84,0xff,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x80,0x6f,0x79,0xfb,0x6e,0xff,0x0f,0xf5,0xfe,0x5d,0x91,0xfe,
0x72,0x0b,0x4e,0x00,0x30,0x8c,0x0d,0xbc,0x00,0x00,0xf0,0xff,0x1f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x57,0xf0,0xbf,0xff,0xff,0x2f,0xfc,0xff,0xf7,0x48,0xfd,
0xef,0x0e,0x22,0x00,0x1c,0xcc,0x06,0xdc,0x01,0x00,0xfe,0xff,0x03,0x00,0xe0,
0x00,0x00,0x00,0x00,0x37,0xb8,0xed,0x76,0xff,0xff,0xd4,0xfb,0xbf,0x25,0xfa,
0x67,0x0a,0x6e,0x00,0x1c,0x5a,0x82,0xfe,0x01,0xe0,0xff,0x7f,0x00,0x00,0xe0,
0x00,0x00,0x00,0x80,0x13,0xf8,0xff,0xff,0xff,0x7f,0xf9,0xbe,0xfd,0x57,0xdd,
0x50,0x0d,0x34,0x00,0x0e,0x7c,0x08,0x7f,0x00,0xe0,0xff,0x07,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x33,0xb8,0x6d,0xff,0x51,0xff,0x47,0x6f,0xf4,0xaf,0xf8,
0x8f,0x08,0x5a,0x00,0x2f,0x30,0x82,0xef,0x00,0xc0,0x7f,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x19,0xf0,0xff,0x7f,0x44,0xfd,0xaf,0xfd,0xeb,0x7e,0xa7,
0x21,0x0d,0x6a,0x80,0x1b,0x70,0x48,0x97,0x01,0x00,0x7c,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x80,0x09,0x78,0xfb,0x1f,0x55,0xee,0xff,0xf6,0x50,0xf8,0x5b,
0xac,0x08,0x06,0x80,0x39,0xe8,0xa4,0x1f,0x01,0x00,0xe3,0x03,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x0d,0xf8,0xff,0x43,0x29,0xf1,0xff,0xa3,0xd6,0xd3,0x5f,
0x93,0x0c,0x12,0xc0,0x5a,0xe0,0xd4,0x03,0x02,0x00,0x07,0x1e,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x05,0xb8,0x7f,0x90,0x94,0xca,0xbf,0xdf,0x51,0xbf,0xfe,
0x4d,0x08,0x0c,0xe0,0x34,0xc0,0xaa,0x01,0x00,0x00,0x03,0xf0,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x0f,0xf8,0x0f,0x00,0x42,0xa4,0xfb,0xba,0xaa,0x3f,0xfa,
0x3f,0x0d,0x02,0x30,0x52,0x80,0xd3,0x09,0x00,0x80,0x02,0x80,0x0f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x2e,0xf2,0x1f,0x40,0x00,0x20,0xff,0xff,0xc5,0xfe,0xc4,
0xff,0x09,0x24,0x50,0x75,0x80,0xff,0x02,0x00,0x08,0x01,0x00,0x78,0x00,0xe0,
0x00,0x00,0x00,0x00,0xb8,0xd0,0x3b,0x00,0x09,0x49,0xbc,0xf7,0x97,0xfa,0x23,
0xfe,0x0f,0x02,0xb8,0x50,0x80,0xfe,0x04,0x00,0xe8,0xfe,0xff,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xf8,0x3f,0x00,0x40,0x80,0xf2,0xff,0x9f,0xea,0x17,
0xed,0x1e,0x00,0x0c,0x71,0x00,0xfe,0x00,0x00,0xed,0xff,0xff,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xf0,0x75,0x00,0x00,0x29,0xc9,0xff,0xfb,0xe4,0x5f,
0xa9,0x1f,0x02,0xec,0x54,0x00,0xe5,0x0b,0x00,0xec,0xff,0xff,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xf0,0x7b,0x80,0x24,0xf4,0x24,0xc1,0xef,0xd3,0xff,
0x2c,0x08,0x00,0x37,0x60,0x00,0xcc,0x45,0x80,0xef,0xff,0xff,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xf8,0xe8,0x00,0x00,0x01,0x93,0x54,0xbf,0x5f,0xed,
0x5b,0x01,0x02,0x2f,0x74,0x00,0x98,0x17,0x54,0xe7,0xff,0xff,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xb0,0xe6,0x01,0x00,0x80,0x4c,0xaa,0xfa,0xbe,0xfa,
0x49,0x08,0x80,0x1f,0x41,0x00,0x90,0x8b,0x52,0x23,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x78,0xda,0x01,0x40,0x00,0x22,0x55,0xff,0xef,0xe4,
0x9b,0x08,0xc2,0x9f,0x28,0x00,0x20,0x23,0xad,0x21,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x98,0xaa,0x03,0x04,0x09,0x90,0xe9,0xff,0xbf,0xeb,
0x57,0x00,0xe0,0x5e,0x64,0x00,0x24,0x4e,0xf5,0x21,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x5c,0xed,0x05,0x00,0x40,0x64,0x74,0xfb,0xff,0xef,
0x1f,0x08,0xf2,0x2f,0x29,0x00,0x20,0xa8,0xfd,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x84,0xde,0x07,0x08,0x02,0xb5,0x07,0xff,0x5f,0xbd,
0x56,0x08,0xf3,0x5f,0x44,0x00,0x40,0xf8,0x1f,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x56,0xfe,0x0b,0x40,0x48,0xda,0x80,0xff,0xff,0xfa,
0xb7,0x80,0xfd,0x7d,0x23,0x00,0x40,0x60,0x02,0x20,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x2c,0xfd,0x35,0x00,0xa0,0x1f,0x00,0xff,0xea,0xd7,
0x7f,0xc8,0xfd,0xbf,0x3a,0x00,0x90,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x88,0xee,0x92,0x00,0xd1,0x01,0x80,0x3b,0x5e,0xbf,
0xfa,0xd1,0xde,0xef,0x0e,0x00,0x80,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xac,0xf6,0x6d,0x4a,0x7c,0x00,0xd0,0x0e,0xf4,0xfa,
0x95,0xff,0xf7,0xff,0x07,0x00,0x00,0x01,0x00,0xe0,0xaa,0xaa,0x36,0xc0,0xe1,
0x00,0x00,0x00,0x00,0x00,0x28,0xdf,0xea,0xa5,0x3f,0x00,0x40,0x07,0xa0,0xd7,
0x6f,0xfa,0x7f,0xff,0x01,0x00,0x00,0x01,0x00,0xe0,0xff,0xff,0x7f,0x78,0xe1,
0x00,0x00,0x00,0x00,0x00,0x90,0xfe,0x29,0x9b,0x07,0x00,0x48,0x01,0x80,0x6a,
0xdd,0xeb,0xab,0x09,0x00,0x00,0x00,0x01,0x00,0xe0,0xff,0xff,0x7f,0xd8,0xe1,
0x00,0x00,0x00,0x00,0x00,0x58,0xf7,0x42,0xa4,0x12,0x00,0xa2,0x00,0x00,0xbe,
0xff,0xfd,0x55,0x00,0x00,0x00,0x00,0x02,0x00,0xe0,0xff,0xff,0x7f,0x68,0xe3,
0x00,0x00,0x00,0x00,0x00,0x90,0xbb,0x00,0x00,0x0b,0x00,0x58,0x00,0x00,0xac,
0xfa,0x67,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x7f,0xf8,0xe2,
0x00,0x00,0x00,0x00,0x00,0xa0,0x5a,0x00,0x80,0x01,0x80,0x14,0x00,0x00,0x54,
0xed,0xbf,0x05,0x00,0x00,0x00,0x00,0x04,0x00,0x20,0x00,0x00,0x40,0xa0,0xe3,
0x00,0x00,0x00,0x00,0x00,0x50,0x56,0x00,0xc0,0x04,0x00,0x07,0x00,0x00,0xe8,
0xf6,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x40,0xf0,0xe0,
0x00,0x00,0x00,0x00,0x00,0x20,0x0f,0x01,0x60,0x00,0xc0,0x01,0x00,0x00,0x28,
0xab,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xa0,0x8a,0x0d,0xb0,0x00,0xe0,0x00,0x00,0x00,0xd0,
0xda,0x2f,0x08,0x00,0x00,0x00,0x00,0x08,0x00,0x20,0x00,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x40,0x15,0x00,0x30,0x00,0x38,0x00,0x00,0x00,0xa8,
0x6a,0x1f,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xc0,0x42,0x00,0x58,0x00,0x0c,0x00,0x00,0x00,0x50,
0xad,0x4f,0x01,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0xc0,0x0f,0x00,0x18,0x00,0x07,0x00,0x00,0x00,0x50,
0x55,0x1f,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x80,0x2b,0x00,0x0c,0x80,0x01,0x00,0x00,0x00,0xa0,
0x6a,0x5f,0x00,0x00,0x00,0x40,0x00,0x30,0x00,0x00,0xfc,0xff,0x01,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0xbe,0x00,0x24,0x60,0x00,0x00,0x00,0x00,0xa0,
0xaa,0x3e,0x08,0x10,0x00,0x00,0x00,0x20,0x00,0x00,0xfe,0xff,0x07,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0xac,0x00,0x0e,0x18,0x00,0x00,0x00,0x00,0x50,
0x55,0x5f,0x00,0x02,0x80,0x10,0x01,0x68,0x00,0x00,0xff,0xff,0x0f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x00,0x02,0x0f,0x00,0x00,0x00,0x00,0x60,
0x55,0x3d,0x01,0x00,0x00,0x22,0x04,0x45,0x00,0x80,0xff,0xff,0x1f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xeb,0x01,0x00,0x00,0x00,0x00,0x80,
0xaa,0x36,0x80,0x00,0x00,0x04,0x00,0x41,0x00,0xc0,0x0b,0x00,0x1e,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x83,0x78,0x00,0x00,0x00,0x00,0x00,0x40,
0x55,0x5f,0x10,0x40,0x00,0x00,0xc0,0x80,0x00,0xe0,0x00,0x00,0x30,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x86,0x0f,0x00,0x00,0x00,0x00,0x00,0x80,
0x54,0x3d,0x41,0x08,0x00,0x00,0x30,0x80,0x00,0x20,0x00,0x00,0x60,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,
0x4a,0x7d,0x08,0x02,0x00,0x06,0x18,0x80,0x00,0x30,0x00,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x29,0xed,0x20,0x04,0x00,0x20,0x06,0x80,0x00,0x10,0x00,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xa5,0x7a,0x0a,0x08,0x01,0xb2,0x03,0x80,0x01,0x10,0x00,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x52,0xed,0x41,0x20,0x02,0xfb,0x01,0x40,0x01,0x10,0x00,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x2a,0xda,0x16,0x42,0x84,0xde,0x00,0x00,0x01,0x10,0x20,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x89,0xea,0xfb,0x8a,0xf0,0x6f,0x01,0x00,0x00,0x30,0x20,0x00,0x40,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x54,0xda,0xfd,0x5f,0x7f,0xfb,0x01,0x20,0x01,0x20,0x20,0x00,0x60,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x48,0xb5,0xff,0xff,0xdf,0x5d,0x00,0x40,0x02,0xe0,0x22,0x00,0x60,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x24,0x54,0x55,0xfb,0xfb,0x6f,0x00,0x10,0x01,0xe0,0x3f,0x00,0x38,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x90,0xb2,0x6b,0x5d,0xff,0x3b,0x00,0x50,0x03,0xc0,0x3f,0x00,0x3e,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xa0,0xf4,0x97,0xe4,0xaf,0x05,0x00,0xb0,0x02,0x80,0x3f,0x80,0x1f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x40,0xa9,0xa7,0x52,0x9d,0x2b,0x00,0x40,0x00,0x00,0x3f,0x00,0x1b,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0xe4,0x99,0x5a,0xd5,0x1c,0x00,0x00,0x01,0x00,0x3c,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x6a,0x4f,0xa5,0xca,0x2a,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xd1,0x33,0x92,0x4a,0x14,0x00,0x02,0x02,0x60,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x64,0x57,0x49,0x65,0x13,0x00,0x80,0x00,0x80,0x03,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xd0,0xae,0xaa,0x44,0x01,0x00,0x40,0x00,0x00,0x1e,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
0x00,0xc8,0x4b,0x49,0x8a,0x0c,0x00,0x20,0x00,0x00,0xf0,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xa0,0x5e,0xa5,0x22,0x0f,0x00,0x80,0x00,0x00,0xa0,0x07,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x95,0x52,0x04,0x03,0x00,0x10,0x00,0x00,0x20,0x3c,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x40,0x67,0x8a,0x02,0x00,0x00,0x28,0x00,0x00,0x20,0xe0,0x01,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x2e,0x55,0x24,0x00,0x00,0x0a,0x00,0x00,0x20,0x00,0x0f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xda,0x90,0x02,0x02,0x80,0x09,0x00,0x00,0x10,0xe0,0x3f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0x45,0x54,0x11,0xe0,0x04,0x00,0x00,0x20,0xfc,0x7f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xe8,0x21,0x89,0x04,0x38,0x01,0x00,0x00,0xa0,0xff,0x3f,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xa0,0x57,0x52,0x90,0x87,0x00,0x00,0x00,0xf0,0xff,0x07,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xfe,0x5e,0xd5,0x52,0x00,0x00,0x00,0xfe,0xff,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x40,0xff,0x07,0x08,0x00,0x00,0xc0,0xff,0x1f,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xb8,0x02,0x00,0x00,0xe0,0xff,0x03,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0
};

443
Amilogo.pm Normal file
View File

@@ -0,0 +1,443 @@
/* XPM */
static char *noname[] = {
/* width height ncolors chars_per_pixel */
"237 237 199 2",
/* colors */
"`` c #46243B",
"`a c #E4CECC",
"`b c #A6966E",
"`c c #696867",
"`d c #BAB8C7",
"`e c #575348",
"`f c #4B442F",
"`g c #CB6961",
"`h c #C4B2A9",
"`i c #898465",
"`j c #866C4B",
"`k c #381019",
"`l c #B1823D",
"`m c #82242D",
"`n c #764B6D",
"`o c #D7C697",
"`p c #866141",
"`q c #775A11",
"`r c #7B7B4D",
"`s c #9C739C",
"`t c #C84C40",
"`u c #776A53",
"`v c #A78D6B",
"`w c #855D82",
"`x c #D9B9A6",
"`y c #973B2A",
"`z c #583B24",
"a` c #FBE7E5",
"aa c #270D15",
"ab c #C4AC84",
"ac c #B5B4B4",
"ad c #B798B6",
"ae c #F3F4EA",
"af c #897B4D",
"ag c #B6B583",
"ah c #A84237",
"ai c #584C34",
"aj c #E4D099",
"ak c #DEC372",
"al c #664B4F",
"am c #A884A7",
"an c #672739",
"ao c #ABABA3",
"ap c #868482",
"aq c #A47CA3",
"ar c #994749",
"as c #E5DEC8",
"at c #3D1E16",
"au c #655551",
"av c #886524",
"aw c #57304A",
"ax c #5B5B47",
"ay c #9B9B93",
"az c #BB483C",
"b` c #767472",
"ba c #8A6472",
"bb c #561A1E",
"bc c #686357",
"bd c #722F1F",
"be c #78673F",
"bf c #968A98",
"bg c #ECEDDF",
"bh c #A89C99",
"bi c #E6E4E3",
"bj c #853521",
"bk c #BBBC87",
"bl c #BB8859",
"bm c #E3E4CC",
"bn c #DCDCD9",
"bo c #B49E94",
"bp c #CDB367",
"bq c #7C7B74",
"br c #ECB4AA",
"bs c #E8EAD4",
"bt c #96949E",
"bu c #453C3E",
"bv c #663C23",
"bw c #685867",
"bx c #936A59",
"by c #977D3F",
"bz c #674866",
"c` c #887C79",
"ca c #C5C4C2",
"cb c #474443",
"cc c #AB313C",
"cd c #D9CBCF",
"ce c #D38A7A",
"cf c #CCCCCC",
"cg c #88492D",
"ch c #683A53",
"ci c #4C4C4B",
"cj c #FCFDFB",
"ck c #C4C499",
"cl c #373329",
"cm c #BCBCBC",
"cn c #956F2C",
"co c #554B4D",
"cp c #3C3C3B",
"cq c #372A1F",
"cr c #988C67",
"cs c #B79675",
"ct c #050305",
"cu c #D4BEC3",
"cv c #8C8B65",
"cw c #B9ABAF",
"cx c #F9C8C3",
"cy c #79734F",
"cz c #847571",
"d` c #ACACAC",
"da c #B6A6A2",
"db c #2C2C2B",
"dc c #B25859",
"dd c #959492",
"de c #655C59",
"df c #A9A86A",
"dg c #AC8CAC",
"dh c #9C9C9C",
"di c #1C1C1B",
"dj c #A7843D",
"dk c #A49490",
"dl c #E4CC86",
"dm c #B6A370",
"dn c #573B55",
"do c #151414",
"dp c #473A24",
"dq c #C5AEA3",
"dr c #64561C",
"ds c #F4E2DB",
"dt c #DCDCC0",
"du c #D9A599",
"dv c #362B31",
"dw c #A9A484",
"dx c #CBCBA2",
"dy c #976C97",
"dz c #685837",
"e` c #D5D4B9",
"ea c #877A87",
"eb c #EEBBB4",
"ec c #8A668A",
"ed c #E5D2CC",
"ee c #7C7C7C",
"ef c #D9CF9F",
"eg c #572F19",
"eh c #C7BDA1",
"ei c #952B35",
"ej c #755A4A",
"ek c #48151E",
"el c #D5D4D3",
"em c #957D66",
"en c #160D11",
"eo c #ABAB82",
"ep c #765A37",
"eq c #575454",
"er c #B8B49C",
"es c #C4A43E",
"et c #90782C",
"eu c #8F854C",
"ev c #D2BB70",
"ew c #D6C6C0",
"ex c #5C5C5C",
"ey c #87744E",
"ez c #B6A886",
"f` c #BCBB99",
"fa c #96756A",
"fb c #C6B5BA",
"fc c #492E46",
"fd c #6A6B4F",
"fe c #A49F6A",
"ff c #373434",
"fg c #8A5268",
"fh c #261C20",
"fi c #E8D9A6",
"fj c #A5A4A3",
"fk c #795778",
"fl c #262423",
"fm c #FC0305",
"fn c #492E21",
"fo c #AFB071",
"fp c #361B2C",
"fq c #A69AA7",
"fr c #664A30",
"fs c #8C8C8A",
"ft c #C9BCBC",
"fu c #76434D",
"fv c #D55B4E",
"fw c #999565",
"fx c #9F8140",
"fy c #562234",
"fz c #F4DEDC",
"g` c #FC1818",
"ga c #56452D",
"gb c #C4ABC4",
"gc c #E8D9DA",
"gd c #DB9988",
"ge c #A58D8B",
"gf c #988567",
"gg c #766B6A",
"gh c #CCCBBB",
"gi c #998C89",
/* pixels */
"bnbnbnbnelbnelelbnbnelelelelelelbnelelelelelelelelelelelelelelelelelcfelelelcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcacfcfcacacfcfcacacfcacacacacacacmacd`cmcacacabicjcjaecjcjcjcjcjaecacmcmcmcmcmelcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecfacaccmacaccmacacacacacacacacacacacacacacacacacd`acd`acd`d`acd`acd`cfaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbnd`dhfjfjdhdhdhdhdhdhfjdhdhdhdhdhdhdhdhdhdhdhdhdddhdhdhdhdhbtaydhaybtaybtddelcjcj",
"bnelbnelbnelbnelelbnelelelelbnelelbnelelelelelelelelelcfelcfelcfelcfelelcfcfelcfcfcfcfcfelcfcfcfcfcfcfcfcfcacfcfcfcacfcacfcacfcacfcacacacacacacacacacacaacacd`aocmcacacfaecjaecjcjcjcjcjbicmcacmcmcacfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecfaccmacacacacacacacacacacacacacd`acd`acacd`acacacd`acd`d`acd`d`acd`d`d``dbgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbgcafjfjfjdhdhfjdhdhfjfjdhdhdhdhdhdhdhdhdhdhdhdddhdddhbtddddbtayddbtaybtaydddhddd`aecj",
"bnelbnelbnelbnbnbnelelbnelelelelelelelelelelelelelcfelelcfelelelcfcfelcfcfcfcfelcfelcfcfcfcfcfcfcfcacacfcacfcacfcacfcfcacfcacacfcacfcacfcacfcacacacacacacaacacd`d`cmcacacacfbnbgaecjcjbg`dcmcmcmcmcfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcfacacaccmacaccmaccmacaccmacacacacacd`acacacd`acd`d`acd`cmd`aod`d`d`d`d`d`d`d`cabicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbncmfjbtdhdhdhfjdhdhdhdhdhdhdhdhdhdhdhdhdhdhdhdddhdhbtaybtayayayaybtddaybtddbtddaybtdhbncj",
"bnbnelbnelelbnelelelelelelelbnelelelelelelelelcfcfelelcfelcfcfelcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcacfcacfcacfcacfcacacfcacacacacacfcacacacacacacacacacmcm`dd`accmcacmcmcmcfcfcdaeeedoctflbtcaaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbnacacacaccmacacacacacacacacacd`d`acd`acacd`d`acd`d`acd`acbielcmd`d`d`d`d`d`fjd`fjd`cfaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaebicfacdhdhdhdhfjdhfjdhdhdhfjdhdhdhdhdhdhdhbtaybtaydhdhbtaybtayddaybtbtaybtaybtddddddddbtaybtd`ca",
"elbnelelelelbnelelelelelelelcfelcfelelcfelelcfelelcfcfelcfcfelcfcfelelcfcfcfcfcfcfcfcfcfcfcfcfcacacfcfcacfcfcacacfcfcacacfcacacfcacacacacacacacacmcaca`dcacmcmacacfjaccmcacmca`d`daoeectctctctenaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbiacaccmacacacacacacacacacd`acd`acd`acacd`d`d`acd`acacd`aoelcjcjaebncmfjaod`d`d`fjd`aofjaccfaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeelacfjdhdhdhdhdhfjdhdhdhdhdhdhdhdhdhayaybtdhdhaydhaybtayddaybtaybtaybtddaybtddddddayddddddddaybtdddd",
"bnelelelbnelelelelelelelelcfelelelelcfelcfcfelcfcfcfcfelcfcfcfelcfcfcfcfcfcfcfcfcacfcfcacfcacfcfcacacfcacfcacacfcacacacacacacacacacacacacmcaca`dcacacmcacacacmcmcmacfj`dcmcmcmcmcmacdictctctctctcmcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbgcmacacacacacacacacacacacacacd`acacacd`acd`d`acd`d`d`d`aocmaecjcjcjcjaebn`daofjfjd`d`fjd`fjfjaccabicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcfcaacdhdhdhdhdhfjdhfjdhdhdhdhdhdhdhdhdhaydhaydhayaybtayaybtayddbtayddbtayddddddddbtayddbtddddbtaybtayaybt",
"elelelelelelelelelelelcfelelcfelelcfelcfelcfcfcfelcfelcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcfcacfcacfcacfcfcacacacfcacacacacacfcacacaca`dcacmcacacmcacmcacmcacmcacmcaacaccmaod``dcmcmcmcmcmctctctctctctcfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcaacacacacacacacacd`acd`d`d`acd`acaod`d`d`acd`d`d`d`d`aod`bicjcjcjcjcjcjcjaebicafjfjd`fjd`fjfjfjdhd`caaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecadhdhdhdhfjdhdhdhdhdhdhdhdhdhdhdhdhayaydhbtaydhbtbtayaybtaybtbtaybtaybtaybtddbtddddddddbtfsddfsddbtddaybtay",
"elelelelelelelelcfelcfelcfelelcfelcfcfelcfcfcfelcfcfcfcfcfcfcfcfcfcfcfcfcfcacfcacfcacfcacfcacfcacfcacacfcacacacfcacacaca`dcacmcacacacacmcacacmcacmcmcacm`dcacmcmac`dacaoaocmcmcmcmcmdbctctctctdicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbnacacacacacacd`acd`acd`d`d`cacaacd`acd`acd`d`d`d`d`d`d`d`cmaecjcjcjcjcjcjcjcjcjbicaacfjd`fjd`fjfjfjfjfjd`cacfbgcjcjcjcjcjcjcjcjcjcjcjcjcfcmd`dhdhdhdhdhdhdhfjdhdhdhdhdhdhdhdhayaybtaybtaybtbtayaybtbtaybtddayddddddddddddddddddddddfsddbtfsbtfjacaccmacac",
"elelelelelelcfelcfelcfelcfcfcfelcfcfelcfcfcfcfcfelcfcfcfcfcfcfcfcfcfcacfcfcfcfcacfcacacfcacfcacfcacacacacacacacacacacacmcacacmcacacacmcacmcmcacmcacmcmcacmcmcmcmcmcmacfjfjaccmcm`dacdddoctctdicfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcad`acacacacacacd`acd`accfbnaecjbncmaod`aod`d`d`d`aod`d`acbicjcjcjcjcjcjcjcjcjcjcjcjbid`dhfjfjfjfjfjfjfjdhfjdhd`cfcjcjcjcjcjcjcjcjcjbiacdhdhfqfjdhdhdhdhdhdhdhdhdhbtaybtddbtbtddbtaybtaydhaybtddbtayddaybtddbtddbtddddddfsbtddddddfsbtddfsfsdhaecjcjcjcjcj",
"elelcfelcfcfelelcfelcfelcfelcfcfelcfcfcfcfcfcfcfcfcfcfcfcfcfcfcacfcacfcacfcacfcfcacfcacacfcacacacacfcacfcacacacacacacmcacacmcacmcacmcmcacacmcacm`dcacmcmcmcacmcmcmacacd`fjfjaccmaccmcmcmaccacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjelacacacacacacd`acd`d`cmaecjcjcjcjcjbicmd`d`d`d`aod`d`d`fjcacjcjcjcjcjcjcjcjcjcjcjcjcjcjel`dfjfjd`fjfjfjfjfjfjfjfjfj`dcacfbicjcjcjbgcmfjdhdhfjdhdhdhdhdhfjdhdhdhaybtaoacacacacacacd`fjddbtbtaybtayddbtddbtddddddddddddbtddddddddfsddddfsfsfjd`elcjcjcjcjcjcj",
"elcfelcfelelcfelcfelcfcfelcfelcfcfcfelcfcfcfcfcfcfcfcfcfcfcfcacfcacfcacfcacacacacacacacacacacacfcacacacacacacmcacacacacmcmcacacmcacmcacmcmcacmcmcmcmcmcmcmcmcmcmcmacac`dd`btfjaccmcmaccmbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbgcad`acd`acd`d`d`d`acd`cabicjcjcjcjcjcjcjcjbnacfjfjd`d`d`dhfjbncjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjeld`btfjfjfjfjfjdhdhfjdhfjdhdhd`accfftd`dhdhdhfjdhdhfjdhdhdhdhdhdhbtaycfaecjcjcjcjcjcjcjbnacddfsfsddddbtddddddddbtddddddddfsbtfsddfsddfsddfsapaecjcjcjcjcjcjcjcj",
"elcfelcfcfelcfcfelcfcfelcfcfcfcfcfcfcfcfelcfcfcfcfcfcacfcacfcacfcfcacfcacfcacfcfcfcacacacacacacacacacmcacmcacacacmcacmcacmcacmcacmcacmcacmcmcmcmcmcmcmcmcmcmcmcmcmacacaccmfjdhd`cmaccmaccaelbicjcjcjcjcjcjcjcjcjcjcjcjcjaeacd`acacd`acd`acd`d`fjcaaecjcjcjcjcjcjcjcjcjcjbicfcmfjfjfjacelcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbicmfjfjfjfjdhfjfjdhfjdhdhdhdhaydhdhdhdhdhdhdhdhdhdhdhdhdhaybtayacelcjcjcjcjcjcjcjcjcjcjaecaaccmfjfsddddbtddddddddddddfsddddddfsddddapfsfj`daecjcjcjcjcjcjcjcj",
"cfelcfcfelcfelcfcfcfcfcfcfcfcfcfcfcfcfcacfcfcfcfcfcacfcfcacacfcacfcfcacfcacacacacacacacacacacacacmcacacacmcacmcacmcacmcacmcmcmcmcmcmcmcm`dcmcmcmcmcmcmcmcmaccmcmaccmacaccmaobtdhd`cmacacacaccacjcjcjcjcjcjcjcjcjcjcjcjcjbgfjacd`d`d`acd`d`d`d`cfaecjcjcjcjcjcjcjcjcjcjcjcjcjaeelelbnbgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjelbtfjdhdhfjfjdhdhdhfjdhdhdhdhdhdhdhdhdhdhdhaydhbtaybtdhcabnaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbgcfdhfsddddddfsddfsddddfsfsddddfsfs`delbgcjcjcjcjcjcjcjcjcjcj",
"elcfelcfcfcfelcfcfcfcfelcfcfcfcfcfcfcfcfcacfcfcfcacfcacacacfcacacacacacacacacacacacacacacacacmcacacacmcmcacacacmcm`dcacmcacmcacmcmcmcmcacmcmcmcmcm`dcmcmaccmaccmaccmcmd`acd`fjfsdhacaccmacacaccacfbgcjcjcjcjcjcjcjcjcjcjbid`d`acd`acacd`d``dbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcffjdhfjdhdhfjdhfjdhdhdhdhfjdhdhdhdhdhaydhdhaybtaocfbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbicafjfsfsddfsfsfsfsfsfsfsfsdhcacjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfelcfelcfcfcfelcfcfcfcfcfcfcfcfcacfbtb`cidbffcbb``dfs`c`cexeecfcacacacacacacaca`dbt`cexffdoapcacacmcacacmd``ccpffcifscmcmca`dcmcmcmcm`dcmeeeqdbdbexfj`dcmacaccmaccmacacacacd`dheeb`excbdbdiacd`d``dcmbicjcjcjcjbicmapeqdbctd`d`acd`d`d`cmbgcjcjcacmaceeelcjcjcjcjcjcjcjcjeleecpfjcjcjcjcjcjcjcjcjaeftddeecbfld`cjcjcjcjcjcjbifscicbexbtbtdhdhfjdhdhdhdhdhdh`ccbflflciapbtbtaydhbiaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbicfcfcacfcfcfcfcfcfcaelaecjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfcfcfcfcfcfcfcfcfcfcfcfcfcfcfd`cienctctctctctctctdoctctctcteqcacacacacad`eqdbenctctctctctctacca`dcacadhdbctctctctctctexcmcm`dcacmcmcmexdoctctctctctctfsaccmcmaccmacacac`ccpdictctctctctctcbacacacacd`cmbtexcpctctctctctctfld`d`d`d`d`cmbncjcjcmctctctctcacjcjcjcjcjcjcjfsctctctctbicjcjcjbib`cpenctctctctctctaecjcjcjcjelcpctctctctctctexdhdhdhdhdhfjdhcictctctctctctctb`d``dcmcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfcfelcfcfcfcfcfcfcfcfcfcacmcictctctctcifscaca`deectctctctctbtcacacacacaexctctctctctctctctdbcacmcmcaexctctctctctctctctctcmcmcmcm`ddhdictctctctctctctctdocmacaccmacacacacdictctctctctctctcteeacacacaod`d`cbctctctctctctctctcid`acd`acelaecjcjcjeectctctctcjcjcjcjcjcjcjcjacctctctctfscjcjcjeectctctctctctctctcpcjcjcjcjapctctctctctctctctctfjaydhbtayeedictctctctctctctctdiaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfcfcfcfcfcfcfcfcfcfcfcafsenctctctcpcmcfcacacfcacf`cctctctctcacmcacmcacmcacadhfscpctctctct`ccmcmaccbctflapaccmcbctctctctfscmcmcmb`doctciddacfjdictctctctdhacacacacacacacacacd`ddctctctctctfjacacd`accmd`d`d`aofjdbctctctctb`d`aoacelcjcjcjcjcjcpctctctcpcjcjcjcjcjcjcjcjcfctctctcteqcjcjcjcjcjcfcmcictctctctddcjcjaeexctdbd`bgcjexctctctctfjfjbtdh`cctctciddcmcmdbctctctctbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfcfcfcfcfcfcfcfcfcacfeectctctct`ccfcacfcacacacacacpctctctdbcacacacacacacacacacaexctctctctfjcaacflctexcm`dcmcmacctctctctfscmcmb`ctdidhcmaccmcmeectctctctfsacacacacacacacacacd`acdictctctdiacd`d`acbnbgelcmd`fjd`cpctctctctayaccfbicjcjcjcjcjcjctctctcteecjcjcjcjcjcjcjcjcjctctctctcpcjcjcjcjcjcjcjapctctctctbncjaedvcteecjcjcjcjaectctctctcmbicfeectdbelcjcjcjcjacctctctctcmcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfcfcfcacfcfcacfcfcaeectctctcteecfcacacacfcacacaacctctctctb`cmcacmcmcacmcmcm`dcacbctctctdicm`dcpctb`cmcmcmcmcmcmctctctctfjcmfsctfld`accmacacacapctctctctfsacacacacacacacd`d`acfjctctctctciacacd`acbgcjcjaecfcaacdictctctdocabicjcjcjcjcjcjcjcmctctctctaccjcjcjcjcjcjcjcjcjctctctctb`cjcjcjcjcjcjcjexctctctdicjcjcictfjcjcjcjcjcjcjctctctctbicjcmctdbaecjcjcjcjcjcmctctctctelcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfcfcfcfcacfcacfcaeectctctcteqcacacacacacacacacaeectctctctaycacmcacacmcacmcacmcadictctctcicmeqctb`cmcmcmcmcmcmfjctctctctcmddctfld`cmacacaccmacexctctctctacacacacacacacacacd`aceectctctctb`fjd`d`d`bicjcjcjcjcjcfctctctctexcjcjcjcjcjcjcjcjcjb`ctctctctbgcjcjcjcjcjcjcjcjcjctctctctdhcjcjcjcjcjcjcjflctctctb`cjb`ctdhcjcjcjcjcjcjbictctctencjcfdodbaecjcjcjcjcjcjapctctctctcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfcfcacacfcacfcafjenctctctflcacacacfcacacacacmcacpctctctct`dcacmcacmcacmcacmcafjctctctctddeectexcmcmcmcmcmcmacb`ctctctcpcmdidofjacacacacacacacdictctctdbacd`acacacd`acd`acd`d`cictctctctfsayd`d`d`aecjcjcjcjcjd`ctctctctfjcjcjcjcjcjcjcjcjcjdbctctctdicjcjcjcjcjcjcjcjcjcjctctctctbicjcjcjcjcjcjbnctctctctcmd`cteecjcjcjcjcjcjcjdhctctctcicjdbenbicjcjcjcjcjcjcjdbctctctcpcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacfcfcacacfcaflctctctctdhcacacacacacacacmcaacctctctctcpcacmcacmca`dcmcmcmcmb`ctctctctacctffcm`dcmcmcmcmaccmcbctctctb`cictapacacacacd`acacdhctctctctexacacacd`acacd`d`acd`d`doctctctdbapfsdhd`d`aecjcjcjcjcjeectctctctbncjcjcjcjcjcjcjcjbictctctctexcjcjaeaecjcjcjcjcjcjctctctdbbibncjcjcjcjcjfjctctctenaeencpcjcjcjcjcjcjcjcjbcctctctdhb`ctcmcjcjcjcjcjcjcjbictctctctfscjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cfcfcacacacaca`cctctctctexcacacacacmcacmcacaca`cctctctctb`cacmcacmcacmcmcm`dcacbctctctcbcpdod`cmaccmaccmacaccmdoctctctb`ctciacacacacacacacac`cctctctctddacd`acd`acd`acacd`d`ayctctctctflcbexbtd`d`bgcjcjcjcjcjcpctctctdocjcjcjcjcjcjcjbgdhcbctctctctffci`c`capaccjcjcjcjcfctctct`cci`caecjcjcjcjexctctctexcidoaecjcjcjcjcjcjcjcjdictctctdhctb`cjcjcjcjcjcjcjcjdhctctctctelcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacacacfcad`enctctctctcmcacacacmcacacacmcacmdictctctctfjcmcmcmcmcmcmcmcmcmcmdictctctcbctb`cmcmcmaccmacacacfjctctctdididid`cmacacacacacacaccpctctctdod`acd`acd`d`acd`acd`d``cctctctctffdbflcifsd`caaecjcjcjcjctctctctciaebgbgcjcjcjcjfjflenctctctctcldbcbeefjacdhdhapexexctctctff`ccicfcjcjcjcjflctctctexctdhcjcjcjcjcjcjcjcjbictctctdbdbdiaecjcjcjcjcjcjcjcjeqctctctdicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacacfcacacbctctctctexcacacmcacacmcmcacmcaeectctctctdicmcmcacmcmcmcmcmcmcmfjctctctctctdbcmacacaccmacaccmac`cctctctencteeacd`acacacacacacfjctctctctciacd`acd`d`d`d`d`acd`d`cpctctctctaocr`fdidbexfsapacaecjcmctctctctexb`exbtcjcjcjaeeqcpctctctctctfwdwcvaxdbdienendodidictctdiacelciexfjd`acdhctctctctctcpcjcjcjcjcjcjcjcjcjfsctctctdoctaccjcjcjcjcjcjcjcjbgctctctctb`cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacacaca`dctctctctctaocacmcacacmcacmcmcacmdoctctctctcbcmcmcmcmcmcmcmcmcmcmb`ctctctctctapcmacaccmaccmacacaccpctctctctdbacacd`acd`acacd`aceectctctctfsd`d`d`d`d`d`d`d`fjd`d`ctctctctdbbcbv`fdz`fdbffdifleed`eqctctctctdidib`bicjcjcjbncpcbctctctctdiafeyfwbkdwbqbccpexddctctctaodqboggdbcbcpdbenctctctctctcmcjcjcjcjcjcjcjcjcjeqctctctctcpcjcjcjcjcjcjcjcjcjacctctctctcfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacacaca`cctctctctcpcmcacacmca`dcacmca`deectctctctcteecmcmcmcmcmcmcmcmcmaccbctctctctcpcmacaccmacacacacaccmctctctctctapacd`acd`acd`acd`accpctctctctaoaod`d`d`d`d`d`d`d`d`fsctctctctdedzdpfwfefx`ucibudbendictctctctctb`bucbaofjfjcffscidictctctctbcdxfeeufwfobkbk`bezc`ctct`eghcseuczcpgiddcvdbctctctctdbbtcaaecjcjcjcjcjcjcjenctctctctcacjcjcjcjcjcjcjcjcjexctctctdocjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacacmcaflctctctctb`ca`dcmcmcmcmcmcmcmcmdictctctctctaccmcmcmcmcm`dcm`dcmcmdoctctctctfsacacacacacacacacacapctctctctdbacacacd`d`d`d`d`d`fjctctctctcpd`d`d`d`acd`acacacd`d`eqctctctcteqcqdoexcyfdaxbe`rgf`eflctctctctfheuafclclcbfldvflcbctctctctctddcjbmfocrfefodfdfdfcpctct`peycrafcrci`e`b`bdictctctctexeeb`exfscfcjcjcjcjcactctctctcpcjcjcjcjcjcjcjcjcjcjdoctctctexcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacacmcactctctctctaccmcacmcacmcmcmcacmexctdbctctctdicmcm`dcmaccmcmcmcmacddctctctctdiaccmacacacacacacacacexctctctct`cacd`acacacd`d`d`d`eectctctctb`fjbtapfsapee`cexcpcpcpenctctctctcicbcbfldocifdfdcvdfdwfdctctctctfleudffw`edvgaaicpctctctctctctdxaecjbgf``bdffodffwctctaiepdzeueuezayciafejctctctctctcfcjbiacfseeb`fjbiaeeectctctctdhcjcjcjcjcjcjcjcjcjcmctctctctaccjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacmcacmctctctctdbcacacmcmcmcmcmcmcmdhctcidictctctcicmcmacaccmacaccmaccm`cctctctct`cacacacacacacacacacacdbctctctctacacd`d`d`acd`fjd`d`cpctctctctcicicicicpfldididbffcpcpctctctctflbccicpfldodi`efwbkdfdffdctctctctdp`fbeagagcydpaiaictenctctctdidtbmaecjbmercrfefeclctdbfofwafezfeehdxexcbdpctctctctendbex`cb`eeb`eqdbcp`cflctctctencjcjcjcjcjcjcjcjcjcjb`ctctctctcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacacmcacmctctctctexcmcmcmcmcmcacmcmcmfldifsctctctctfscmaccmacaccmaccmcmacffctctctctaoacacacacacacacacacfjctctctctcbd`acd`acd`acfjdhfjfjdoctctctendbdbcbeqci`ceeddeebtfjeectctctctb`dd`ccidbdbdbdibcf`efdfdpctctctctbedzdzeuagfo`iclenctflctctcteqaedtbmaeaegh`bfw`rctcterbgbkcr`bcsewdtdddbdictctctctcpendiflfldbdididiflcpctctctctcbbicjcjcjcjcjcjcjcjcjdictctctcicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"ca`dca`dcactctctctb`cacmcmcmcmcmcm`deqctfs`cctctctctaccmcmcmfscmacaccmacacctctctctdbacacd`acacacd`d`acacb`ctctctctbqd`acd`d`d`fjfjddeecictctctctcidhbhfjfsayaybtfsaycfbg`cctctctctcfcacmaob`bq`c`edbciaodxdoctctctdifwfwcyfr`ufweoaictclatctctctcpbidtcaehcacaddcrflctfde`bickfwfw`v`hdtckbcctctctctclbqdbapayb`eqciexcpffdbctctctctdoeqcmbgcjcjcjcjcjcjelctctctctdhcjcjcjelbgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmcacmcmcmctctctctfscmcacmcmcmcmcmb`cteqcmdictctctdbcmacacfjdociacacacacddctctctct`cacacacacacd`acacd`d`cictctctctd`d`d`fjfjfjd`dhfseqdoctctctctc`apb`ggfldibtfsgifjaccmdoctctctflfbbtapfjencidhfs`ccp`fddctctctct`fdfdfbkfwafbhcvctcldzdoctctctflcfcjbsbmbicjas`ectcpdxcme`bkfwezdaezghghfsctctctctcvddffaccjaebgelcabtb`ffctctctctffflfl`ccmcjcjcjcjcjeectctctctaecjcjcjcpffcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmcmcmcmcactctctctfs`dcmcmcmcmcmbtctdicmd`ctctctct`caccmaccpctdhacacacac`cctctctctayacd`acacd`d`acd`d`acdictctctcpaod`aod`d`d`d`ddeecbctctctctfldkcwfbggctggdadkddbhcwgictctctctcpdaaobcdbctcwcdacapb`cbclctctctctfddfbkdxdxdffeflctfeeuctctctctfl`ebgcjbsdtbgaoctdiehdtdtbmdtfockbibibmdxexctctctctcmckcbeeaea`a`aeaeaecjdbctctctcifj`cdbencpdhbgcjcjcjffctctctcpcjcjcjddctdhcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmcacmcmcmctctctctfscmac`dcmcmbtctfld`acb`ctctctctddacaceectciacacacacacffctctctdiacacd`d`acacacd`acd`btctctctct`cd`d`d`d`d`acdhddeecpctctctctggfbftdaenfhcwcwdkdkgedkdectctctctffgida`cct`eewcdewdaddfsdbctctctct`rfodxdtdtbkdbctcvfefectctctctdpdbapcjcjbmaoenenfw`hdtdtdte`dxagbmcjbie`dbctctctdoerbmfdeqedaea`a`a`a`cdctctctctdhcjaeaceqcbapbicjcjbnctctctctddcjcjbnenffcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmcmcmcmcmctctctctcicmcmaccmeedoctdhcmacexctctctctacacddctfld`acacacacd`ctctctctciacacd`acd`acd`d`d`d``cctctctctfjd`aod`fjd`fjdhddeeffctctctctap`x`hflctddfbdadkdkdkdkcbctctctctc`bhgiendocwft`xewcuft`hcictctctctcvdffoe`dxclctfddfdfdfctctctctfn`fcqd`cjfjdoctghckerewdtdtdtbmbkbkaeedehenctctctfl`vbsfscpcaaea`a`a`a`bfctctctctgccjcjcjfjcpelcjcjcjfjctctctctcmcjaedbctcfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cacmcmcmcmctctctctenfscmfjcbctdiddacacacdbctctctctd`apdoctddacacacacacddctctctctapd`d`d`acd`d`acd`acd`cpctctctdbaod`fjfjd`fjdhbtdd`cflctctctctc`bhfhctb``xcwbodkbhbobhflctctctctdagienendkftcuftcacdgcgcb`ctctctctflfeckbqdoctfdckdtdxfoflctctctctgadpclcictdoaobsbmehftdtdtbsaedtage`gcdkctctctctfneydxcacpfqcja`a`a`a`eqctctctcpa`a`aeaeeedbcfcjcjcjeectctctctd`bidbctfjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmcmcmcmcmctctctctctctctctctdbd`cmacaccmffctctctctctctctddacacacacd`d`exctctctctacacd`d`d`d`d`d`d`d`d`doctctctexd`d`d`d`fjfjdhddfsexflctctctctctctctggftfbdadadadabhdkffctctctctctctctcidebcdeexde`c`cggb`ctctctctctctctcten`rckdtbgaebkaxctctctctctctctctflbnbmdtbge`dxbibmdtaecjbkbkbs`uctctctctcidzeze`ex`cbia`a`a`a`enctctctc`a`a`a`fzexdod`cjcjcjddctctctctctctctdhcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmcmcmaccmdhctctctctctctdob`accmacacacacb`ctctctctctdbddacacd`acacacd`cpctctctcpd`acd`d`d`acd`acd`d`fsctctctctfsfjd`d`d`d`fjdhdhfsexdbctctctctctdoggfbft`hbhgeeabccoffflctctctctctenffcbcpcpcieqcbdbffcpcpdictctctctctctcbe`agagdxdtbsdxbkdictctctctctctdi`cbgcjbmbmbmdtbgaedtbmcjdtfoe`cpctctctflcbgaemf`eeffcacja`a`ftctctctctfta`a`a`ds`cdoapcjcjcjbnenctctctctdid`cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmcmcmcmcmacd``ccpdbcieeacacacacacacacacaceeffdbcifsacacacd`acd`d`d`accpeq`capfjd`d`acd`d`d`d`d`d`d`b`cicieefsfjd`fjd`fjfjfjfjdhddexdbexcpflffeqgicw`xfbdk`edvdododoflffcpdidocp`cd`cmfjaccacfcmayddd`cmd`fjb`dbdidoflax`ccae`fodfagbkckdxfofdcldbdpaxafep`fapaeaebmdtdtdtaeasdtbgaeckbkcide`iaydwcibubcezfscpeafzfzdsbh`cb`cwfta`a`a`a`a`apdieqaecjcjcjcfexcpexdhaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmaccmcmacaccmacacacacacacacacacacacacacacacd`acacacacd`d`acd`acd`acd`acd`acd`d`d`d`d`d`d`d`d`d`d`d`fjaoaoaofjd`fjd`d`fjdhfjfjfjapciflc`bhddgedkbocwfbdaggfhdidiffcbex`capfsfsapeeeeeeb`ddfsddee`cb``cddee`c`cb`b``ccbaxb`axaodxdffefedfcke`agagdxbkfodxcrepbubtcjaee`dte`e`bsdtdtcjbmagabftdxe`dxdddvcogffecidbeq`capcwgcdsa`a`a`a`a`a`a`bffldbbncjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"accmaccmacacacaccmacacaccmacacacacacacd`acacacd`d`acacd`d`acd`d`acd`d`d`d`d`d`d`d`d`d`d`d`d`d`d`d`d`d`fjd`fjd`fjfjfjdhdhfjfjfjfjeecpfffsddgedkbhbo`hcwdagibccpcibc`ceqeqb`b`exeqffdbdbfffffldbflfldidbcpcpdbdbffcpcpcpflcpcicib`eofofefwfodtbme`ckfockckagemdzcbaccjbmdte`foe`bidtbsaedxfo`hewe`dxe`bqclcygibcfldoendibcapgicua`a`a`a`a`a`cwdvdid`cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"accmcmacacacacacacacacacacacacacacacacacacd`d`acacd`d`d`acd`d`d`d`d`d`d`d`d`d`aoaod`d`d`d`d`d`fjd`fjfjd`fjfjfjfjd`dhfsdhfjfjfjfjb`flcbgigigebhbhbocwdacwddb`ciciexb`cbcbcbfldodoctdodidididididididiflflfldidididbffdbfldoeq`rcpaydtbkagfobkbmaedxage`e`ckaggffreqcfcjbmdxfobkbnbnbmdtckdfag`hdxe`dtck`eciemfdex`cb`ex`ccbffc`a`a`a`a`a`a`cacpenb`cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmacacaccmacacacacacacacacd`acd`acacacd`d`d`d`d`d`d`acd`acd`acd`d`d`d`d`d`aod`d`d`d`fjd`fjd`d`d`fjd`fjfjfjfjfjfjfjbtdhfjfjfjfjdh`cdieqdhdddkbobobhdabocwcocbcbfldiflfldbdbdbdbdbdididididodoenctdoenctctctenctctctdodoenctdo`cb`fdckdte`f`foage`dxckbmdte`e`f`emaiexelcje`ckdfehelgcdxdffwfeabehe`dtdtddcibe`uexb`dhdhfsffdbeqcda`a`a`a`a`gceqdocibicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"acaccmacacacacacacacd`acd`acacd`acd`d`acd`acd`acd`d`acd`d`d`d`d`d`d`d`d`aod`d`fjd`fjd`fjd`fjd`fjfjd`fjfjd`fjfjd`dhdhfjfjfjfjfjfjexdo`caccwbofqdabhdkbocwcpciexcpcpffdoflflflfldidodododidodifldbffcbdncocobudvdbfffffldifldodicp`eexd`bsdtckbkfofodxdxdxckbkckezeyalfsaebgdxdwcs`xgce`agfeaf`vehew`oe`f`gg`fb``eexapap`cdbdbciftdsbia`a`a`a``cdiffcacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbncabiaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"acacacacacacacd`acacd`acacd`acd`acd`acd`d`d`d`d`d`acd`d`d`d`d`d`d`d`d`fjd`fjd`fjfjd`fjfjfjd`fjfjfjfjfjd`fjfjfjfjdhfjfjfjfjfjfjdhcbdofscacwdabhbodkgecwfjcbeeeeexb`cidoendododiffcpbudndnbufcfcdnbzbzdndnbzbzdn``dnfkfcfcfcfcdidoexeebqcmbgbmdxfodffofodfagdffockfeeyauaocjdtezgfblduehdxfecgcgboewdu`xe`ddcl`u`uexexex`cdbflcicmgcfza`dsa`a`b`didbfjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecafsb``c`c`cexdbcbeeeefjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"acacacacacd`acacacd`acacd`acd`d`acd`d`d`d`d`acd`d`d`d`d`d`fjd`d`d`fjd`d`fjd`fjd`d`fjfjd`fjfjfjfjd`fjfjfjfjfjfjfjfjdhfjfjfjdhfjddcpdigi`dbobhbobhdddkcwapciap`ceqapcpendodifheqbzfc``fcfcdndnbzbzfkbzdnbzfk`ndnfcbz`ndnfcfp````fcdvdeb`bqghbsbsckdffobkbkckckfodxdx`b`pbccfcjdx`varfvceacescgbdbxeh`xdu`adxaxbu`iexcpfleqcpdiffcwdsfza`a`a`a`apdiflb`cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcmcicpeqee`dbnbneedib`biaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"acacd`acd`acd`acd`acd`d`acd`acacd`d`acd`d`d`d`d`d`d`d`fjd`fjfjd`d`fjd`fjd`fjd`fjfjfjd`fjfjfjfjd`fjfjfjfjfjfjdhfjfjfjfjfjdhfjfjeeflflfsfjdkbhaddkgedkao`ceqfsexeqexdodbdnfc``flfhfhfc`nfk`w`w`wdydydyecdy`sdyecec`wecec`nbzdnfcfc``dobzb`apdwdtbsckckdtdtbkagckdte`f`eyfreeaecjehbxahfvezdc`ybdcgcsewdugd`adwcp`eauexdicbcbdiflfjbidsdsa`a`aebtfldbb`aecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbnfjapd`bnbgbibmbgcjbg`cdiapaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"d`acd`acacd`acd`acd`acd`acd`d`d`d`d`d`d`d`d`d`d`fjfjaod`fjd`fjfjfjfjfjfjfjfjfjfjfjd`fjfjd`fjfjfjfjfjfjfjfjdhfjfjdhfjdhfjdhfjdh`cdoffapdkdkdadadkgibhcweqb`ap`ccbdbflbzfcfcbzdnfhctdibwdy`sdy`saqamdgdgdgdgdgaqaqaqamamaq`sdy`w`nfcfpeneqfs`cfsdtbsdxcke`ckdfckdtckbkfwepaibfcjbgf`bxarfvazahbjbdafab`g`tcee`cvclai`eflcbexdbflaobia`dsa`a`a`dhflcpbtcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbnfqeed`bgbidxerdfdwezerbgbiexdbeeelcjcjcjcjcjcjcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"acacd`acd`acacd`d`d`d`d`d`d`d`d`d`d`d`d`d`d`d`d`aofjaofjfjfjfjdhaofjfjfjfjfjfjfjfjfjfjdhfjfjfjfjfjfjdhfjdhdhfjdhdhfjdhfjdhdhbtexdodbfsdkdacwdagidkfjcwcieeapexfldoffdvfhdvdvdvfpenctendnecaqamadadgbgbgbgbadadadcwgbgb`dgbadaqdyfkdnfpflexb``cfsdtbsdxckbkdfdfagagfoageugacqd`cjbgez`paz`tahahbjbv`v`g`tfvdughgg`fdecpcpexcpffdhfzbia`a`dsa`d`dbcpapaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjacfsd`aebgehezeoabagf`agagcdcjeleqeqfscacjcjcjcjcjcjbnbncjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"acd`d`acd`d`d`acd`d`d`d`d`d`d`d`d`d`d`d`fjd`fjaofjfjfjdhdhfjfjdhdhdhfjfjfjfjfjdhfjfjdhfjdhfjfjdhdhdhfjfjdhdhdhfjfjdhdhdhdhdhdhexencifqdadadqdkdkdk`daoexfseecbffcpfpenenfpfhenctctdodoendbfkgbcucacdcdcdcacucucacdgcbibielcfgbdgea`nfcfcfpeqbqexcvbmbsefbkfodffockefe`eh`qekcobicjasfwepahaz`y`ybd`pdm`t`t`geffjexdzaiexapciffbtbifzdsa`a`a`acffcpapaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbnfsapbnbgergffwagdxckghefewf`f`bgcj`deqdhaccfcjcjcjcjcjbgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaefs",
"d`acd`d`acd`acd`d`d`d`d`d`d`d`d`fjd`d`d`d`fjd`fjfjdhdhayayayayfjaydhaydhdhdhdhfjfjdhfjdhfjdhfjfjfjdhdhdhdhfjdhdhdhdhfjdhdhdhbtcienciacftdqdadkdkfjelgi`cdhb`cpeqcidi``dnbzbwdnfpfpenaadoctdib`cfelgcelgccdcdcdgcaebga`bigccdgbadaqecdndnaw``co`c`caye`bmdtckbkbkbkabewck`vbv`kcyaecjasgfcgah`y`ybjbdcrcs`tfvgddxb`cb`z`cdheqcbayfzfza`dsa`biftcpcpeebgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjac`cfjbndhdedzfddke`ghezerghdxdxdtbibgaed`eecfbncfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjac`cfl",
"acd`d`d`d`d`d`d`d`d`d`d`d`d`d`d`d`d`d`fjd`fjaofjfjfjfjayfjayayayayayayayaydhaydhdhdhdhdhdhdhdhdhdhdhbtdhdhdhfjdhdhdhdhdhdhfjapcpdo`ccaftdabhdkdkcwbib`apbt`ccpexcbbwfk`nfkfg``fp`kenenendoendobufqcdgccdcdcucdgccdcdcucucugbgbdg`s`wbzbz`wdn``ffci`e`rbkbmdtbkdxbkdmcefoaggfbdaagiaea`ewafbj`ybdbjbdejab`g`t`g`oacbcdvcpeeexexfjgcfzdsa`a`fz`dcbdbb`bicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaefs`cacacbcaiaieyezew`h`beyemezere`ase`ghascjfjb`bnbgelcjcjcjcjbicacmacfs`cbfbgcjcjcjcjcjcjcab`ffffc`",
"d`d`d`d`d`d`acd`d`d`d`d`d`fjd`fjd`d`d`fjfjfjfjfjfjayfjayayayayayayayayayayayayayaydhaydhdhdhdhdhdhaydhdddhdhdhdhdhdhdhdhdhdheedbdob`cmcwdabhgegidqelexfsfs`ccpcieqeady`wbz``fpfpfpfpaafpctctctctfl`c`dcdcucugbgbgbaddgamaqaqaq`s`secdncodyecbzfpfhcpcpcybkbmbmbkckagcsdjfedfavekatcsbrcxeweycg`ybdbjbjczdufvfvgde`fscbflciex`cdhbidsa`dsdsbicmcpffb`bncjcjcjcjcjcjcjcjcjcjcjcjcjcjbgapb`aob``eepafezelgc`bauaiegat`zgfewe`ewdxdtcjcjdhapbiaeaecjeleecbffdbcbexb`cpciacaecjbgd`bfb`cbcigfgf",
"acd`d`d`d`d`d`d`d`fjd`d`d`d`fjd`fjd`fjd`fjfjfjfjfjayayayayddayayddayddddayayayayaydhayayayayddayddddayddaydhbtdhdhbtdhdhbtdheefldieecwdabhbhgigecwcmeqapfs`cdbcb`caddyfgbz``fpdv```````k`kctctctctdocpbfcfcuaddgam`sdydy`sdydy`s`sdydnfc`w`secdnfpfhflcpfdckbgbmckckag`vdjfo`bcgekfnbabra`ca`jar`y`y`yfrfecsazfv`xerbqcpdbcbexdhfzdsdsa`a`bicfcbdb`celcjcjcjcjcjcjcjcjcjcjcjcjcjbnb``cb`de`ugfdwayb`gidkgfbcejcqdofhaiboew`hercdaecjaebtapbibifscpdidb`cacbnbne`cwc`exb`apb`fseecieqgf`p`z",
"d`d`acd`d`d`fjd`fjfjd`fjfjd`fjd`fjfjfjfjfjfjfjfjayfjayayayayddayddayayddddayddayayayayddayaydhayddddddayddayayddbtaydhdddhddb`difleeapdkbodkgigecwaociapfseqdbcpapadecfkfgawdnbzdn``ek`kaaaaenenenenenflexcwgbdg`s`sdydy`sdy`sdy`sdybwdvdnec`sdydnfhfpfl`f`rckaebsckbkdm`lblehbl`mekfncscxa`gheyarbj`yaveecsblblbre`fjb`ffffeqbtbga`dsdsa`a`cfcbfl`celcjcjcjcjcjcjcjcjcjcjcjcjeleqflcbau`vezergi`udzdpcogfcz`uc`bofjexcieydkcs`he`asbgbgbt`cexdbfldeacbgaebm`hfwemczbcaueqeqciffbcgf`p`z`z",
"aod`d`fjfjfjd`fjd`fjd`fjfjfjfjfjfjfjfjfjfjfjfjdhfjayayayayayayayddayddayayddddddddddddayayddddayddayddaydddddhdddddhdddddhddexdocpapggc`bhgegegicwapcibtapcidbeqdgadecfgfk`wfkaldnawekaafp`kendifldididoencpb`bfeaaqamdg`sdy`sdy`sdyfkdifpfkdydyfc``dvffbu`f`rdxaeaedxbkbldccsblahbbfn`ubrfzaeercycgbdbx`iafeuceewasdxao`cflexbtaea`fzdsa`bicfcbfl`cbncjcjcjcjcjcjcjcjcjcjcjcmcpflcbcybodxdh`ecbcqatejggc`fta`aecjcjcjcmexau`pgf`hehereheleedbeqgffacs`heher`ide`f`f`uemb`ciexeqgadp`fcgey",
"d`aoaofjd`d`d`fjfjfjfjfjfjfjfjfjfjfjfjfjfjdhfjdhfjayayayayddayddfwddddddddayddayddddddddddddayddddayddddddaydddhaydhdddhbtfseqdocicwdkgggegigidk`hapexfseeeqffb`fjdgec`wfgeceacochfy````fpendifhfl`ceqcpffdodiciexeebfcwadaqdy`sdy`s`wfpfpbzdyecdbfcfcbzbzfccp`rdfghbgdt`o`gdcbl`tbdbbbbczbrcxaeer`ubjbd`p`ueybldxe`ghckd`exexfjaebifzdsa`dscfcidi`cbncjcjcjcjcjcjcjcjcjcjd`dbffb``vezerc`dodoclbcapfta`cjcjcjcjcjcjcjcjbgfsco`zcz`jcragdxaggiapdzbvaidzauejax`ugfaffrdbflbc`bepfrdz`zdpai",
"d`fjd`fjd`fjfjd`fjfjfjfjfjfjdhfjdhdhdhdhfjdhfjayayayayayayayayddayayayddayddddddayayddddayddddddddddaydddddhddaydhdddhdddhapdben`cfjbogiczgigedkcdeaeqb`apexcpeegbaqdy`w`sbfczalaw``fpfpctendiendb`capeefs`ccpdbcp`cbtbtfqdg`s`sdydyecfcdidnecbzdvdbfcbzbzdnfhcqaxcycmaebmag`gazazah`ybbegfabrfzaeer`pbdbjejey`vab`oerehdtca`cbtaebgdsa`a`a`elcidi`celcjcjcjcjcjcjcjcjcjdddb`edddmgfbccpdiaiapfta`cjcjcjcjcjcjcjcjcjcjcjcjcjel`cdbbuczdqewf`dxezaxbucqfrfrepfaembedpflfndz`j`jejep`f`fb`b`",
"aod`fjfjfjd`fjfjfjfjfjdhfjaydhdhdhdhdhfjayaydhdhayayayayayddayddayddddayddddddddddddddayddddayddaydddddddddddddddddddddddheedbenci`ccogic`gidkdaewggcpb`ap`cfffs`d`sdy`sdgaqbwfuchatfpenenenenctfffsdhdhacfjeeexcpffeq`c`cex`wdy`s`sfkdvenfc`ndnfpdibzececfkaw``dbaxcycacjdtcs`tazahahbjbbatfaeba`bidwdzbvepgg`vce`hehehcae`dhb`bnaea`a`dsbibneqflexcacjcjcjcjcjcjcjaefsdidedwgfalflfh`edabicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjdhdodbcbgiezdqe`ezemembccoep`jejcqcqaiepbeepfrdpcq`fc`acdtas",
"d`fjfjd`fjd`fjfjfjdhfjdhdhdhdhayayayayayayayaydhayayayayayddddayddddddddddddfwddddddayddddayddddaydhdddddddddddddhddddddddb`fldocpexcodegigegidafbexexeefseqdbbtfbdy`saqaddadefkfu``aactenfpdododieecmcabiel`dbtap`ccpffdbcpcocofkaq`n``endi``dvdifcdy`s`sdydydydnbu`rfscmbiewbl`tahahazbjatfnamebfzbidwdz`z`uemabduehdaehdxcfapfsbiaea`dsfzbnexdieq`daecjcjcjcjcjcjfsdi`cerejfhfhbccaaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaccp`eejfndpczbobo`bafem`bczfnfhdicqaudzgacqdbdp`e`iehbmbgasbg",
"fjd`fjfjfjfjfjfjfjdhdhfjayayayayayayayayayayayayayayayayayddayddayddddayddddddddddddddddaydddddhddddddaydddhdddhdddhddbtdheefldieqexggeqapgegidadacofsfsbtexflbtfbdy`samadfbc`bwalaw`kaadofhfhdicici`celaecjaebicfd`cidodbdbfhdv`nfkfu``doenfpfhenfkaq`s`saqaqfqea``buexbqcabmew`g`t`yaz`taregbucecxa`bifwdzepb``beher`idkdxcacmb`d`aea`a`gccdexdieqcmbgcjcjcjcjbib`didbexffdo`facaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaccbggemfrbveg`zbcgigidw`b`bgfejepdzgacqcqdp`u`i`bagdtbiasdtbncd",
"d`fjfjfjfjfjfjfjdhfjdhayayayayddayddddayddayddayayayayddayayddayddddddddddddddddddddddayddddddaydddhdddhddddddddddddddddddeeflflcicibcdeggapgeboapcifsfsdheqflfsgbdyaqadgbftd`ggbu``ekdo``fhenenffb`b`btaecjcjcjbiaccpdocpb`ciffbubuchflfpfhflfcfhcpeadyecbwbubueqcocbcib`ddbnbg`xfvaz`y`tfv`y`zcoabcxa`cf`ibeeyczerghcv`idaf`ghca`ccfcja`gccdeqdbcpfsfsexbtbgelcbdidodbff`fc`bicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjd`cbb``j`zbvep`zfnfncbczdweh`hdk`vgfaicq`udae`e`dxdxghe`ghcmdd`edb",
"fjfjfjfjfjfjfjfjdhaydhayayayayddddayddayayddayayayddayayayayddddayddayddddddddddaydddddddddddddddddddhddddddddddddbtddddddb`diflcbcieqbcbuczdkbhemciapapdhcpdbbtadaqamadftgcgcdgbwfc``fpbuenfhctfleecmd`cfcjcjcjcjel`cdidbfsfqee`ceqeqfffffldvfccbcpdifldoendobtbicdgbgifd`cfjcjbsgd`gfvarfvfvar`pbwducxaecm`rbebeapghf`ddfwerehbiacb`ela`fzcdeqcbfldidofldbexcbdbcbcpexd`biaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjddcbfs`bbvdz`jdzcqatfnbvfngaaobnbgedbhbcdwdtbibncac``ub``cdeaudz`zat",
"fjfjfjfjfjfjfjdhdhfjayayayayddayddayddddddddayddayayayddayddayddayddddddddddddddddddddddaydddddhddddddddddddddddddddddddddb`diflcicicofccoggdkcwbfeqapeefsdbcbfqadaqdggbcucdcdfbaqdnfcchfcaaenenenb`cabncfaecjcjcjbgd`dbenflexexcpcicpdbdvflfhdncbflfldbdododidhcjcjaecudd`cfdacaebm`xducscscefvdcepfkcucjaeagcybeeydddxergigiagelaefseqcadselexciflcbeeapapdbdoeqb`btaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaefscpcmgccrepbebegagafregegfnfneqapaobibmererfjfsb``ecbcicpbuepfrbdegeg",
"fjfjfjfjfjfjdhfjdhfjdhayayayddddddddddayddayddddayddayayddayddddayddayddddddddddddaydddddddddhdddhdddhddddddddddddfsddbtfsexflcpciciffcpdegggeewcw`capeeeedbexfjamaqadgbcucdgbdgdgbf`nchfubb`kaactbubf`daecjcjcjcjcjbiapflenenctdofhflctctaafhbzecbzflctendoffbtcfbiaeaegcfjeebccmcjbmduduckabcefvarepczaecjbgeobebeczaoe`aocr`bghbsbieqcpcagcexcifl`cbndddzexffcibicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbtcpcmaeezeybefa`jfrfn`zdzbqapaycacadhd`cmbhbtayfjdwerbsaeacexflbb`p`jbv",
"fjfjfjdhfjdhfjfjdhdhdhdhayddayddddfwddddddayddayddddddddayddayddddddddddddddddddddddddddddddddddddddddbtddddddddbtddfsddfsexdicbffflflcbdegfbhbica`capee`cffb`fqam`sdggbcdcugbeabwam`sbzchchbb`k`kfhcb`caccjcjcjcjcjcjbnbtffdoenfldn``fpdofpawfu`wec`wexcbcp`c`c`capfjcfaea`gbbc`cbnae`ogd`ockabce`g`j`zb`bicjaefebebec`e`e`dwc``icabgcfcpeqca`cexflcica`uflcybceqacelbiaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjfjcpacbgdqey`uem`jfncqdefjbicjcjcjcjcjcjbncacacfbgbmbmaecjcjcjaefj`fdeeh`j",
"fjdhfjdhfjfjdhdhdhdhdhayayayddayddddddddddddddddayayddayayddayddayddayddddddddddayddayddddddddddddddddddddddbtddddddddfsapeqdoeqexdoffcoc`adewa`ftb`eeeeexdb`cd`aq`sdggbcdcdgbadfkdn`w`wfuchchekbb``fceqapacaecja`bielcuadecbzeq`w`wbz`nfgbz`wfkfgdyadaddg`w`w`weceaeabtbtcabneabu`cbia``xduefckabebboepcqapcjcjbgfe`uc`aodtdx`ico`ughae`dffexeqexffffgigadpcyaidbdicpexfscfbgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjacff`ccfckcreybegadvbcftaecjcjcjcjcjcjcjcjcjcjaebibibicjcjcjcjcjcjcjcfeq`cdk",
"fjdhdhdhdhdhfjdhaydhayddayddaydddddddddddddddddddddddddhddddayddddddayddayddddddddddddddddddddddddddfsddddddddfsddfsfsbtapciencp`cdbdvcodkfbgcaed`exb`apeqdb`cad`s`samgbel`a`ddg`sdvdvch`wfgfg`nawchchfgbaba`sdgdgdgadamdy`wec`sadgbgbfbcucugbgbgbcufbgbdg`wdnco`saqamdgadcwad`sdndv`cbgdsdu`xe`cke`dtdk`zfhaycjcjbmfwfwcwcfbmeobcdpdecfaefsdbcpapcbflcpdbdzbc`zfldiclcqdvcpex`capdhaccabnbnbibibgbgcjaebgcafscifscadxdwcrdzfpcicwaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbn`cco",
"fjfjdhfjfjdhdhfjdhayayddddddddddddddfwddddddddddayddaydddddhddddayddddddayddayddddddddddddfsddddddfsbtddfsddddfsddfsfsddeecbdodbcicpdb`egicweda`fjcbb`btcidb`ccaaqecaqfbgcgcgbad`sbzfhfhawbz`nfk`nanchchanchan`nar`wec`wbzbzdygbelbibibibibia`bgbibigccdgbamdndifc`necaqamaqfkfkbzfcflfscjgc`xdtdtcke`e`cyfhdofjcjcjdxfecmcmbndtcraxcq`eelcab`cpcicpfffl`e`fcqclfldpfrbvfrfrfrauaicbbucpcpcpciexci`cb`eeeedhcmcadteh`b`ubucpddbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbgee",
"dhdhdhdhdhdhdhdhdhayddddddddfsfscvfsfscvdddddddddddddddhdddhdhddddddddddddddddddddddddfsddfsbtfsddddddddfsddfsddfsfsfsddeecpdodbcpdbffgggggieda`dhffb`dhciflexelam`waqgbcdgccudg`sfkfcfpenfhfpfcaw````ekfyfybb``````fpdbdn`cgbgcbibia`aeaecjcjcjcja`bibigccdcwfkdbdofcbwecdyecdyfkdndnfffjcjbmdtbsdtcke`ezaienffcfcjaef`dff`cfbgdxcraifhb`elbnddbcdicpdifhdididiaxbqcbfnfnegegfrej`j`jgffedkddayfjaoftelelckftdtewbodefhcicfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjae",
"btaydhbtbtddfsddfsddfsfsfsddddfsddfsfsdddddddddddddddddddhddddddddddddddddddddddddddddddddbtddddbtfsfsfsfsfsfsfsfsbtfsfseedbdiexdbdicpczgabfewaefjdbb`fsciflb`bnbffkdygbcdelgbdgaqecbz``fpenfhfpfhaaenctenenenenenfhco`wecam`dbia`aeaea`bi`aela`aecjbifzbibicdgb`sfcdv``dnbwecdy`sdyfkfccicfcjbmbmbge`ckbkafcqdo`ecfcjaeageoerbnbgck`iaiflapbibielfdflfldiclbcapex`cex`fcpdpcqatfnfr`pem`bdwfe`bfwgigfdw`heoehe`gicoclbqbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"ddbtdhdhdhdhdhdhdhdhayayayddddfsddfsddfsfwfsfsfsddddayddddddddddbtddddddddddddddddddfsddfsb`apddddddfsbtfsfsbtfsfsfsfsfseeffflexfldbcbcoeqgicdcjfjdb`capcbffeecfec`ndyadgbcdgbdg`sdyfgchawfpaafpflfpfhctctcten``bzececececamcdaeaegccdgbadgbgbcdbiaea`bibielcugbgbamcofcdnfcfpdn`waqeaawfc`cbmaedtbmcje`bkfegafhcpaxbncjbge`bncfbibmckfeaiflfsbnbnfeaiflflb`bgcjbiaoexcpde`icybc`fdpfnfnfnfr`eejeyafaf`bdfbkao`cdb`ccacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"ayaybtdddhdddhddddddddfsddddddddfsfwfsfsfsddfsddddddddddddddbtddddddbtddddddddddfsddbtfscbdodb`cfsddddfsfsddfsfsfsfsddfseedbdicicbflcbfcczdkeda`apff`cfscbfffscabzbzecdggbfbadam`sdy`wfk`nch``aaenenaafpfpdi``fk`wfk`w`wecadcdgcfbgbadadadadgbgbcdgca`bigcgcfbgbadaddgbwdnbzdnfh``bw`wfcawbub`aebgdtbgaedxfocycqcqdpbqbgcjcjbncfcaaebgdt`bdpflcyfeeofdclclfjcjcjcjcjcjcfayeeapcvfwfw`i`uczgiboehftewe`agf``iff`eaccjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aodddhdhdhbtdhddddddfsfsfscvfscvfsfsddfsddfsfsfsfsddfsddddddddddddddddfsddddddddddddfscictdocici`cbtfsfsbtfsfsfsfsfsfsfsb`dbfleeeqflfl`ec`daelgceedbb`apcpdbbfd`dvbzecamadgbad`s`sdydy`wfk`nchfyfp`kfpfcfcfcbz`n`wecec`s`samadadadadgbgbgbeaaqgbcucdgcbibigc`a`dgbgbaddg`wbwbzbzfc``fp``fc``dvapbmbsdtaebgbkfedzfl`f`fddcjcjbgelelcdcjcjdxcy`fcpcicrcydpcob`bicjcjcjcjcjcjaecfd`fjfs`icvfwerefe`bmcjaeckggffapbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgelfjdhdddhdhdhddddddddddfsfsfsfsfsfsddfsfsddddfsfsfsddfsddddddddddddddddfsfsfsbtapcpdoffcpd`fjciapddfsfsfsfsfsfsapfsfsb`didbeeeqdbdiggbcbhcucdapcpb`btcpdieebtdvdn`wamadadam`sdy`sdyec`w`nbzchchdnchbzfkfkfkecdydy`sdy`s`sdggbdgadeacocpffcpbweaadcugcbibibigccdgbgbadbf`wco`n`wfkdndnbzfcaafhczeldtbmcjdtfoeudpclbecid`cjcjbibielbicjeweybe`fcpax`udpauciaccjcjcjcjcjcjcjcjcjcjcfcaacdd`icycyddaccmbccbaccjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaebgbncafjddddddayddddddfsddfsddfsddfsddfsfscvddddfsfsfsddfsfsfsddddfsfsapapddfscpdo`cbnb`cifsb``cbtfsfsfsfsfsfsfsfsap`cdidieqeqdvfh`cejczdq`deecpb`fjcbdieebtfpdnfkaqdgadamdydy`sdydydy`wfkfk`nfk`w`w`wdydy`s`s`s`s`sdyecameaeqcpciexeqfldoendbbwbfgb`agca`bigccdgbgbdgdy`wbwfkdy`secdy`nfcfhdob`e`dtbgcjckfecyclaidr`ecacjcjbibnelbgewemafcyai`f`fcibcffeecjcjcjcjcjcjcjcjcjcjcjcjcjaebielcfelbibnfjcacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bibgbibibibncad`dhddfsfsapapbqbqapcvfscvfsfsfsfsfsfsfsfsfsfsddfsddfsfsbtfsapfsfscidocibibg`cdoff`ceqeefsfsfsfsfsapfsfsapexdodiexeqcpbucoczdedkcwb`ff`cfjcbdiapbtdvdnbzecdgdgam`s`s`sdy`sdy`w`wfk`w`wecec`s`s`sdy`sdydyfkbz`cciflcobtelaebgd`ex`ccpenflbwadcdbibibigccdgbaddgdyfkfk`w`s`s`sdy`wbzfpdifse`dtaeaeckezbecldzai`cbncjcjbibnaebibo`beyai`eaiffcicpeeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"`daeaebnelcfcfcfcmdheeb`eeapcvapfsapapfsfsfscvfsapcvfsfsfsfsfsfsfsfsfsfsbtfsapexdocpac`dexb`ciflciexb`fsfsfsfsfsapapfsapexdifl`ecoggggbuczc`ddd`b`cp`cdhffdibtbtflfcfc`naqamam`sdy`sdy`w`w`w`w`wecdy`s`s`s`s`s`s`sfkfcdbfldienffcmcjaebiaebnd`cfcfeeffdv`cdggbgcbibibigbamdgamec`w`wec`sdy`s`secchdofldwe`dtaebse``bdpclcyaieeaecjaeghbicjewdu`idr`fax`fcpfsbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"fsfsfsfsapeeb`fd`ceeapapfsfsfsfsfsfsfsfsfsfsfsfsfsfsfscvfsfsapfsfsfsfsapapap`cdidi`cbfcodkgccmdbdbexexapfsfsapapapapeeeeexdidocpc`gigibwdegibhfqb`ci`cfsdbdiapfjdnfc``dndyaqaq`s`s`sec`w`w`w`wdy`sdy`sdy`s`s`s`wdndidodifldodoflcacjbgelbifs`cbicjcjca`cdvcoaq`dgca`elgb`saqaqdyec`wecdydy`sdy`s`wdnencpf`e`dtbgdteh`ufldzcy`faocjcjdte`cjcd`hercygadbdicpcmcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"eeb``cb`eeapapfsfscveebqbqeeeecvfsfsfsfsfscvfsfscvapfsapapapfsfsfseeapfsapapcpffdvcochfadudufsffdoffexb`fsfsapfsapeeapeecifldbeadkgigeapauggbhdh`ccpeedhcpfleefjcifc``dn`w`s`s`secdydyececdy`s`sdy`s`s`s`secdnflctdodbdododododoeecfcfcacfapeqelcjcjcjbgbtcbexdgfbgcgcdg`sdy`sdydy`w`wec`sdy`sdydyfkawdobcdxdxe`bme``bcq`f`bcycicfcjbgdtdtdqgfeweo`q`fdicpcfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"ddddddfsddfsfsfsfsfsddfscveeeeeebqbqcvfsfsfsfsfsapfsapfsfsfsfsfsfsfsfsfsfs`cdbcbfh``ardcdcdndvfs`cdocp`capfsfseeeeapapeecbdbfffsbhddgigegf`cbhbh`ccpbtd`cpfleeacbzfcfcfc`ndy`s`wbzec`sdy`s`sdy`s`s`s`s`wdnfhctctdoflffcieqexeqcbcbcbeqex`c`ceqeebtddaecjcjcacbbueagbcdaddydy`s`sdyecececdy`sdy`sbzbzfkdvdoapdxcke`dterepclfwagbcaxbncjbse`dabyboag`rcldoclcmcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"ddfsfsddfsfsfsfscvfsfsapfsfsfsapbqee`cb`bqeebqfsapfscvapfsapapfsfsfsfsfsfsexdbfffhfudcbbaaatdnfb`dcidiciapapapeeeeapeeb`cidbffddbhdkgegibfgibobhexcbfsfjcbdib``deqfcfc``bzdy`sec`wdy`s`s`sdy`sdydyfkdnflenenfldveqbwecea`sam`samameaeaeabffqacfjfsexb`elcfapbudifheaadaq`sdy`sdy`sdydydy`sdy`s`sbzbzdychendicvdxbkbkdx`bdpexghezdz`cbgcjdteh`v`pafeucqflaxaccjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"ddfsfsddcvfsfsfsfsapbqeecvfsfscvfsapapeeb`fdb`bqapfsfsfsfsfsfsfsapfsfsfsfsexcbffdnfgfy`kaa`kfuejap`dffdoeqeeeeapeeapapb`ciflfffsbhddgigigegibhbfcoffapbtcbdbexaccodndv``dnecdy`s`s`sdy`sdy`sdy`sdybzdndnenenfffkecec`w`w`wfk`wdyaqaqamamdgad`d`acubfcocpcp`cd`fjfkcidy`sdy`sdy`s`sdy`sdydy`sdy`saqdgamfk``dodbddckfwdfeheycqaybife`fb`aeaedxbhepaifdcifdcvfjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"ddfsddfsfsfscvfscvbqb`fsfsfsapapfsfscvfsfseeeefdb`bqapapfsfsfsfsfsfsfsfsapexdidveafn`kbb`k`karfabwbtapdidocieeapeeapeeb`eqffdbapbhgegigigigegegfcbdbb`d`ciffexd`eqbzfc``fcfk`sdy`s`s`sdy`sdy`s`sdyececdndbdnfk`w`wecececdyecdydydy`sdydydydy`sdgaqaqecfcbzgbgcelgbeadnbwdy`s`sdy`sdy`sdy`s`s`s`sdgadadambzfpfhffaoeofwbkfegacbbnbm`idpapcje`eyfrdpdpcpbqd`d`bgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bqapfsfsfsfsfsfsfsapapcvfsapfsfsapapapapapapapeeeeeeapfsapapfsapfsfsfsfsapexdoflfffpbbeken`kei`tdcde`ccpdodieqeeeeapeeb`ciffdi`cdhgigigegigedkeabudbb`dheqdbeq`dbwbzcofp``dnec`s`sdy`sdy`s`sdy`s`s`secfk`wececdydy`s`sdy`sdy`s`sdydy`s`sdy`sdy`sdydy`sdy`samadadgbdg`cfcbzdydy`sdy`sfkdndydyaqadgbgbgbdgecdn``fhcp`cfjbkfo`jatapaeefcy`facbg`bdr`zcqdocbfjd`bicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"exfdbqb`b`bqapapapbqeeeeapapapbqbqapeecvfsddddfsbqb`eeapapfsapapfsapfsfseecidiffffflfpaaenbbccccdcdceqfldodofleqb`fseeexdbenflapfjgigigegigidkbfciff`cfseqcpeqcwb`dnfkfc``fcbz`wdy`sdy`sdy`sdy`sdydydydydy`s`sdy`sdydy`sdy`sdy`sdy`s`sdy`sdy`s`s`s`sdy`s`sdydy`s`saqecdnfpbzdydy`s`secbz`sdyaqgbgbfqadam`sfkfcfpdidbfje`ageugacpcacjckey`eerdteugaaicpcb`cdhaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cmdhdhfsfdexexfdfd`cfdeeb`b`bqb`bqapeeeecmbgaecaapbqb`b`apapeeeeapfsfseeb`exexfldbdvfhctctbbcccccccc`gggflendidbcbb`exdbdiffffdhaogegigigedddkgicodbexbt`ceq`cdhbfdnggbzfp````dnfkdy`s`sdy`s`sdy`s`sdy`sdy`sdy`s`s`s`sdy`sdy`sdy`s`s`s`s`s`s`saq`s`s`s`sdy`s`sdy`sdyecbzfcfcecdy`sdy`s`sdy`sdydgeadveaam`sdydn``fpdicierckfobedpdebibgck`u`eftdxbebecv`ccbbtaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aebscfbnelayeeapapapayelf`apcvapapapcvapaoaeaeckeeeeeeb`b`eeapfsfsapfsapeefseecicibccqaact`k`meiccccccfaeacpdiffdbdbdodo`c`cdbbtcwddgegigedkdkgicidbeqfseeexb`eefqci`wfkfcdv````dnfkdydy`sdy`s`sdy`sdy`sdy`s`sdy`sdydy`sdy`s`s`s`s`sdy`wfkbzbzbzbzfkecdy`s`sdy`sdy`sdydyfkbz`ndy`s`sdyaq`s`saqdgadamdgam`sdyfk``fpfhdocpfedxfwbeclfscjbsehcyaxacdfaffe`ccpbtcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaecfelcjelapapfsapaocjbgayeeapeeapapbqaybscjcmapapapee`capfsapapfsapeeapapfsb`ciexdbdvataa`kbbccccccccbofqeqcpeqendocbexffdoeeacddgeddgedkbhc`coffcpeeapeqb`b`gbbzbwecfkfcdien``bzfk`wecdy`s`s`sdy`s`sdy`sdy`sdy`s`s`s`s`s`secbzdnfcflfpendodofpfcdnbzfkdy`sdy`s`saq`sdyec`wec`sdyaqamamamadgbcacugbam`sdy`wdn``dodoenexckfoeuaidpcfcjbmagdzaxfw`ibedbdbfsbgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cjaebscfbgbgfseefsapfjaeaeacapcvapapapapapcacjcaapapfsapapapfsfsapapapapapapapapexcpdvfhdv`kenaaaneiccccdcdubteqfldoflfldbdienb`dadkgigedkdadkczbudbcpexb`cbb`exfjecdnggecbzflfpfcawdndnbzbzfc`n`s`sdy`s`s`s`s`sdy`sdy`saqecbzfcdnflenenfhfh``dnbzbzfkfk`nec`s`sdy`saq`sdydydydy`sdyaqaqamadcugcgcbngbdg`sdy`wbzfcendododifdfofe`jdpfdbgaeckeuga`fdr`fdidiffcacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aecjaeelbnaefjbqapeefjbgaeghfseeeeapapapbqd`aecaapapapeeapapapapapapapapapapapapeecbdidofl``aaaaaabbccccccdceaeacpdodiflffdbdoexfjdkddgebhdagec`buflcpexb`cbb`exapeabzfkec`wdndv``dnfcfcfc``dofc`nfkecdyfkec`sdy`s`sdy`s`sdndvdnbzdnfcdvfh``fcfcbz`n`w`sdydydy`s`sdy`s`s`sdydy`sdy`saqaqdg`dgcaea`elgbdg`s`s`wfkdnenendodbdbaxfweufrcpdwaebmfecydrcpdidododoapcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaedtcfbge`apbqapddelbsdtfsbqeeapapbqapaybgcaapapeeeeapapapfsapapapapapapapapapb`dbdodicq``aaaa`k`mei`manahgebfcbdoflcbffeneqbhbhgedkdabhgigiexdbcp`cfscpb`eqb`fqfkbwececfkfcfpbzbzawawfcfc``fcawdnbzfcbzfk`wecdydy`secbz`w`wfkfkfk`w`nfcbufcdnfk`wecdy`s`s`saqaqamaqaqaqamaqdgadgbgbcadgbtgccdgbadam`sdy`wfkdndoctdoeqcbctaxfwbegacicmaee`fwbe`fcqdidodocpelcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aebgaebgghbnbgaob`apbqaobsbsddbqcveebqapeeapbnelapb`b`apapapapeeapapapapapapapapapb`dbdbffdifhfpfpaaaaek`m`m`mar`gdgcbdocpciflexbhaygibhdadkgeapbcffcb`cfsff`cci`c`deabz`wec`wfkdnbzfkbzdnbzbzchdndnawawdnbzbzbzfk`w`w`wecec`w`w`w`wececec`ndnfkdnbz`w`wecdy`saqdgdgdgdgbfamaqamadcwcubngcb`exgbgbadam`s`sdy`wfkcpenctdi`ccidifl`rafcy`ecybscjbkfxdrcqdoctdodieecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgaebgaeele`bgghbqbqapfscfaecmapeeapeecveeapcfbgee`ceeeeeeeeapapapeeapapeeapeeapeeexdidocpcldofldvfpaa`kbbbdeiccardcfaeqdiflcpexfjdkdkdqbhgegigiggcpcpcbfscpcbdbcoacgbecbwdydy`wfkbzfk`wfkbwbwecameafkfkfkfk`w`w`w`w`wfk`w`wfkfk`w`wfk`wfk`wfkfk`w`wfk`w`wdy`saqdgdgdgam`sdyeaaqdgbwbfcdcdfqdgdg`s`s`sdy`sdyfkfkffdiendib`bcdbdodbdzafejcbcmcje`dfcycqdododidbcpcfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgaebgbgbmelbsbgayb`eebqacbsbmfseeapeeeeapbqddcmb`b`apeeeeapeeeeapapapapapeeeeapapexdocbbuclflcqalal``at`k`kbbeicceidcgedefldiciacbhdadadkgidkapc`eqdbffdhcifldicpdhcdaqececdydyececfkfkdyamaqeaeadg`sbf`saqamam`secececdyececdyecec`w`wecececececec`wfk`w`wececdyecdyeaec`w`weceafkbfamamamam`s`sdy`s`s`secfkecfldbctdbeeexdbffcldbaibecbb`bmdxfecy`fdbdbfleecpeecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaebgaebgcfbsaeca`rbqbqfse`bsayeeeecveebqeeeeapb`bqbqeeeeeeeeeeeeeeeeapeeeeapeeapeqflfjcydidoflcpej`uaw`k`kaaekan`mei`gfgawawcicwcwdabhgigegigeapcodbcpbtexdidodo`cd``dgbdg`saqaqaqdy`wecdydy`saqamaq`s`seaambf`s`s`s`s`s`s`s`s`sdydydydydydy`s`sececfk`wfkfkfk`w`w`w`wecfkfk`wfk`wfkfk`wecdyaqamaqam`sdydyaq`cflcbencpfjexcpeqb`cidbdrbccpaydffw`rai`fcpffb`cpcpcacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaebgaeaedtcfaebgfjb`bqbqfjbmd`bqeeeebqbqbqbqb`fdeefdeeeeeeeeapeeeeeeeeeeeeeeeeapcpcpe`ezcqdi`eb`gabzal`z``en`kbbek`m`meibdbbfcbhfjdkdkgegigigegicodbcpddfsffflfldbcpexbfcfelcucucdgbamdyec`samaqam`s`saq`s`saq`sdydy`s`s`s`sdy`s`s`s`s`s`s`sdy`sdyececececececececdydydyececececececececdydyaqdgdgdgamdggbadcpcpexenexca`ccieecffsciffej`ffdfweu`fdbfldoffcbdidi`ccjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaebgaebscadtcje`b`bqeeapghcmapeeeebqb`bqeefdb`b`b`eebqeeeeeeeeeeeeeeeeeeb`eeb`dbexefcr`fffb`gi`fenflfkbaan`k`kekekbb`m`mbbcqapbhdkgigigegigidkbcdbff`ceedbfl`cb`fffffleqfqelca`del`acacucagbgbcwaddgdgdgdgam`sdy`sdy`sdy`sdy`sdydy`s`sdydydydydy`sdyaqamamamdgamamamaq`s`sdy`s`sdy`s`sdy`sdgadadam`wfkexcbdoex`cdiapcm`cexapbgghbq`ecbdpcpfwcvflctdodocpcidbdiffcmcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaedtelbgbgfjfdeebqaoacbqbqeeeebqb`fdb`b`b`bqbqbqbqeeeeeeeeeeeeeeeeb``cexfffsasaf`ecibqb`clfldodbaubafuekaa`k`m`mbbbbekb`bhgigigegigegibh`cdbdbcidhdbdocpeq`capfjeecbcp`cbtfqbtbffjcfbibigcbnelcdgbfbgbaqdydy`sdydy`sdy`s`saqaqaqaqamaqamaqamamadadadadadadadadadamaq`s`saqamamdgamaqecbwbuffffcbffctdoex`ccbfjfjap`capbia`fbeeexcbflaxdd`fcpdoclcbcpcbdidbexbncjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaeaebnelbgcab`bqeeapayeebqbqbqbqb``cb`fdb`bqb`bqbqbqeeeeeeapeeeeeeee`ccicbehajcyex`c`c`cfdflclcldofhffchfuekaa`kbbbbdvggdkgigegigigeddbhggcpdbcpbt`ceqciflflcpap`dd`apexcpcpcbexapbtapb`eeapbfbffj`d`daccwcwadaddgdgdgdgadadadadaddgadadadadadadadaddgbfdgdgbfbfaq`w`w`weabwbzcbdvdbffcpeqcbeqb`cbendoffcbex`dbtacexeafzgcgcfbb`bcexclcicpcpfldbffffcidbdbfffjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaeaeaee`cfdtddb`b`bqaybqbqeebqee`rex`c`cb`b`bqbqb`eeb`eeeeeeeeeeeeeeb`cbexghevbccpexcib`cpctcqdpdpflctdofnfnfpaaaafpcqbcddgegigegidkgeddczcbffflcidhcacafseeexcpcpeqexexcidbdbcpcbcbffcpcicieqeqexggb`bwex`ceq`cee`ceaea`c`cb`eceaeaeaecggbwcodnbubufffcdvcpfcdbdbdbcpcbcbcbexeefsbtbtfsapeqcicbcpdiflfldi`cd`fjcfeqfsgcczbha`gidbb`eedbdicpeedbdbeqexffffcp`cbncjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aecjaeaeaeaeaeaeaecfbngheefdb`bqfsfdbqeeeeb``c`cfdb`bqb`b`eebqeeeeeeb`eeeeeeeeeecpex`odfcicpexcieqdodododbeycygadienenfhdodofhfhcogiddgegidkgigigebfcidbfldieqdhd`fsfsfseefsfjeeexexcbcpffdbffffcieqffdbdbffffcbex`ceeb`b`b`eqcicbcbci`c`ceqbucpcpex`c`ceeeebfbfbtbfbfapeaeab`eeapbtbtfsfseeb`exeqeqffdbdbcpcbcpdbfl`cddaccmcbbffzgieabgftciexaycidocpddcidiexcbcpdbcicbacaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaeaeaeaebscfghdhb`fd`cfd`ceebqbqee`c`c`cb`eebqbqeeeeee`ccbflcpb`eeb``ccpapckcrffciexexfldododiai`odlesdzcqdicldidicldidib`dkgegigegidkdkapffdifldoflcpeq`cee`c`cb`eefsapfsdhd`bt`cb`b``cexeqexb`excicpcbffffcpdbffdbffci`capapapb`cicbexapfjd`d`fjdhfsbtap`cexeqcpdbcpcpcicpeq`cb`b`b`fsbtbtapb`eeb``cexcbeeapdheeffaoa`bigcbga`elgib`b`didbfs`cfldbdbcpflcicp`ccfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaeaeaeaeaeaebmcffsb`b``cfdbqbqee`cfd`cb`b`bqeeb`eeee`cflffex`ccicicpdbflcvdlemffexcpcpdidicl`pezaefidlfwfldbcpfhdicbdbdbc`dkdkgidkgigidkboexbccpdiflflfldbcpflffcieq`ceeeeb`apapapfjbnbgcaacdheeapfseeeeeeapdhfjbtapee`cexexeq`cexcicicieqexcicbcpcpciexeeb`eeapapapdhfjfjd`cfaecfd`btd``dd`btddbtdhdhapb`dddd`cciciewa`a`a`cjcja`gcdhapffcp`ddhcidbffb`dbcbeqcbfjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaeaeaeaeaeaeaebnfjeeb``cexb`b`b`fdeeeeb``ceebqb`ee`cfl`ccabicafs`ccbdbdbfw`ocyffcidbdidbdodzdjajaeajdldmflflfldiflcpdbffbtbhgigegigegigidaapfbeedb`c`ccicpcpdbdododododbcpcpcieqexb`btee`cb``c`ceefsfsbtbtfjcmcmd``dd`accfcaelaebicfcfcabncfd`dhfjcmcmcmacfjdhfjd``d`dacac`dcfacdhfjdhfjd`btddfjfjfjfjapfsbtb`eqcieebia`a`aecjcja`a`gcdhffapaebnbtciflb`exdbexcpeebgcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgaeaebgaeaeaeaeaeaeaeaeaeckb`b`b`ex`c`cb`b`eeb`eeb`b`b`ee`ccpeeelbicacaelbicfeeggckab`cffdbdododiflav`lakdsdldlfeflclflcqclciffcbcwdagigidkgigigedkdafbczdi`cgigibtdhbtb`eqeqcpffffdbdbdidoendododododidiflflcpcpcieqexcicpeqeqex`ceefjacfjbtdhbtfjfjbt`dcfcmd`btfjfjaccacad`d``dcfelacdh`dcmd`fjddddfjfjfjdhbtfsee`cffcpb`cmdsa`a`cjcjcad`fza`aocbelcjbgca`cexffcifleqcpdbfjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aebgaeaeaeaeaeaeaeaebgaeaebsfjb`b`exax`ceeeeeeeebqb`b`b`b`cifs`d`dcdgcdsa`cjel`cdhdldm`edbdbdoffdocl`j`lakfiakdldjcldpga`fciexcicpaocwgigeddgegigegidadab`fhdegigidkcwcmft`dcwdhfsbtdhd`fjbtfsapexcicpfffldododododbcbcbfffldidbfffffldbffffffffffdbffcpeqcbffcpffcpeq`cee`c`ceeapddfsb`b`dhfseeb`eeee`cexee`cexcpdbfldidbd`aea`a`a`cja`apapdsa`bhcibibgbibiacbtdbdbffcpcbdbexbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaebgaebgaebgaebgbgaebsapfdexex`cb`eeb`b`b`b`b`b`cicpcmdhfjfza`a`a`a`ftexerajfwcbcbcpcpcidibvavesajfiakdley`f`ffdaici`ceqfffsacdkdkbhddgeddgebhboc`dbgggebhgieqc`bhdadadafjaoftcfcdcdbnaeaebicf`dfjfjfjbtapb`exeqcbcbcbexb`apfsfsfsfsb`exb`eqcpcbffeqffdbffdododbcpdiflffffdbcpcpexexcicpcpcpcpffcpcpcpeq`ceqd`dhb`gcaedsa`a`aefzbhcua`a`fseqbgaebibgbid``cexffflfleqcbcfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaebgaeaebsbsaebsbgbgbgaeacex`c`c`cb`eeb`eeeeeeb`eecicpd`fsfqbnfza`dsdscw`cftdlcycpexcpexcbdidzcnesdlefakab`qfdbebe`eex`c`ccbdbeqc`ddbhbodkdkdkcwdaeaflggbhbhcodoeqgiggc`boggc`dacwda`hcubibgbnftacftcfgcdsa`bibibielcf`dd`fseeeeb`exexexcbcicicpeqeq`cexcpdbflflffciffexaoca`dfj`dcfeleldhd`cacaelelelbnbgbidhgccuapelaea`a`a`a`a`dsa`a`a`eeexaecjaeaeaecffs`dcpdodoexcibtcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaeaebgbsbsbsbsaebgbscfb`fd`cexb`b`b`eeb`b`b`eeexcpdhbtbtcdgcdsa`dsfqggefevbccbb`ci`cffcqavetbpfidlakeuaifweuaxax`c`c`cexflflcpeqeafjbhcwcwftfbgiffggbobcfhdogaapffffggflcodkdagiggeacucdgbczb`cwfteldsa`a`cjaecjcjaea`aea`bibielcdd`dh`cex`ccbcpflfldidicpdbdibcfqb`apbiaebnbicjcjcfeecdaeaefzaeaeaea`a`bfftdagggca`a`dsa`a`a`a`a`a`bg`c`cbgcjcjcjcjbgbtcffsdidocbciexaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aebgaebgaebgaeaebsbgbgaebsdtelcab`b``cex`ceeb`b`b`eeb`ee`ccpb`fjbt`dcda`fzelc`gifiabex`c`ceq`cflbuavesakfiakevbedz`bbyci`e`cb``c`cexdbdodbdbcp`cfjghcddaggdbdeczflendodvapfcfldodifldegicbbubqaccuggfhbudafbcdedfza`dsa`aea`a`a`a`a`a`a`a`a`cwbtcdbheeexdbdbflexcicpexexeqeacddscdaccmelcadhddedgccdfqdkfza`a`a`dsfqdafjgg`aa`a`a`a`a`dsa`a`aeaeeqexcacjcjcjaeaeacacbiexdodicpcpcfcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaebgaebgaebgaeaebgbsghcacmbqb`b`b`ex`cb`b`b`b`eeeeb`b`eqcibtapbt`dcdcafbggdafidwcibtapexcidbdrcnesakajbpes`feyfe`u`fex`c`c`c`c`c`ccbfldididoff`cb`cpdbflcbcbdvcicbdvggbucocidvdvbucobuc`au`cgfcpclffdk`hcacdgca`a`a`a`dsa`a`dsa`a`a`a`a`a``hgicufsdedeeqggciexciap`dggbuggftcw`afzdaczbhdsa`dqbfc`fta`a`a`a`dsaybhdkggdsa`a`a`a`a`a`a`a`cdfjdbcbcacjcjcjcjaeelbtaed`flenffffd`aecjcjcjcjcjaecjaeaeaecjaeaecjaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgaeaebgaebgbgaebsaeaebmbncab`fdb`b`b``cex`c`cb`b`b`eeb``ccbdiex`cb`bffqd`btex`haj`bcidhfs`ccidb`pcnesdldlesetdpaffxdecpex`c`c`c`c`c`c`c`ceqfldoctctctctcpdvdbeqgi`hacapczclc`dkbudibucpbubcendbcidodvflc`cwcwfteddsdsdsa`a`a`a`dsa`a`a`a`a`aeaecwbfewcucaeaciciexfseqc`c`b`dacua`a`dscdgca`a`a`gccda`a`a`a`a`a`dsgebfc`b`a`a`a`a`a`a`aefzcwbteqdocicacjcjcjcjcjbicmbibiexdoffffb`aecjcjaeaeaecjaeaeaeaeaeaeaeaeaecjaeaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aebsbgbgbgaebgaebgaebgbmbgacb``cb`b`b``cexexb`b`eeb`eqffflfldbcp`cb`apbtfjeabcefaj`i`cdhfsexff`zav`lbpfiakesdrga`bcv`fci`c`c`c`c`cex`c`cexcpdidienffcbclfhdidifleqggfjfbbh`cgiaobqdec`ggdvdbbwgibuffcodbcibhdkdacucdcdcdgcfzdsa`a`a`dsa`a`a`a`a`ds`hfbeddab`coggggbfdadegieda`a`a`a`a`a`a`a`a`a`a`a`a`a`a`dsa`a`dsfsc`ggbfaea`a`cdcdaefteedhdhdbdicpd`biaecjcjcjaebgbgbgdhdiffff`cbgcjcjaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgbsbsbgbmdtbsbgaeaebgbmbgcab`b``cb`b``cex`c`c`ccidbcbb`apb`b`cpcieefsfjdhexeaajez`eeebtapexdbaucnesesfibpbydpdrdm`iffci`c`c`c`c`cexexexdbctctdicbbccobucpclffdictdoflcpcobceabhaobhfjbhdkdabielc`gibhbccbfjdkdafbftcucucdgca`a`dsa`dsdsa`a`a`a`dsedcubfapcu`agibhc`accwgia`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`aefzggb`eqcufzdscd`cfqgeffdvapcbdifffffjelaecjcjaecjcjaebncf`ccbffexbicjaeaeaeaebgbgbgbgbgbgaeaebgaebgaeaeaeaecjaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgbsbgbsbsbsbsaebsbgaebnbgbsddfdb`b`b``cexcicpdbffb`btapapeeee`ccp`cbfbtbtcibfefafclbtdhb`eqffavavesdldles`qcqeufwexcp`c`c`c`c`c`c`cexcpendodidodbcpcpcbcoeqau`effdodoctdodifldvbueqggczbhcmcaacfjdacwcwfjcm`hfbehfbftewgcgca`aea`a`a`a`a`aecja`a`cd`hcuewaea`gcbfcwbhewbhfja`a`gcfza`a`a`a`a`a`a`a`a`a`dsedcdcdfqbucbcoayfqcw`cfhdvdoenfhcpcidbcicbbfcfbgcjcjcjaeaeaebibnaccicbexcfcjaeaeaeaebgaebgbgbgbgbgbgaebgaebgaeaeaeaeaeaeaecjaeaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgbgbsbsbgbgbgaeaeaeaebgbgaebneeb``cexciffdbexeeb`b`eqciapb``cb`cicbeefsb`cpcwevdeclapfsexcpcbavcnesdlakesdp`fdjcycpeq`c`c`c`c`c`c`ccbdodocbcpcpdbdodbauczgfbfc`bcffdvclffdbcp`e`ecobudbflclcbaude`cc`apgigidddkdkdkbhdacwftcucdelbncdgcgcbia`bidsgccwcaa`a`a`a`ftcmcadkcuapbhgcewelgcgcgcgcededcdftcwbteab`eab`cbflbuggeqcpflendodidbdbffeqaufleqcbddcdaecjaecjaeaeaeaeelcmexexciaccjcjaeaeaebgaebsaebsaeaeaebgaeaeaebgaeaeaeaeaeaeaecjaeaeaeaeaecjaecjaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcj",
"bsbsbgbgbgbgaebsaeaecjaebgbgaecm`c`cciflfl`cacbt`cflcpfsdhfsee`cb`cicifsbweqeweh`fdb`cb`exffep`qesakbsescncqbe`idecpci`c`cex`cex`ccididbb`cidifheqggcbflffcoeadkggdbdidvffdvffcbeqexgg`cfffhffcpfffhdiffcpbuffffffffbuci`ecoeqeqeqbwex`cggeefsbtfqcwacft`acdewewcacfewbhczgigidabofjbhbodkapgggg`capgiddgib``cb`cbdicoffdoenctdiffcpcpffaudecbdbcocbd`bgcjcjcjaeaeaeaeaebneleeexcpfjcjaeaeaeaeaebgbgaebsaebgbgaeaebgaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaecjcjcjcjcjcjcjcj",
"bgbsbsbgbgaebsaeaeaeaecjbgbicjbn`cexcbdieqfjfjfscbflb`fjd`cwdhd`acfs`ccidbexewabcldbeqexeqdbdzcnesdlbses`q`zfx`rcbciex`cex`c`c`cexdbdieefjgeggcbdbffco`ecbdvcleqggdeeqbudiflfldbffcpff`eb`ggcico`ceqbucicide`cggggeq`cc`apgiapgigigibfddgibtdkbhbhfjfjbhdkdkdkdkbhbhbhbtggbcggdeggbcde`cbcggapczb`c`ggco`edeggcodibucibuflctdibucbcocoggc`embwexeqcbftcjcjaecjcjaeaeaebgaebifsdbdbdhcjcjaeaeaebgaebgaeaeaeaeaeaebgaebgaebgaebgaeaeaeaebgaeaebgaeaebgaebgaebgaeaeaeaeaeaeaeaecjcjcjcjcjcjcj",
"aebgaebgaebsaeaeaeaecjcjbgbgaebib``ccpflfsdhfs`cdiexfjcacdcwftgcfzftbtexdidee`fefldiciexciclavavesdsfiesdpdrafaicbciex`c`c`cex`ccpeneqdabhgiddbhc``effdvci`cexcidbbubcc``ccpcoexcocldvflffcbcbclflcbcbdbdveqb`dkfjfjaygidkdkdkbhbhdkddaydkbtdkayaybhdhbhbhbhbhbhfjbhbhbhdkc`c`apgibfgibfczggb`c`apggdeexggb`dvdv`cggcoclendicbggggbcb`dafqc`c`b`ffcpcacjcjaecjaeaecjaebiaeaecmffflapcjcjcjaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaebsaebgbgbgbgaebgbgaebgbgbgbgbgbgbgbgbgbgbgaeaeaeaeaeaecjcjcjcjcj",
"bgbgaebgaeaeaeaeaeaecjaeaebiaeaefjexcpcpdhfs`cdbcpfjcdgccdftcddsdsfz`deedb`cef`bfhdocpexcpcoavcnakbsdlavdpeucycpcieq`cexexexexcidodbfjfbbhdkbocwewelcafscicpeq`c`cbccbcbexdeb`apapc`ggbc`cdecoffdbfldiflcldvdbbucocococicocbcocicbcicbcoeqdededebc`cbcbc`cbc`cggb`b`c`b`gggg`ccobuexggbcbw`cbccobufldvbcbcffeqcwewcwdedidicoc`dkggggayfbdac`c`ggflcbcfcjcjcjaecjaeaeaeaeaecjelcpdieecjcjaecjaecjaeaecjaeaeaecjaeaeaeaebgaebgbgbgbgbgbgbsbgbsbgbsbgbsbsbsbsbgbsbgbsbgbgaeaeaeaecjaecjcjcjcj",
"aeaeaeaeaeaeaeaeaeaeaecjaebgbgcjbib`db`cdheecbflbtcdbidsgcgcgcfza`dsedfjdbb``ocrdidodbciffep`qesaka`evdraifwcicpcb`c`cexexcicbdictcpd`ewcuewedgcdsa`cjcjbnd`eecbcbcobwbceqbu`cgibobhbhfqdkgigic`bccpfhdoendidbdoctctctctctctendodvffflflflfldiffffffbucieqdeeqeqdedecoeqcocbdiendicbcbcpffbucpdvffciggczggdagca`fzdaclcpdec`dabhdec`cwcwgegidkggcpcoelcjaecjaecjaeaeaeaecjcjbicidoeqbscjcjcjaecjcjcjaecjcjaecjaeaeaeaeaeaebgbgbgbsbgbgbsbgbsbsbsbsbsbsbsbsbsbsbsbsbsbsbsbgaeaeaecjcjcjcjcj",
"bgaeaeaeaeaeaeaeaecjcjcjcjaebncjaebtdbbtd`exdbeecdgcgcfzfza`a`fzgcdsfzcacbb`dleudidodbcpcbepcnesdlbsesclax`iflclexexexeqeqcbdieneqdh`cggftfzfza`a`a`a`a`cjcjbgeld``ccpbucococbeqgggiftcdew`hdadk`cbufhdodododidbcqfldodododoflflflflfhflfldbdbcpcbbubucbcbcocicbbuffbudvflfldodidbffdvdiffcbcbcodeggcwewgca`aefzdabudvczapbhfbdkggc`daaogfbfdkggcicicdcjcjcjaeaeaecjaecjcjcjae`cdocpelcjcjcjcjcjaecjcjcjcjcjcjaecjaeaeaebgaebsbgbsbsbsbgbsbsbsbsbsbsbsbsbsbsbsbsbmbsbsbsbgbgaeaecjcjcjcjcj",
"aeaeaeaeaeaeaeaecjcjcjcjcjaeaecjcj`dcpd`accpcbcabncdgcgcfza`a`a`gcgcfzftcpcz`obyclfldbdb`e`qcnesbgdxavclcy`fdici`c`cexeqeqcpdocpacelaoc``cgicaftcua`a`a`a`aeaecjcjfzftgieqcbcpcbbudec`cafza`a`gccaftdabh`ccldodoflflflcqfldidididbffffclcbexdeexbwauexcbcbcbdvbuffdvdododocpcocbbuffflffexggczeagfgiftdsa`a`a`dacpflbccwbo`heddkgiapcwdadkbhgieqcb`cbncjcjaecjaeaecjaecjcjcjcjeedicpelcjcjcjcjcjcjcjcjcjbib`dtcjcjcjaeaeaebgbgbgbgbgbgbsaebsaebsbgbsbgbsbsbmbsbmbsbmbsbsbsaeaeaeaeaecjcjcj",
"bgaeaeaeaeaeaecjcjcjcjcjcjaeaeaeaecaexacapdbbtcdcdelgcgca`dsa`dsfzgcelftcpb`akey`fdbdbflauavcnakbsdm`faiaxdicpexex`cexexcicpdbapcffqaygiapb`deb`gibhcdfza`a`a`a`a`a`a`dsfzacb`cbcpcpbub`aceda`a`aea`a`a`gcewdkciflfhdifhdvdbcqbubuclffcodeexeqggdddqftca`hacdqcwgiclenflb`bobhdkb`dvclcobcapgiddbh`hgca`a`fzbhbudb`cdkcucwew`aapgic`cwfjdkbobfcbcoapelcjcjcjaeaecjaecjcjcjcjcjdhdbfldhaecjcjcjcjcjcjcjcjaebcdoflgge`aecjbgaebgaebgbgaebgbgbsaebsbgbsbsbsbsbsbsbsbsbsbsbsbgbsaeaecjcjcjcjcj",
"aeaeaeaeaeaeaeaeaecjaecjcjcjaeaecj`d`cd`ciex`d`dcafzfzdsa`a`a`a`gccdcubtdb`cakafdbdbdoffep`q`l`odtafdpaxdbdbexexexexexeqexdbcpd`ddcp`ebfdkdkgiczcocobcgiewfza`a`a`a`a`a`a`a`gcelfjbccpfldbbwacaecjaea`a`a`a`aea`cmb`dvcqfldiff`cggdebceqbucbeqdeaueqapfjcucdedbhcldv`cda`hcwdqbhaucb`eggbocuewedfzdsa`a`a`gifldi`cfbcaewdaewfbgggic``hbodadkggffexdhbncjcjaeaeaecjcjcjcjcjcjcjacdbdici`capcmbncjcjcjcjcjcjcjcjacexctflfsaeaeaeaeaebgaebgaebgbgbsaebsaebsbgbsbsbmbsbsbsbsaebgaeaeaeaecjcjcj",
"bgaeaeaecjcjcjcjcjcjcjcjcjcjcjaeaed`b`fsffbf`d`d`adsdsa`a`a`a`a`dscdfjapdbb``oafdpdbctcbejcnese`ezdzclclflciexex`ceqeqexexdbcpdheedoendvgggidkgegiggcocicobfftgcdsa`a`a`a`a`dsa`a`bgcwb`cbfldiggaceda`a`a`aeaecjcjaecdapcoclflclauggc`gigiczcobubueqcocoeqc`da`cdvgicuedcd`abhauapdabocucdedfza`a`a`a`fzgidbdibccdel`afbdkewdagggfeafbfbcwgiaucbgiaobncjcjaecjcjcjcjcjcjbicafj`cfldodiffffdiflfjcjcjcjcjcjcjcjcjcjaefjcictcbaobgcjaeaeaeaebgbgaebsbgbsbsbsbsbsbsbsbsbsbgbsaebgaecjcjcjcjcj",
"aeaeaeaeaeaeaecjcjcjcjcjcjcjcjaeaedheeeeeqaccw`dgcdsdsdsa`a`a`dscdfqbteadbbq`oetcpcpflgg`jetakeffwdrdbflciexexexexexexeqexflcpfjb`flclfhflcoczc`gigic`ap`cexbcc`fbeddsfzbidsdsdsa`a`cjcjbnfscbfldieqfqedbga`cjcjcja`a`a`edbhggcocbbucobcggc`gigiczggaucoggggggffcpggddcddscwdeddfzgcededgca`a`a`a`a`cdbfffdib`bia``acddafjewgebfb`dkftcwboc`auexfsaybicjcjaecjcjaecadheeexffdodidodoflexb`cidbcpbtbgcjcjcjcjcjcjcjcjcjcjcmdodbct`faoaeaeaeaebsaebsaebgaebgbgbgbsbsbsbsbsbgbgaeaeaecjcjcjcj",
"bgaeaeaecjaecjaecjcjcjcjcjcjcjcjaebtapb`ee`dd``delgcfzgcelcdcd`dbfapeacbdob``oafcpcpciembydjeveh`icqdicpexexex`cexexexeqcifldbfjb`dv`eggcofhfh`egegieaemfqapcz`cbcapdacdfzfzfzdsa`a`a`aecjcjelfqbcflfleqfselaeaegcfzfza`aecja`ftgiggcoffdvbuaubceagidkgic`ggggbuclczbhcddkeqbha`a`gcfzdsa`a`a`a`a`ftapb`dv`cbicja`gccudafbcuc`dkggfbewbhdkbc`c`cdhdhbicjaecjcjbib`flcpcpfldbdiflffffflb``dcmaodhbcexcacjcjcjcjcjcjcjcjaeghcpcjbgfsdbctcieraeaeaebgbgbsbgbsbgbsbgbsbsbsbgaeaeaeaecjcjcjcjcj",
"aeaeaeaeaecjaeaecjcjcjcjcjcjcjcjaebtfsb`fs`d`d`dcfgcelcu`d`d`dcwbtexfldodobcdw`q`eex`eembybpeherdzdodbciexexexexexexexexcidbdbgiapflbugfdkb`clffgigeapgidkddgibfczeqeqead`cdfzfzfzdsa`a`aea`a`cjbicafscpdicbfscacucdeda`cjcja`aea`gcftgicoflffcoaucococzgigedkb`dvczdkdecbbha`a`a`a`a`a`a`a`a`a`cuapapciexbicja`fzedcudaewfbapdkc`edcugigibwc`ead`btaeaeaecjcjapcpb`eqffdbci`ccbdbdbdi`celbnbnaebidh`cdhaecjcjcjcjcjcjcjcfcbcjaecjcjbgdddbct`eaoaeaeaebgbsbgbsbsbsbgbsbgbsaeaeaeaecjcjcjcj",
"bgaeaeaecjaecjaecjcjcjcjcjcjcjcjbifsapb`apac`dcagbapggexcicbcbbucbfffldbdb`c`idz`feqeqeydjes`ofjcbcbfsexciexexexeqexexexeqdbfl`caydveneqgidkdebugegiauggddgigigigiapap`c`cbfaocugcgcdsa`a`a`a`a`a`cja`cdbtciflff`cfj`aaecja`a`a`a`aecja`edcwc`audeaubcbcbceagegicbcoc`czdqa`a`a`a`a`dsa`a`a`a`cwgigideeqelcja`a`bigcewcwew`hdkgidkfzftdkc`degiapcmfjaeaecjcjcfcb`ceqdbexaoacfqdbendodocpeeb`fjbicjcjeleebtaecjcjcjcjcjcjcacpcjcjaeaeaecjaebsfsclctciaoaeaeaebsbsbsbsbsbgbgaeaeaecjaecjcjcj",
"aeaeaeaecjaecjcjcjcjcjcjcjcjcjcjbieedhb`apfj`dcfelcdca`dggcoapap`cffdidoflbq`iaidbffcobydjbpehaycpeecfapcpcbcieqexeqexexcidbdo`ccwbccidvbuggeqcogicbdiggczfcggdkdkbfgic`b`exeqbwczfbbia`a`a`a`a`a`fza`a`a`gcdab`buff`cacelbidsa`a`a`cja`a`a`gcew`hgiczggdeczczc`codvgiftgcdsa`a`dsa`a`a`a`a`cwdkdd`ccpaccjcja`a`dsfz`aew`adkdkb`cwfzfjgebcggbhbtcafjbicjcjcjaydbffcpap`da`a`gcd`excpdidifleeelcjcjcjcjbifsddbicjcjcjcjcjcfcpcjcjcjcjaecjcjaecaexctctctctaxghbgbgbmbsbsbsbsbsbgaeaeaecjcjcj",
"aeaeaecjaecjcjcjcjcjcjcjcjcjcjcjbifsfjeebtfsfjelbgaea`cdcwbngccdcdcubtcpenci`ugadicpejbydjeyfe`ccbaccjcmb`cicbeqexexeqexcidbdi`cacbtdkapdedvflcoaudoflggcodo`uapc`ddgic`c`b``ccicbcoc`ftbgaea`a`a`a`a`fzgcfzdsa`bnbteqffffeqeaftgcbgbigcdsa`aea`a`dsfzedcdfbcwbhgic``h`afza`a`a`a`a`dsa`dsaoddcwc`cbgia`cja`a`a`a`fzewcdcugigidecugcgigibwc`daddacacaecjcjcjelffdbbtbtd`gca`a`cjaebi`ddhd`bicjcjaea`aecjcdcpeecjcjcjcjcjcfcpcjcjcjaeaecf`cdoctctctctctctctctdie`bsbsbsbsaebsaeaeaecjaecjcj",
"aeaecjaecjcjcjcjcjaeaecjcjcjcjcjbieefjb`dhbteacfbia`fza`aea`elfzeddsa`fjcpdidpcldoff`udjescycidb`cbgcjaecafsexciciexexeqciffdicofjfjdkdkgic`aubuflfhffggfldocbdvcpgigigegigiapcz`ccbeqeqb`cweda`aea`dsa`dsa`fza`aea`fzfbczfffhdiff`cfq`hftcda`aeaeaea`a`a`a`dsfzfza`dsdsa`dsa`a`a`a`a`a`cwbhfbgicoczgca`a`aea`a`a`fzewewcwgic`deedewgic`dedkgidhfjcfcjcjcjcjcjb`ffeefjfscwbna`aecjcjcjaeaeaecja`a`a`aeaeeedi`caecjcjcjcjcfcbcjbgaccienctctctctctctctctctctctctcabsbsbsbsbsbgaeaecjaecjaecj",
"aeaeaecjaecjcjaeaecjcjcjcjcjcjcjbiapbtcbapbt`capcfbnbia`cjfzfzfz`adsa`dsfsdiflcqdoclcy`ldfbkbucbfsaecjcjbicmfj`ccpcieqeqciffdodi`cdkdkgegidkgibucldebucoclfhenencieqc`dkgibhdkbtdkbtgiee`ccp`cbtftfzaea`aea`a`a`a`a`a`a`a`gcdk`ccpffcpexb`btcfcjaecja`a`a`a`a`a`a`a`a`a`a`a`a`dsa`a`a`cacwcabfeqexcda`a`a`a`a`a`a`gccucddadac`b`gcdkgfggczboggfjfsbncjcjcjcjcjd`cbexeeapfsbtfqfqela`bgaeaea`a`a`gcfqcubfflcpfjaecjcjcjcjcmdicpctctctctctctctctctctctctenexcmbgaebmbsbsbsbgaebgaeaeaecjaecj",
"aeaeaeaeaecjcjcjcjcjcjcjcjcjcjcjbiapbfcpcpbtb`exee`delbibifzdsgcedfza`gcddflcqcldicbbydjabf`exexcacjcjcjbgelcaddexexcbcbciffdidodococ`dkgegiczcoapgicobubcexdbflcocbggcocoaygigibhbhfj`dftfscpdodv`cfqcda`aedsa`a`a`a`a`a`a`aecjelbt`c`cb`eecwaecjcjcja`a`dsa`a`a`a`a`a`a`dsa`a`a`a`ewftgcfjbcexfta`a`a`a`a`a`dsa``acd`adadac`bocdeafsejddbfexacfjbgcjcjcjcjcjbi`cexcpdbcicpdbcpfjgcgcgcfza`a`a`cwexcpdbdib`cjcjcjaefjcpctctctctctctctctctctctctdoexcaaebgaebsbsbsbsbsbgbgbsaeaeaeaecjaeae",
"bgaeaeaecjaecjcjaecjaecjcjcjcjcjbifsfjbffleqbtap`ceed`caelbia`gcgcgcgccabffldbdpdicieyes`oayb``cbncjcjcjcjcjaebnd`fsffffcbdbdifldbdoflcoapgegibh`hgicbclapdkdecpco`ecbcb`cgieqexbhaocwacca`deqendobudeeq`ccwdscjcja`a`a`a`a`a`a`cjcja`cfbfeeb`eedhcfcjcjcja`a`a`aea`a`dsa`a`a`dsa`elcagcaobfdhelaea`a`a`a`a`a`a`bicdfzewdabhczcu`hb`c`ggcw`cexcacacjcjcjcjcjcjcjfsfldidoctctfl`cfq`d`d`d`dgcfzcad`fqcpfl`cfsbgd`cictctctctctctctctctctctctcteqcmaeaeaebgbgbsbsbsbgbgbgaeaeaeaeaeaeaeaecjae",
"bgaeaeaeaecjaecjcjcjcjcjcjcjcjcjbgapfsfj`cflffexb`eebtfqfj`dgcfzedgc`d`d`cdocqfldoai`vevftapeeb`bgcjcjcjcjcjcjcjbgacciffcpdbdiflcbbudvfldvauapdkdagiczczdkgieqclcococbdedededoeqfjapapftcacweqendodbexb`bwciexbtbncjcja`a`dsa`a`a`a`a`cjcjbicfd`dhbfb`apcwgcaecjcjcjaea`a`a`a`aea`cfbgcmfjcaaecja`a`a`dsa`a`dsa`ds`aa`ftcwbhgicdgec`c`c`giexddcfbncjcjcjcjcjel`cffdbdiflflfldiffexapbfbtd``dfjbfb`eqdbdieeeqctctctctctctctctctctctctencicmaecjcjaeaeaeaeaebgaebgbgaeaebgaeaeaeaeaecjaecjae",
"aeaeaecjaecjcjcjcjcjcjcjcjcjcjcjaefseefsee`cflendbcib`fseeeafqcucd`dadbtcpdo`fdbdo`fdm`od`fjexdhaecjcjcjcjcjcjcjcjcaeqcpciffdodocpciffgacbfldvejb`bcc`dkdkgibcbucbbuggbudododobcdabcflc`acdacbdbeqexeqcibcapggeqcbbwdhewbia`a`a`a`a`a`a`a`aeaecjcjgcfbfjc`bcb`fqcfaecjcjcjcjcjcjcfd`exexaobicjcja`a`dsa`a`a`a`a`dsdsa`ft`hbhdkcac`giggdkexb`cfbicjcjcjcjcjaccbflffcib`b``c`cexdbdicpexbwexcidbfldbcpeqeqdhctctctctctctctctctctdoexcacjcjcjcjaeaeaeaeaeaebgbgbgaebgbgaebgaeaeaeaeaeaeaeaeae",
"bgaeaeaecjaecjaecjcjcjcjcjcjcjcjaedhbffs`cbtapffctdoff`ceeapbfd`fjfsfs`cffdi`edidiafabe`aoayeecmcjcjcjcjcjcjcjaecfbtcpcbeqcpdidiffcocpflffcobudidvaubwggc`giapdecocbcifldoenenggbhcobubuc`gecodvapcwacbt`ccocideb`ee`cex`cc``dfza`a`a`a`a`a`a`a`a`a`aea`gccdcmbtb`ggdhcdbgcjcjbicf`cenexgca`a`aea`a`a`a`dsa`a`dsgca`gcft`hbfcw`hczgiapapcbfqbncjcjcjcjcjfjcpdbexapbtfjd`acfjfjapexffdidoendoctencpfsd``cd`ctctctctctctctfl`ccfcjcjcjcjcjcjcjcjcjcjaeaebgaebgaebgaebgbgaebgaeaeaeaeaecjaeae",
"bgaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjacbtbt`capd`b`cbflctflci`capbtb``c`ccbdbffbcdoclcrakcadhapeebiaeaecjcjcjbncmayb`cbffcbcicpdiflcieqciffdvdbclfldbdvdvcbcoauczczgeeqdicbcpbudi`cgicpggex`eczcbdvgfcfgc`acdbhggeqbu`cfj`dcwfs`cggdhcugca`aea`a`a`a`a`a`a`a`aeaeaebiftbteab`btftcafjdbcocua`a`a`aea`a`a`a`a`a`a`dsfza``acudab``hgieadkgieqeqcabicjcjcjbiapcpb`acd`fsdhcaelelbnbibicafjbteqffcbci`cbtfjee`cacctctctctdib`bncjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaebgaebgaeaebgaeaebgaeaeaeaeaeaeaeae",
"aeaeaeaeaeaecjcjcjcjcjcjcjcjcjcjcjcadhcaeeeebtbfee`cffflffcp`capb`apeqcpdbciaxdiclfdabaofjciapcjaecjcjbiac`cciffdbffcpcbcbcpdidbcigid`de`ebuflenffbccoflcpcoco`cbfgfb`bccoczcpgggiff`cdeauggcbdbexb``hfzdsftbhdhbfgiap`caycaelelddexbcbhcugca`aea`a`a`a`a`a`a`a`a`a`a`a`bicadd`cdbfffjdsa`a`a`a`aea`dsa`a`dsa`a`a`dscucaczapcwdegibteecpfsbiaecjaeacciciacelfjeefjcdbia`a`a`aeaeaebgbielcmcmd`d`elfjb`fjacctdo`ccmcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaebgbgbgbsaeaebgaeaebgaeaeaeaeaeae",
"aeaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjca`cbtbtfqbtbfapb`fsbwcicb`c`dd`btcbdidoexcidocldjevay`cexbncjcjae`d`ccpdbffffcpcpcicieqcididocpfsftcwaycocpflendbaucbdvffcbauggeac`c`apemcbgggidbcbggaubcbudvciflcodkcdftfjdkbheweleld`apfsd`cfaceaexexb`dkcua`aea`a`a`a`a`a`a`a`a`a`a`a`a`apfhdecwdsa`a`a`a`a`a`a`a`a`a`a`dsa`gcewfbggdadkggdaayco`celcjcjcjfjdocpcfeldhfsd`bia`a`aeaeaea`gcgcaecjcjaeaeaecjaebnbtcfcadielcmfsbgcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaebsbgbsacaebsbgbsbgbgbgbgaebsbgbgaebg",
"bgaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjel`cffcpexapeebtbfapdhb`fffleefjeqdidodocidbdoaxesdmdhexcacjcjbifscpdidbffffcbcieqcicicicifldoffb`aobhbhgiczcoffflfhflcpdeaucbeqdedeggczeaczapdkcofleqbucb`effcbfldbffco`cgidaftcucuelbicjbnfs`c`cgid`acfqeeex`cfqgca`aea`a`a`a`a`a`a`a`aeftcbcbdedka`a`dsa`a`a`a`dsa`a`dsa`a`a`edcdbhc`eweagiaceeexbtcjcjcjcjapdocpdhbtd`cugcaea`cmcda``afjaccuaecjcjcjcjcjcjcjcjcmacelflcmcacbaccjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaebgghflaebgbgbgbgbgaebgbgbgbgaebgae",
"aebgaebgaeaecjaecjaecjcjcjcjcjcjcjcjeld`fsexcpffeqbtcaacfqbtb`cpfldododidbcpdidobeeseveefjcjcjca`cdidiffcbcbeqeqcicicicicicidbdoflexbhdkdkdkgigfb`decobufhcbco`edvbucocoauggczgidkc`buflffczggbucoffdeapbcffffcogidafbewbgaebncffjczb`eegifjfjfjee`cco`cfqfzaeaea`dsa`dsa`fzgg`cbtcbbfdsa`a`a`a`a`a`a`a`a`a`a`a`fzewewggddftb`aoayex`ccfcjcjcjcjcmflcbfsd``dcdbnaeaefjfqbifqbwfqgcaecjcjcjcjcjcjcjcjbnfjbnexfjelb`fscjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaebgaeghflaebgbgaebgbgbgaebgaeaebgaebs",
"aeaeaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjelfjb`eqcp`cbt`delelbtdbdodocpffdbdidbfxbpcmeecacjd`cpdidbcbcicieqcicieqeqciciciciffctfleqapdkdkgegibfgegib`de`ecofldbdobub`dedveqgg`cgggic`bcczgib`dedecoflc`acgiggdecbbubcfjaeaeacdabhfjfjfjd`dhdhelcjd`cpb`ggggbtdscja`a`a`cjfjeqcacmcbbfa`a`a`a`a`a`a`dsa`bia`dsa`bicudaggcdaoeefj`c`cfjcjcjcjcjcjbneqcbfs`dd`ftgccjcjfqeecdb`b`cafza`aea`bicjcjcjcjcjaefjbicjcmelcffjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecfflaeaebgbgaebgaebgaebgbgbgbgbg",
"bgbgbgaeaeaeaecjaeaeaecjaecjcjcjcjcjcjcjcjcjbgcf`dfjb`cicpcbexexffcpcicicpfldbclfxbpaoeecacmcpdidbcbeqcieqcieqcieqcicicieqcicpctffexeedkdkdkgigegigegiapgfczbccofhcpc`c`ffbucbcoggdeczgigiapggaubcggdidobubcbhdqgiggcocbb`bfbfdkbhbhbhfjcacafbcabidh`caeaecf`ddhd`bicjcjgcb`btcjcdeq`cgca`bieddsa`a`a`a`a`a`a`a`edcdbfcwfzfsdheeeq`cbicjcjcjcjcjbncbdbapd`d`ftbicjcjfjcifqbwbtgccdftd`d`elaecjcjcjcjcjaccfflflflflflflflflflflflflflflflflflflflflflflflfldiflaeaebgaebgaebgbgbgbgbgbgbgbg",
"aeaebgaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjaebibnelcfaceedbflcbeqeqcbdidofl`fbpckfsbtcfb`dbdbcpcicicieqcicicicicieqcicicicpdododbcoddbhgigigegigigigieabfapddb`cldvcbbubucoffffeqb`czc`giggggggbhdedoendoflauc`dhcwftbtcbdveqc`ddbhdadqfjfjcwcafseqbncjcjcjaecafqacbgd`eabiaecddeb`bfgca`caftcdbia`dsa`dsa`a``acagidselfsb``ceqb`elcjcjcjcjcjelcpffeefqfjcabnbgcjacbu`cexfjftapbffjcagcbgbiaeaecjcjbneleeeeeeeeapeeapeeeeapeeapeeapeeapeeeeapeeapeebcdoctflcjaeaeaeaeaebgaebgbgbgbgbgbg",
"bgbgbibgbga`bgbgbgaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjaebgaeaeelexcbciciciffencp`c`ievckcwcmcfcidbcpcieqeqcicieqcieqcicicicicicpcpdictdodoffgidkdkddgigigiapc`gfgedkbfbcclfldiflcbcqffbuffauc`czdeczggbhbfdoctfhdbdidicpfscafbgeczeqbubueqb`gibhbhfjcwb`bu`cex`cacbgcjaebnd``ccmaea`cdbccwddc`gcedeaeagca`a`a`a`a`fzcddacwcjcaeeexcbb`acdhcjcjcjcjcjd`ci`cci`cfjaccwbncjaccpfleqeeciexcwcwfjcdbibibgaecjcjaebicjcjcacacfd`aecjcjcjcjcjcjcjcjcjcjcjcjbmeecpctctctflaeaeaeaeaeaeaeaebgbgbgbgbsbg",
"bgbgbsbgbsbgbgbgbgaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaebtcicbcicidienbtaeajevftelcafscbcpcieqcicicicicicicicicicicicicbcpdictdodiendvgggidkgigiapgigeddbfdkgigideal`edidodifhdvcbbubudedeggb`bhcwcodoctfhcbclfhfldvaugggfbhbhapeqcpcb`cc`gibhggcoacb`didbeq`daecjfs`caea`gccwdedafbfsbfftc`exfta`a`dsa`dsdsftcz`aaefjcicbb`dhaobtbncjcjcjae`cexcifffsfqbtd`bna`fjcpdoffffexbfeecieacfaeaecjcjcjcjcjcabicjelbhgcbfcfcjcjcjcjcjcjcjcjaeca`cdoctctctctctctflcjaecjaeaeaeaebgaebgbgbsbsbg",
"bmbmbgbsbgbgbgbgaeaeaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcacicbciffdodod`bsakakdteld``ccbcieqciciciciciciciciciciciciciciciffdododbdidoenbubqgigigegidkddgegigic`gfbwb`ggdvdictdoflbucbdvffbcczdddagiapcbcldeggbcdebudidoffexc`dddafjapbccocobccocoftapded`apeq`caceqfscja`a`bhcogidaftacc`eqdkgca`a`a`a`a`a`fqgia`cfdeciexcffsb`fjaccjcjcjcaexexcp`cbtbtfjelaebifqcpdodociggcpexcwbiaecjcjcjcjcjcjcjftgcaea`dsa`gid`cjcjcjcjcjaefscienctctctctctctctctctdicjcjaecjaeaeaeaeaebgbgbgbsbs",
"bsbsbsbgbsbsbgbgaeaecjaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjbnexcbcbdiflfffdfwdjdjddfjeaexeqcicicicicicicicicicicicicicicicbcicbdbdododicbcpendicoc`dabhdkdkdkgec`c`ggc`bcb`declcpfhenctendvcocoaudeeqggdadkapbfbhdabhc`decodvdodibucogggicwbhcodvbudefjggeqcdcjaobuapcpgia`a`a`gccbeqbhcdeldecoewa`a`dsa`a`a`a`dkfba`apdbcpbtcjcaex`cd`aecjaeb`cbciffeebtfqcdbicjbnbtffdodocbcbgg`dgccjcjcjcjcjcjcjcjaecugcaea`a`a`bhftaeaeelb`dbctctctctctctctctctctctctctflcjcjcjcjcjcjaeaeaeaebgbgbgbg",
"bmbmbmbmbmbmbsbgbgbgaeaeaecjcjcjcjcjcjaecjcjcjcjcjcjcjcjcjcjbicicbffencpexcb`eafc`bhdqggcbcicicicicicicicicicicicicicicbcicbcicbcidbctdodicpffdictdvggbhdada`hcwgigiczb`ggcpcobudededidiendoflcbcocpffbucob`gidkda`h`hbhgigic`bccbflfhflcpeqc`czco`e`cfq`cdicibfggeqbtffbha`a`a`edeqcbgiel`h`cbtftgca`a`a`a`a`bibhgccdbcflb`bicjcjfscieeaccjaccp`capcpeafjcfcdbngccuapdbenffeqb`fscwelaecjcjcjcjcjcjcjcjewfza`a`aeaefzd`exenctctctctctctctctctctctctctctcpfsaecjcjcjcjaecjaeaeaeaebgbgbgbg",
"bmbmdtdtbmbsbsbgbgbgaeaeaecjcjcjcjcjcjcjaeaeaecjcjcjcjcjcjcjaeeecpdoflb`b`bceaay`ha`ebbwcpcbcicicicicicicicicicicicbcicicbcicbcicifffldbdodododienendodvggdafbftcwczdecocbdvffgg`ecbcbcb`efldoendiffclcbcobucbc`dadabhgidkbhdkgeapczbucldvdbdvffdbcbggbhczffbuggggcogibucwa`a`dsftdeeedkbhbtgi`aedewa`a`a`a`a`gccwcd`cdbcbcfcjcjbn`ceqcbd`bgeecpd``cexfqcacdcdcd`dbtcbctfl`c`ccicidaa`aecjcjcjcjcjcjcja`gca`aea`cwexdoctctctctctctctctctctctctctdoeqd`aecjcjcjcjcjaecjcjcjcjcjaeaeaeaebgbg",
"dtdtbmbmbsbsbgaeaecjaecjcjaeaecjaecjaeaeaecjcjcjcjcjcjcjcjcjcjfsfldo`cddb`eeacelfzdscu`effcbcicbcicicicicicbcicbcicicicbcicicbcicbcpdbdbdoctctctctdodoctdoffggdacabhggdecbeqcbdvcocbdecocbbudidbffdiflffcqffdecbdegigedddkddgedkdkgecifldbflcqdvcbbu`cddgiaugggigib`czcpftdsa`edaccodeda`ccofjewfzfza`bia`a`aebieldddodbb`elcjcjcdex`ccpeefscbfsfjb`btcacdcdewd`bt`cdoctdiflflcbfscaa`a`aecjcjcjcjcjcja`a`apcpctctctctctctctctctctctctctctcpeebncjcjcjcjaecjcjcjaecjcjcjcjaecjaeaeaeaeaebg",
"dtdtbmbsbsbgaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjddenffd`bteqap`aa`a`fz`xcodicbcbcicicicicicicicbcicicbcicbcbcpdbfldidodbdbdbdicpcpfldododododododefjcwaoc`cobubucbbcdecbbucleqdecbeeczbufldidodvcoeqbuauc`gedkgeddgegideff`ecofldbgieeczgedkczczgedkcw`cbufta`a`fzftdebwbccbbcddftfza`a`a`a`a`cjaed`cpdocbdd`daea`biee`ceqcbcpeqelfjbtaccfcucdftap`cffendidienflbtcfcddsa`a`a`aecjcjcjcja`cfctctctctctctctctctctctctdoexd`aecjcjcjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaebg",
"bmbmbsbmbsbsbsbgaecjaecjcjcjcjcjaeaea`aecjcjcjcjcjcjcjcjcjcjcjbtct`celeecibhfzdsa`fzcualflcpcicbcicbcicbcicicicbcpffdbdidoctenfleqeeaybfb`eq`cbc`ecpdienctdoflcqfleqdkdagiczaubccoffcqcbdecbdeddbhbhgiggcbfhdiflffffdvdbcoc`apgegigic`cbdvcocbdoggapczdkgidkgigidkcw`ccogcdsa`a`ed`capggdv`cbffta`a`a`dsa`aecjbicbflcbeqeeaobia`aecdfsapdbdifsbgd`bt`dgbcaewfqb`cidofleqb`eqdbexcacfgcdsa`a`aecjcjcja`a`a`cfb`dbctctctctctctcbapbncjcjcjaecjaebgaeaeaecjcjcjcjcjcjaecjcjcjcjaecjaecjaeaeae",
"bmbmbmbmbmbsbsaeaeaeaecjaecjaecjcjaeaecjcjcjcjcjcjcjcjcjcjcjcjapdbaccm`cexfta`a`a`ds`xeqflcbcbcbcbcicicbcbcpfffldoenctctendb`cdhfjfqdkddgibfgfc`cz`eclflfldoendofhdifldegiayapeqaucbcbbubuffcp`cdeb`gedkczcb`edecz`edvflfhdodvauczczgigiembccoclcoc`c`gedkdkgigedkdab`eqgcdsa`a`daggc`czapb`ggcwfza`dsa`a`aebgeedieqfscp`cbfewaeaeaecafjeqeneebicabtfqcw`dd`fsexffdoffb`eeeefseqb`cdcdfza`a`aecja`a`a`a`a`aea`bifjapcictctdbeebncjcjcjaecjaeaeaeaecjcjcjcjaecjaecjcjcjcjcjcjcjcjcjaecjaeae",
"bsbmbsbgbgaeaeaecjcjcjcjcjcjcjaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjb`exelddexeagca`a`a`dscugaflcpcbcbcicicpcpfldidienctctdoff`cbtfjbhdddkgigigigigigigiggauggggcpdoctdbbudbdofleqggdec``ccobccbffbuggcwbhgidkgiexbcapbhdkgiggcocldiendicbbwggc`gibhcwddgfc`dkgigigedddkacb`eq`afza`fzapciapcwaocwcadacda`a`a`a`aefqflcbd`btdb`capgba`cjcjbi`deedoff`dcfbtbtacfqfseeeqffdoffeebtd`cf`db`fqbifzdsaecjcja`a`dsdsa`a`a`ftcp`ceebicmcictctdob`elaecjcjaecjcjcjcjaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjae",
"bmbsbsbsaebgaeaeaecjaecjaeaeaeaecjaecjaecjcjcjcjcjcjcjcjcjcjae`c`ccagg`cfjgca`a`a`a`gbffdicpcbcbcbcbfldodidbfldbcieqb`dhfjdkddgigegigegigigedkgigegigiddb`cpdbflctdodbffffcpdbffcoc`aodaczdede`cc`apgiddgib`bwbceqaugibhapcz`edvflendibucobcczapgibfc`dkgedkgigefjcdc`eqelfza`gccdggggfbftcucdfzeddsa`a`aecdcpfffsaodhcbeqc`bha`cjcjcjcfdhcido`c`dfsfsbtapb``cexflfffsdhfjftcdfzcabfcda`a`aecja`a`a`gcgcfza`gc`dcbdob`aecjcjcjca`cdictdibccmaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bsbsbgbgbgaeaecjaeaeaeaeaea`aecjaeaeaecjaeaecjcjcjcjcjcjcjcjcjdhffb`apapfta`a`a`a`a`fbbudicpcbcbcbdbdodododbeqfjelcfcfftdadkgegigigigigegidkddgegigidkdkgi`efhdodidbdidbflcpbccpdbcbexggfqbhdecpdegigiapbfap`cggbuenbudecbc`bhapggcbdbdododvffdvcodegggidkdkgidkfjeweeexeddsa`dsgcc`eqgi`aelewdsa`a`a`a`gceqdbapbtdhbtdecoggdddscjcjcjaecaapcbffapbtbffseeeeeeffflfjcud`ftcdewcda`cucdfza`aea`a`a`dselcdgcgccffqexcpcmcjcjcjcjcjcjcjbnapcpctctcpddbicjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgbgbgbgaeaeaebgbgaeaeaeaeaeaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjbgexflcoggcwdsdsa`a`dsbhcbffcpcbcpdbfldodbee`delaegcelcdedcd`hdabhbobhbofjcwcwdabobobhbhdkdkgi`ccpdocpcidbdbdbdbexexeqeqdbffbcbcbwapgegidkddbhb`ggeqdodofhdobuapbofjgicz`edvdofhflflfhflffcoczgidkdacab`degca`a`a`fzgidddkgiewgca`a`a`a`a`czdbeed`dhgigic``cbcc`gca`cjcjcjelcmb`cpdbexbtapggbfexdiap`dfjftcdewcdgca`a`dsgca`a`a`a`a`fzcd`dcd`dd`bfexexbgcjcjcjcjcjcjcjcjcjcjaed`eqenctfl`ccdcjcjcjcjaecjcjcjcjcjcjcjcjcjcjcj",
"bgaeaebgbgbsbgbgaeaeaeaeaeaeaeaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjbiexdbbcapdacwelftayaobtciffcpdbdididbeqbtacbiaebidsa`a`gc`acuftfb`hfbcaewcafbftfbfb`hcwbobhbhbhexdidbcpcbffcpdvcpeqcocbffdidocbgfbfdkdkdkbhczeq`ccodidodoenclapdkdkdkdkgiczbcbudvcpfhfhdbfldvcib`bhb`ci`aa`a`a`a`bfdkgcftbhcua`a`a`aefbdvded`d`bfapcwddcoeqggcdaecjcjcjaebndh`ceqcpcbffcp`cflcpcabffjcacdcdgcfzcdgca`a`a`a`a`dsbigc`dcwcaca`d`dbtbtaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcfb`flctenb`cjaecjcjcjcjcjcjcjcjcjcjcjcj",
"bgbgbsbsaebgaeaeaebgaebgaebgaebgbgbgaeaeaeaeaecjcjcjcjcjcjcjcjcjcjbneeexbwdeapfqacgcbgapcpcpfffldodbcicpffexftaea`a`a`a`fzedewfb`h`hfbcaftcwdqcwdqcwdqcwdabodkaobhggcidbdbffcbcicpffcpcbcbcbdidoflcbc`gidkdagiggczc`bccoflctencpbwc`gebh`hcwbhgiggcbdifhcbcocbbueqciffflaoa`a`a`a`dddkgcfzedcudsa`a`edggcbddfqgiap`hgcdkbu`cde`aaecjaea`a`bielb`fscifldienfldoeqcfbtfjftcdedgcelcdgcgcfza`dsa`gcft`dfj`cd`eqeqeqeqeqeqeqeqeqeqeqeqeqeqeqeqeqeqeqciexciexdictcbcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgbsbsbgbsbgbgbgbgbgbgbgbgbgbgbgbgbgbgbgbgaecjcjcjcjcjcjcjcjcjcjcjcjaebgelcfgcaecjcjaeeeffcpflfldicbeqcpdicbbfa`aeaea`a`gccdcu`hfbftcaft`h`h`h`h`h`h`h`hcwdabhdkdkbtgiapdedvdidiflfffldidbdbdbfhflflflcoc`dabhgiczgigic`ggflctdiclbudegifjdaaodkdkgi`efhclclbucocodecpflgidsa`a`dsdkdaa`a`a`a`a`a`gc`cbuapbtapb`bh`aewbtdeggbwcdcjaea`a`a`dsa``deeexdidbdidodbcpfjfjfq`dewelfzgcelcdcddsdsdsbiftfqcwbwcid`ctctctctctctctctctctctctctctctctctctctctctctctctctcicjaecjaecjaecjcjcjcjaecjcjae",
"bgbgbgaebgaebgbgbgaebgaebgbgbgbgbgbgbgbgaeaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeapffdbdidiff`cexeqflcpee`aaea`a`a`gccdcuft`xcaewftftfbfbfbfbfbcwdagidkbobhdddkgidkdkc`cbdbflflffcicpdidididoffeqcbdiffggc`gidkgidkgicbctctdoclcbbuexbfgeddgedkggbubfembccobucocbdococda`a`a`fjcwdsa`a`a`a`fzeedvexeafsbqeafbewcwbhczeqeqcdcja`a`a`a`a`a`fzbtbtcpex`dciflci`cfjbtfjcdcdcfel`acdedcdgcelcufqbteedbbwdhctctctctctctctctctctctctctctctctctctctctctctctctctcbaecjaecjaecjaecjaeaecjcjaecj",
"aeaeaebgaeaebgaebgbgaebgaebgaebgbgbgaeaeaeaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeapdbdididi`capapggcbcqbwdda`a`a`dsgc`acuftcaelewft`hdadadabhbhbhapbwau`cemdkdkgegigidkgegiapapgegic`bcffflfldiffdeeqfhdidbauczgidadkb`dvdifhcbbubucpcl`eczdkdkgfcoczdkgedkdkaob`cbfta`a`a`a`bocwa`a`a`a`bib`dbdeb`ggb`apcwcacwdabhggcbcoela`a`a`dsa`a`a`a`ewgieecpcffjdidbffapbtfjca`d`dewewcaftac`dcud`bfb`dbdodbfjctctctctctctctctctctctctctctctctctctctctctctctctctciaeaeaeaeaeaeaeaeaecjaeaecjae",
"bgaebgaebgaebgaebgbgbgbsbgaebgbsbgaebgaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjfsdifldbciapdkgeczdeflcbggfba`a`a`fzedcdedbifzedcdcu`hcwcwcwdqdadq`hbhb`ggggbfbobhdkgigigegegegedkgieaczdebufldofhcicocbffflffcogggfgic`aucibucbcbcocidbbudeapbfauc`dkgigibhbncfb`a`a`a`a`a`dacwa`a`a`fzgidvffcieqexc`daftdqfjd`dagicbeqgca`a`a`a`a`a`a`a`gcfjaceqeebi`cdiffcpeefqbt`d`d`d`d`dd`fqfqfqbteecidbexfjcactctctctctctctctctctctctctctctctctctctctctctctctctcbaebgbgbgbga`bgaeaeaecjaeaeae",
"bgbgbgbsbsbsbsbgbgbgbsbsbgbgbgbgbgaebgaebgaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjaeaeeefldbexapc`czgedkczcbflauc`gca`a`a`dsa`aeaefzgcgc`aewft`xftfbcuftcuelcddac`czggczdkdkdkgidkddgic`gigigic`c`c``ccbdiflbucbcbcpcldbffggdkbhdkc`bceq`ecbdofhcogigidec`gegigeaca`eleefza`a`a`dsfj`ha`aea`fjdvcpffffcb`cfjftacdafjdafbfjau`cgca`a`a`dsa`a`a`a`a`elacfjcpcabicicpex`cbtbt`d`dfqaccwbtapapapeeb`dbb`elcjeldibibibibibibibibibibibibibibibibibnbibnbibmbnbnbnbgaeaeaeaeaebgaeaeaeaeaeaecjae",
"bgaebsbsbsbsbsbsbsbsbsbgbgbgbgbgbgaebgbgaebgaeaeaeaeaeaeaeaecjcjcjcjcjcjcjcjcjcjcjaeae`cdicibfbhgiggggczgiczffcbdebhdsa`a`a`aecja`ftcufzedewewewewewewewcdbnewcuftcwdkgigidacwdabhgiczczc`gfc`ggbweq`ecbflendoflcpdvffcpbucpcoggdkbhfjbhggflflbuffgggiggggdkgidkcfaeel`cfza`a`a`a`bhfba`cjftcpdbcbflflcb`ccw`hfjdacwcwdafq`cczfza`a`a`a`a`a`dsa`cjgcd`cfeq`cbgcfcicibtd`fjfjfjdhapb`b``c`cb`eeeqdbd`cjcjelflcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaebgaeaebgaebgaebgbgaebgbgaeaeaeaeaeaeae",
"bgbgbgaebgbsbsbsbsbgbgbgbgbgaebgbgbgaebgaebgaebgaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcffscbffapbhgigegic`auggc`audvcogg`hdsa`a`cja`aeda`ha`gc`acdcuewewewcucdcdcaft`xftft`hdadagebceabobhbhczcbbudvdicqffdiclfldictdofldvcpbucicocicogggifjapflcqcbdbdbauggbcbhdkdaelcjel`cgca`a`a`dsdafta`el`cdoeqcidbdicb`cbhdabhcwcwaodddkggapfza`a`a`dsa`a`a`a`a`dscwcmd`cbd`cjcacpcifj`dbtapeeb`eeb`b`b``ceqflexaecjcjeldicjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaebgbgbgbgbgbgbgbgbgaebgbgbgbgaebgbgaeaebg",
"aebgaebgbsbgbgaebgaebgaebgaebsaebgaebsaebgbgbgbgaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjfjdbcpapbtdkapggc`ggggggdedeflffgggicda`a`cja`a`cubhededcdcacwcwfbftcughewfbfbdqcwdabhgiggggczdkdkbfggcoauc`bcflcoexflfldodofldododocleq`ecocbcicbdvcbggcidvdbfhdoffauggdkdkcwelcjbib`cdcja`a`cdbhftew`ccidicpciffdicbexc`fqdacwaobfgifjggapfza`a`a`a`a`a`dsa`a`a`cd`dbnexb`bncjeleqcifjbt`cexapeeexcpdbdbcbexcacjaecjbiapcjaecjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaebgbgbgbgbgaebgaebgbgaebgaebsaebgbsaebg",
"bgbgbgbsbgaebgaebgaebgbgbgbgbgbgbsbgbsaebsaeaeaebgaeaeaeaecjcjcjcjcjcjcjcjcjcjcjcjdhcpfsaobhdkgiggcobucoauaubufhffb`ggcwgcbia`a`a`a`bhcwedew`xfbcwda`hcacufbdacwdadkgiggbac`czggauauczbh`hewftc`bucocbfhflfldidbcldidbffdbcigg`cbceq`efffhdbcbeqdecodeggggbtbhaocdcjbib`cfaecj`ddeggcweeffcpfldocpcpdbdbcb`caydafjgiapbhgcapapa`a`a`dsa`a`a`a`a`a`a`cjcmelfjcicfbicjbn`cflflflflfldifldbcidhcabnaeaeaeaecjcjaecjaeaecjaecjcjcjcjcjaecjaeaeaeaeaebgbgaebgbgbgbgbgbsbgbgbgbgbgbgbgbgbgbgbgbg",
"bgbsbgbgaebgbgbgbgbgbgbgbgbgbgbgbgbsbsbsaebgaebgaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjfjcbbffjdkddgegebcflflclcpdifhbudeczbccwededbia`a`fzbhfbewftcuft`hdqftcwdadabhgiggauggggeqcodegiacewfza`a``agfffffdpflflcldodofldbcpcpcpffflcoapapggeqexcocldvclcidegg`cczddbhcfcjbgeeftcjcacicpex`ccbdbcpdiendbcicpflflggddapb`c`bhfteweagifza`a`a`a`a`dsa`dsa`cjcjelcaelcidhcjcjcjel`ccbapfseeeebtaccfbnbgcjaeaeaebgcfflaebgaeaeaeaecjaeaeaecjaeaeaeaeaeaebgbgbgbsbgbgbgbgbgbgbgbgbgbgbgbgbgbgbgbgbgbg",
"bsbsbsbsbsbsbgbsbgbgbgaeaebgaebgbgbgaeaeaeaeaeaeaeaecjaeaecjcjcjcjcjcjcjcjcjcjcjcj`deqc`bhdkdkgegicobucldvclfhclggaudkbf`ccwcdewedfzdsgcfbcdcdew`xftfbfbdadkc`bccoaubceqbcdkfbew`afza`dsgc`acwbwffffcbdvdbdbflcbcicieqexexcicifldbco`cc`b`ggbccicpfldvcpffbudeapfbaecjdh`dbgeqcpeqapcbcpdbcpcpdidicpciffdicib`ggb`apgibccoc``aa`a`a`a`bia`a`a`a`aecjcjcjaceldh`caecjcjcjcjelbiaeaecjcjaeaecjaeaeaeaebgbgcfflaebgbgaeaeaeaeaeaeaeaeaeaeaebgbgbgbgbsbsbsbsbsbsbsbgbgbgbgbgbgbgbgbgbsbgbgbgbg",
"bgbgbgbgbgaeaeaeaeaeaeaebgaebgaeaeaeaeaeaeaeaecjaeaecjaeaecjcjcjcjcjcjcjcjcjcjcjcjelexb`dkdddkgiczcocodedecbbucbczb`c``hgigggiftcuewcdgcgc`aewftfbcuftdkb`debubudeczapcw`aedgca`a`a`gccdcufbgi`ecocbcoflfhded`cmacb`ciex`c`c`cexcicpdbclexb``cggbceqeqcocpdbflcp`cd`elaoapb`dodiee`ccpcpdecbbudbenflcibceqcbeq`cb`eqffcbc`cda`a`a`dsa`a`dsa`a`aeaecjcjcjelcfbi`ccacjcjcjcjcjcjcjcjcjcjcjcjcjaeaebgbgbgbgcfflaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaebgbsbgbgbgbgaebgdscxaebsaebg",
"bgbgaebgaebgaebgaebsbgbgbgaeaeaeaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjcjaeaecjcjcjcjcjaeb`bcdkdkgegib`aubu`edegaffflggapdec`eaco`ec`bocwdqcwdqdabodadagibccobucldec`dacu`a`agca`a`a`a`gc`afbdadkggggggcbclcpbqcaaecjcjcfb`cieqex`c`c`c`cexcbdvdbciexb`apb`bcggc`b`decobucieqdidiflcpexffdbcbciffffbudiendicpffffflflflflco`hdsa`a`a`a`a`a`a`a`a`a`a`a`a`aecjaecfbgfsb`cjcjcjcjcjcjcjcjcjcjcjaeaeaeaebgbgbsbsghdo`cb``c`cgg`cgg`cb``cb``cb``cb`fd`cb``cfd`cfdb`fdfjaebgbgbgbgebcefmfmg`bgbgbgbg",
"aebgbgbgaeaebgaebgbgaeaeaeaeaeaeaeaeaecjaecjaecjaeaecjcjcjcjcjcjcjaecfbicjcjcjcjcjcjbtgggigegigiggcoclffdvffbuffczgec`ggc`ggcocbauczdkdkgigebtgfdefffldvdec`daewewew`afza`a`a`a`fz`afbdabhgieagfggcb`ccabiaecjcjcjcjbnd`eeexciciex`c`cb`exciffffcobcggfsc``cggc`apc``ccpenencpcbdbffcicbcoaucbcocididodbffcpbucbdec`aca`a`a`a`a`a`a`dsa`a`a`a`a`a`a`a`a`cjbnbibnexelcjcjcjcjcjcjcjcjcjcjcjcjaeaebgbgbsbscfctctctctctctctctctctctctctctctctctctctctctctctctctcbaebsdsfvfmfmfmfmfmfmfzbgbgbg",
"bgaebgaebgaeaeaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjaecjcjcjcjcjcjcjcjcjcjaecjcjcjcjcjcjcjacbcbfdkgic`aucobubuclffdvcogigidkapgidkemc`ggdebcgggigibcbudvbudec`gi`hcucu`agca`a`a`a`fzgccdfbdadadadaap`cexfsbiaecjcjcjcjcjcjcjaebnacap`cexeq`cb``c`c`cexcicpffciex`cb`cbeq`cc`apbcdbflflffdeggggggggbcggc`b`exbcfqcwcaedfzfza`a`a`a`aeaedsa`a`a`dsa`a`dsa`a`a`aecjaeelaeeebtcjcjcjcjcjcjcjcjcjcjaeaeaeaeaebgbgbsghctctctctctctctctctctctctctctctctctctctctctctctctctcibsbsbsgdfmfmfmfmfmfmcedsbgbg",
"bgaeaeaeaeaeaebgaeaeaeaecjaeaeaeaeaebsbsaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbgb`b`gedkc`cobubu`e`ecbclffczbhbhbobhdkfqdacwdqfqgiczc`boapeqgggigedafbcdgcdsa`a`a`fzgccdewcuehft`hbhap`c`cd`aecjcjcjcjcjcjcjcjcjcjcjbielaodd`ccbex`cb``c`c`ceqffdbdbcpcbffggeqeqbwexcifldibuc`c`czggb`gfgifjftftewfza`a`a`a`a`a`a`a`cjcjaea`a`dsa`a`a`a`a`a`a`a`a`cjcjbiae`db`bgcjcjcjcjcjcjcjcjcjcjcjaeaeaebgbgbscfctctctctctctctctctctctctctctctctctctctctctctctctctcbaebsdscxfmfmfmfmfmfmfmbgbgbg",
"aeaeaeaeaeaeaeaeaeaeaeaeaeaecjaecjaeghacgcaeaeaecjaecjcjcjcjcjaecjcjcjcjcjcjcjcjcjcjcjfqb`gegiggdedeggbwauggbcczbhfbewewcd`acd`acded`a`acdewcuc`degfdkdkcw`adsdsa`a`dsfzcdewcufb`xcafbeebcb`apelcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbicadhcbci`cb`b``c`c`cexcbdbffffdoffffciapapcbdbcob`gigiapdkdqcuedgca`a`dsdsa`a`a`a`a`a`a`aecjcjaea`a`a`a`dsa`a`dsa`a`a`cjcjcjcjcjaefsd`cjcjcjcjcjcjcjcjcjcjaeaeaebgaebsbge`ctctctctctctctctctctctctctctctctctctctctctctctctctcibgbsbsbsg`fmfmfmfmfmfmfzbsbs",
"aeaeaeaeaeaecjaeaeaeaeaecjaeaeaeaeaebibnbibmcdelbgcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjca`cgigiggb`gfggdecobcgibhcdbia`dsa`a`a`dsa`a`a`a`a`fzdkaubfdkbhcw`adsa`a`a`a`dsedewewftftftdd`c`cb`acaecjcjcjcjaecjaeaecjcjcjcjcjcjcjcjcjbieleeexb`b``cb``cb``c`cciffflendidbfhbcgg`cbcggc`gedaftcucdcdfza`a`gcedgcbia`a`a`a`a`a`a`aeaea`a`a`dsa`a`a`a`a`a`a`cjcjcjcjcjcjcj`deeaecjcjcjcjcjcjcjcjcjcjcjaeaeaeaebgcfdocacacmcacacmcacmcacmcacmcacmcacmcmcacmcacmcmcmb`cbbgbmbsds`gfmfmfmfmfmfmgdbsbg",
"aeaeaeaeaeaeaeaecjaecjaeaecjcjaecjaeaecjaeaeaeaebgaeaecjaeaecjaecjcjcjcjcjcjbgcjcjcjcjbgggc`ddgiggcocoggczggea`hcjcja`a`a`a`a`a`a`a`dsa`dscwcobcbhdafbcda`a`a`a`dsa`fzed`aewcfcw`cci`caybncjcjcjaeaecjaeaecjaecjaecjcjcjcjcjcjcjbgbi`db`b`b`b`b`b``c`c`c`ccicpdidoclflggggcoggge`hftewewcu`afza`dsedcd`aedfza`a`a`a`a`a`a`a`a`a`a`a`a`a`dsa`a`a`aecjcjcjcjcjcjcjcjbnfscfcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaecfflaebgbgbgbsbsbsbmbsbsbgbsbsbsbsbmbsbsbmbmbmbmbgaocibgbmbmbsebfmfmfmg`gdcxa`bsbg",
"cjcjcjcjcjaecjcjaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaecjaecjcjaecjcjcjelbicjcjcjcjbtczgegiggcbcoc`bocuddapfjewgcgcgcdsa`a`dsa`a`a`cdbccbgecwft`aa`dsa`dsa`a`a`dsbicdcmapclcpfselcjcjcjaeaecjaeaecjaeaeaecjcjcjcjcjcjcjcjcjaebicaeeb`eeb`b`b`b`b`b``cexeqdbdicpfldeapgibhcdgcewewcucdgca`a`edewcucd`agcdsa`a`dsa`a`a`a`a`a`dsa`dsa`a`a`a`aeaecjcjcjcjcjcjcjcjaed`d`cjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaee`flaebsaebgbsbsbsbsbsbsbsbsbsbgbsbmbsbmbsbmbsbsbmaocibgbsbsbsa`fvbrbsbgdsbsbsbgbs",
"cjaeaeaeaecjaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaeaeaeaeaeaeaeaeaeaeaeaeaeaecjcjcjaecjcjcjcjac`cbhgegiczbcbc`ha`cufsb`b`ggdk`hgca`a`a`a`a`gcapbuc`daftcdfza`a`a`a`a`dsa`aebncwexdbexd`aecjaeaeaeaeaeaeaeaeaeaecjaecjaecjcjcjcjcjcjcjcjbncfddeeeeb`b`b`b`b``cb``cexcpendvdvcogebofb`acdcuewewgca`dsedcdcuewewgca`dsfzdsa`a`dsa`dsa`a`a`a`a`a`biaecjaea`aeaecjcjcjcjcjcjcjeldhbncjcjcjcjcjcjcjcjcjcjaecjaecjaebncbaebgbgaebgbgbgbsbsbgbsbgbsbgbsbsbsbsbsbsbsbsbmcmexaebsbsbsbmbsbsasbsbmbsbmbsbs",
"aecjaecjaeaeaeaeaeaeaeaeaeaebgbgbgbsbsbsbsbsbgbgbgasbmbgaeaeaeaebgaeaeaecjaecjcjcjcjcjcjbib``cc`czdkgeeaapdaewcacdftda`hewfzdsa`dsa`a`dqbudebhaceweddsa`a`a`a`dsa`bielfscpciaybscjcjaeaeaeaeaeaeaeaeaeaeaeaeaeaecjcjcjcjcjcjcjcjcjaebnfjb`eeeeeeeeb`b`b`b`b``ccidodbcbclapcwfbewcucuewgca`dsedewcuew`agca`gc`agcgcbia`a`a`a`a`dsa`a`a`a`aecjaea`a`a`cjcjcjcjcjcjcjcjaebtd`cjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjcjaeaebgaebgbgbgbgbsbsbgbgbsbgbgbsbsbgbgbsbmbmaeaebgbsbsbsbsbsbsbsbsbsbsbmbsbm",
"aeaeaeaeaeaeaeaeaeaeaebsbsbsbsbsbsbsbsbmbmbmbsbsbsdtdtbmbgbgbgbgasbnbgaecjaecjcjcjcjcjcjcjfjdv`cdeb`gedkdqcwddfbaecja`a`a`a`a`a`a`a`fz`ccbgedaew`adsa`aeaea`a`a`gcbheqcpfsbmaecjaebgbgaebgaebgaeaeaebgaebgaeaeaeaecjcjcjcjcjcjcjcjcjbicab`apeeeeeeeeb`b`b`b`b``cdiflcbdvc`cwdqftcueweddsfzcdcuewewcdgcfzgcewcd`agcfza`dsa`a`a`a`a`dsa`a`cjaeaea`a`a`aecjcjaea`a`cjcjcjfqfscjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaebsaeaeaebmcfghcabmbgaeaebgbgaebgbsbsbsbmbmbsbsbsbgbsbsbsbsbsbsbsbsbs",
"aeaeaeaeaeaeaebsbsbmbmbsbsbsbsbsbsbmbmbmbmbsbmbmbmbsbmbsbsbsbgbgbgbgbgaeaeaecjaecjcjcjcjcjbneqflcodegggifbewcdacdaela`a`a`a`a`a`a`a`dadvczdkftela`a`a`a`a`cjaeca`ccbb`cfaecjaeaebgaeaebgbgaebgbgbgbsbgaeaeaeaecjcjcjcjcjcjcjcjcjcjaebicfeeeeapeeeeeeeeeeb`b`b`b`cpdocpdvggbofj`hew`afzgcewewcuewelgcfzedewewcuewgcfza`a`a`a`a`dsa`dsa`aecdgbfza`a`aecjcja`a`a`a`aecjaecfapacbgcjcjcjbgbgcjcjcjcjcjcjcjcjcjaecjaeaeaeaebmapclctctctctctctctclfsbsaeaebgbgbgbgbsbsbsbgbsbgbsbsbgbsbsbsbsbsbs",
"aebgbgbgbgbgbsbmbmbsbsbsbsbmbmbmdtbmbmbmbmbmbmbmbmbmbmbsbsbsbsbgbgbgbgaeaeaecjaecjcjcjcjcjcjelcifl`ededeapdacuedcdcudsa`aea`a`a`a`fzexcogiaocfa`aea`aeaeaedsfqci`ccfbgaeaeaebgaebgbgbgbgbgbgbsbsbgbgaebgaeaeaecjaeaecjcjcjcjcjcjcjcjbicaapeeapeeeeeeeeb`b`b`b`b`cidicldbcodkbhftewededewcucuewelgced`acucucuew`afzdsa`a`dsa`a`a`a`a`dsa`fzapc`cdaecjcja`a`a`a`a`cjcjcjbneeb`cmcjcjcjbibicjcjcjcjcjcjcjcjcjcjaecjaeaeexctctctctctctctctctctctctctbcbmaebgaebgbsbsbsbsbgbgbgbgbsbsbgbsbgbsbg",
"bgbgbgbgbsbsbsbsbsbmbmbmdtdtdtbmbmbmdtdtdtdtdtbmdtbmdtbmbmbsbsbsbgbgaeaeaeaeaecjcjcjcjcjcjcjcjcmbcffco`caugggi`hcdfza`a`dsa`a`a`cjfqcbapbhacgccjcjaeaefzfbb`eqaobgaebgaeaeaebgbgaebgbgaebgaebgaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjaecabteeapapeeeeeeeeeeeeb`b``cfldvclffgfbhftelcdewcuftcdgced`aewcuftcuewedfza`a`a`a`a`a`dscafzaefzaccda`daeaftcja`a`a`a`a`a`aeaebiacfscbfscjcjcjcjcjbgbgcjcjcjcjcjcjbgbiaecjeldoctctctctctctctctctctctctctctctctfsaeaebgaebgbgbgbgbgbsaebsaebgbgbsbgbs",
"bgbsbgbsbsbsbsbsbmbmdtdtbmbmbmdtdtdtbmdtbmdtbmdtbmdtbmbmbsbsbgbgbgbgaebgaeaecjaecjcjcjcjcjcjcjaecf`dciff`cb`czc`dacdgcdsa`a`a`aebnco`cbhaoewaecjfzcugeggdeapbnaebibgaeaebgbgaebgbgbgbgaeaebgaeaeaeaeaeaeaecjaeaecjcjcjcjcjcjcjcjcjcjcjbnfjb`apfseeapeeeeeeeeeeee`cffdbffffapdaftewew`xcaedaselewcuft`xcaewgcdsdsfzfzbia`dsa`a`dadk`aaeewbffbaegcbtfjcda`a`a`a`aea`gcbfapd`ex`cbgcjcjcjcjaeaeaecjcjcjcjcjbgbgcjacctctctctctctctctctctctctctctctctctctctbcaeaebgbgbgbgbgaebgbgbgbgbsbgbgbgbg",
"bgbsbsbsbsbmbmbmbmbmbmbmbmdtbmbmbsbmbmbmbmbmbmbmbmbmbmbsbsbgbgbgbgbgaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjel`cdveqgidkdacdgcfza`a`a`aefscpgibh`da`gcdaggcbciapelcjaebsaeaeaebgaeaebgbgbgbgaebgaebgbgbgbgaeaeaeaeaecjcjcjaecjcjcjcjcjcjcjaebgaeacb`eeeefsapapapapeeeeeeeecbflcpdvczda`hewcucuelgccdcu`xftewcu`afzdsgccdcdedfzdsa`a`a`fzcwbfcwfzewgiftcja`dadkcwa`a`aea`daczbtgcaed`cicfcjcjcjcjcjbncwcacjcjcjcjcjcjcfctctctctctctctctctctctctctctctctctctctctctbcaeaebgbgbgbgbgbgbgbgaebgbgbgbgbg",
"bgbsbsbsbsbmbsbsbmdtbsbmbsbmbsbmbmbmbmbmbmbmbsbmbmbsbsbsbgbgbgbgaebgaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjbgfjcpdb`ccwbidsa`dsa`cjftexeebhaobhapcifhcbdhelcjcjaeaeaeaeaebgbgbgbgaebgbgbgbgbsbsbgbgbgaebgaeaecjcjcjcjaecjcjcjcjcjcjaeaebgaeaeelapb`fsfsapfsapapapeeeeeeeqflcbffdebo`hcuewcdgcewftewftcucdedbigccdewcucuedgcdsa`a`a`a`a`cdgidacjbifbcaa`aecdcudsaegceaggfba`aea`edeqdhcjcjcjcjcjeld`elcjcjcjcjcjbgdoctctdb`cayaccacacmcacacacacacaacayeecbenctcteeaebsbgbgbgbgbgbgbgbgbgbgbgaebg",
"bgbsbsbsbmbsbsbmbmbsbsbsbmbmbmbmbsbsbsbsbsbmbsbsbsbsbsaebgbgaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjeleeffbuapcdaeaecjbn`capfjb`buffcpeecwbncjcjcjaecjaeaeaebgaeaeaebgbgbsbgbgaebgbgaeaeaeaeaecjcjcjcjaeaeaecjcjcjcjaeaeaeaeaeaeaebsfjeeeefsfsfsapapapeeapeeexdbcicpcodk`hcucdelewftcuftewewcdcdcdca`xftftcuedgca`a`a`a`a`a`edftcwcwaea`ftdafza`aefzfqaugg`aaea`a`gcgc`cb`cjcjcjcjcjaebgcjcjcjcjcjcjcbctexbgaeaecjbgaebgaebgbgdtcmdtbgbgaebgaebgayctctbmaebgbgbgbgbgbgbsbgbgbgbgbgbg",
"bgbgbgbgbsbsbmbsbmbmbmbmbsbsbsbsbsbsbsbsbsbsbsbsbgbgbgaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjeleecbb`caaecjbteqeabudbcidhelaecjcjcjaeaeaeaeaebgaebgaebgbgbsbsbsbsbsbgaeaeaeaeaecjcjaecjaeaecjcjcjcjcjaecjaeaeaeaeaeaeaeaecaeeeefsfsapfsfsfsapapee`ccpcbcbbugiftftewcdcafb`h`h`hfbewewftftftcuewcdgcdsa`a`a`a`a`ftdafza`cfcwgcdscugca`cdggbugifza`a`a`a`fzbibtcibicjcjcjcjcjcjcjcjcjcjcjbnctapcjcjaecjaebgaeaebgbgbselcmbmbgbgbgbgbgbgaebidieqaebgbgbgaebgbgbgbgbgbgbgbgbg",
"aebgaebgbsbsbgbsbsbsbsbsbsbsaebsaebsbsbgbsbsbsbgbgaebgaeaeaeaeaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjelfjeeddbfci`capfscwelcjcjcjcjaecjaecjaebgaeaeaeaebgbsbsbsbsbgaeaeaeaeaeaeaeaeaecjaeaeaeaeaecjcjcjaecjaecjaeaeaebgaeaeaedtfsb`apfsfsfsfsfsapapapb`cbcbbccpgg`hdqghftdqdadqfbftdabhehcucuewcdfzdsa`a`a`a`dsa`a`dab`fba`aeedftfza`a`fjgaeqfba`a`a`a`a`a`bifzcfeqaccjcjcjcjcjcjcjcjcjcjaeapdbcjcjaecjaeaeaeaebgbgaebgbgbgbgaebgbgbgbgbgbsaeayctaebsbgbsbgbsaebgbgbgbgbgbgbg",
"aeaebgaebgaebgaebgaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebgbgaeaeaeaecjaecjcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjbgbncfcfcfeldtbgcjaecjaeaeaeaeaeaeaebgbgbgbsdtdtbsbgaeaeaebgaeaeaeaeaeaeaeaeaeaecjaecjaeaecjcjcjaeaeaeaebgbgbgaeaeaed`eefsfsddfsfsfsfsfsapeeeqbuc`cbcocw`hcwdabh`hftftftcabhdkfbeddsds`afza`a`a`a`a`a`fzcdfbgicwftdacdedfbggffbffza`a`a`a`a`a`a`a`ewcaapfscjcjcjcjcjcjcjcjcjcjaeexdhcjcjcjcjaecjaeaeaebgbgbgaebsaebsaebgbsaebsbgbgbgctdtbgbsbgbsbsbsbsbgbgbgbgbgbg",
"aeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebsaebsaeaeaeaecjaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaebgcjcjcjcjcjbgaeaeaebnelelcacfbnbgcjaeaecjaeaeaeaebgbnbmbgbmelbsbgaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaecjaeaeaeaeaeaebgbsbsaebgbgaebnddfsfsfsbtfsfsfsfsfseebcffcobuffbhftbhdabhdadqfbcucded`hfjcda`dsddgicda`a`bia`a`cddaapftbhbudegic`ffbucwa`a`a`a`a`a`a`a`a`a`ftc`de`ccjcjcjcjcjcjcjcjbgcjcjcpelcjcjcjcjaeaeaeaebgaebgbgbgbgbgbsaebsaebsbgbgbgaedbaobsbgbgbsbgbsbgbsbsbsbsbsbg",
"cjaeaeaeaeaeaeaeaecjaecjaecjaeaeaeaeaeaebgaebgaebgaeaeaeaecjaeaecjaecjcjaecjaecjcjcjcjcjcjcjcjbgbibgcjaeaecjcjcjbicaftbnaebncacfbnbgbgbgaeaecjaeaebgbgaeaebge`bnaebgbgaebgaebgaeaeaeaeaeaeaeaeaeaeaebgaeaeaecjcja`cjaeaeaeaebgbibsbgbsbsbgaeaeaofsddddddbtddfsfsfsfs`ccicocbdicoemfqcwdadacw`hcuew`agccubhdqededdkapcweda`a`gcfbb`ggcwgiffdvdbflexfta`a`a`a`a`a`dsa`a`a`a`a`ft`ccibncjcjcjcjcjcjcjbicjcjffbncjcjcjcjcjaeaebgbgbsaeaebgaeaebgbgaebsaebgbsbgaeciaobsbsbsbsbsbsbsbsbsbsbgbsbs",
"cjcjcjcjcjcjcjcjcjaecjcjcjaecjcjaeaeaeaeaeaeaeaeaeaebgaeaeaeaecjaecjaeaecjcjcjaecjcjcjcjcjcjcjbicfbicjcjcjcjcjcjcaaoelbiaebgbgbibnelbibgcjaeaeaebgbibgaeaebgbgaebgaebgaebgaeaeaebgaeaeaeaeaeaeaebgbgbgaeaeaecjaecjaeaeaeaebgbsbsbgbsbsbgbgaeaecfapfsddddddbtfsfsfsfsb`exdeddbueneqggczgfbhfbewewftgidaewfbbhdkcwcddagidagcdsbhc`eqclcbdbdeggbucibhedfza`a`a`dsa`a`a`a`bia`a`cjbg`caccjcjcjcjcjcjcjaebibgcbcmcjcjaebibgcjcjcpghaeaebgbgaebsaeaeaebgaebgbgbgaeffcmbgbgbsbsbsbsbsbmbsbsbsbsbg",
"cjaecjcjaecjcjaecjcjcjcjcjcjcjcjcjcjaeaeaeaeaebgaebgbgbgaeaeaeaeaeaecjaecjaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjaecjaebgbiaeaeaebgbieldtbiaecjaeaeaeaebgbgaeaeaebgaeaebgbgaeaeaebgaeaeaeaeaeaeaeaeaebgbgbgaeaeaeaecjaeaeaeaeaebgbgbgbsbsbsbsaebsaeaeaefjapddfsdhddbtddbtfsee`cco`cclenggdkggcocbcobcc`giczczbhewcudadkbhcucugiggeqffdvffeqcbbugg`cdeapgicwfzdsa`a`a`a`dsa`a`cddabiaegcbtcmcjcjcjcjcjcjcjcjcacfeqcicjcjcjbibgcjaecbcabgbgbgbgbgaebsaebgaeaeaeaeaeaectelaebgaebsbsbsbsbsbsbsbgbgbs",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaebgaebgaebgbgbgaebgaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaeaeaeaeaebgbgaeaecjaeaeaecjaeaeaeaeaeaebgaebgbgaebgaebgbgaeaebgaeaeaeaeaebgbgbsaeaeaeaeaeaeaeaeaeaebgbgbgbibsbgbsbgbgbsbsaeaecjbifsfsdddddhddbtddbtee`cco`ceqdofleqggbuflfhfhfhbubudvclbwc`giggeqexcocbffdbcbaucbeqgfbcdvdbbubcczacfzdsa`a`dsa`a`a`a`gcfbfqdaacbtfjcjcjcjcjcjcjcjcjelcfeectcmcjcjcjcjaecjcpghbsaebgaeaebsaebgaeaeaeaeaeaebqctaebgbgbsbgbgbgbgbgbgbgbgbsbg",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaebgbgbgbgbgbgbgaeaebgaeaeaeaeaecjaecjaecjcjcjcjcjcjcjcjcjaeaeaeaebgbgbgaebgaeaeaeaecjaebnbiaecjaeaecjbgbgaebgaebgaebgbsaebgaeaebgaeaeaeaeaeaeaebgbgaebgaebgaeaeaeaebgaeaebgbgbsbsbgbsbsbgbsaebgaeaecjcjcmapfsddbtddbtddddapb`exb`aycbfhcbcbfffldvclbubucobucbcbcqffbucococpcbcobcggcobccoffbueqdeauczcwgca`a`a`a`a`a`dsa`gccdbicwdegicwddcjcjcjcjcjcjcjcjaeelcactctcpapfjcacacadbcabgaebsaebgaeaeaebgbgbsaeaecactcpaeaebgaeaeaeaeaeaebgaebsaebs",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaebgaebgbsbsbgbgbgbgbgbgaebsaeaeaeaeaeaecjaecjcjcjcjcjcjaeaeaeaeaebgbgbgbgbgbgaebgaeaeaeaeaeaecjaeaeaebgelbmbgaebgaebsaeaebsaebgaeaeaeaeaeaeaeaeaeaebgaeaebgaeaeaeaebgbgaebgbgbgbgbgbsbsbgbsaebsaecjaeaecjbgacfsddaydhaybtayfseeeqggdd`cdvczczbc`ecoau`ecb`fbuclcbbuflbuco`e`ebudvbubucobudbdvbuaub`c`cwfza`a`dsa`a`dsa`a`a`a`acdkcwcwbhb`apcjcjcjcjcjcjcjcjcjbibneqctctctctctctctctghaebsaebsaebgaeaeaecjaebgbqctctcaaeaeaebgaebgaeaebgaeaeaeaebg",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaebgbgbsbsbgbsbsbsbsbsbgbgaeaeaeaecjaecjaecjcjaecjaeaeaeaeaebgbgbgbgbgbgbgbsbgbgbgcjaecjcjaecjaebgaeaeaeaeaebgaebgaebsaebsaeaebgaeaeaeaeaeaeaeaebgaeaebgaeaebgaebgbgbgaeaebgbgbgbgbgbgbsbgbgaebgaeaeaeaeaecjaed`dddddhdddhbtbtapexdegg`cdbcogigeapggggczggggbccogabwdebudvffbubucpcqffdbfhcpau`caubcbh`afzdsa`a`a`a`a`a`dsa`a`cdgggg`hbheqeqbicjcjcjcjcjcjcjcjcjcjaedictctctctctctctcabgbgbgbgbgaeaeaeaeca`cdoctctdbcjaecjaeaeaeaeaebgaeaeaeaeaebg",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaebgbgbsbsbsbsbsbsbsbgbgbgaeaeaeaeaeaecjaeaeaeaeaeaebgbgbgbgbgbsbsbsbsbsbsbgaebgaeaeaecjcjaeaebiaeaeaebgbmbgbgbgbsaebsaeaebgaeaeaeaeaeaeaeaeaeaeaebgaebgaebgaeaeaeaeaebgbsbgbgaebgaebgaebgaebgbgaeaeaecjaecjbnfjddfsaydhdhdhfsbcexexcofldvgggegegeeagfgegigiczggde`eauclcqcbcbcodebccoffc`gidkgiemfbgcdsa`a`a`a`a`dsa`a`a`a``hggdec`ddfs`caccjcjcjcjcjcjcjcjcjcjcjbidoctctctctctctcaaebsaebsaebsaeaecictctctctctcfcjcjaecjcjcjaeaeaeaecjaeaeaeae",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaebgaebsbsbsbsbsbmbsbsbsbsbgbgaeaeaeaeaeaeaeaeaeaeaebgbgbgbgbgbsbsbsbsbmbsbsbsbgbgaeaeaecjcjaeaecjaeaeaeaeaebmghbmbgbgbgbgbgaebgaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaeaeaebgaeaebgbgbgaebgbgbgbgaeaeaeaeaeaeaeaeaeaecjaecjcfayfsfsdhdhdhdh`ccobccpfleqcogfgidkgiczbfgegiapgigiczeqco`ccobu`udabhbucogigigibfcw`agca`dsa`dsa`a`a`a`a`a`a`cddaacapgicfdhbncjcjcjcjcjcjcjcjcjcjcjcjbgcpctctctctctcaaeaebgaeaeaeaecjapeqeqeqeqbqcjcjcjcjaecjaecjcjcjcjaecjcjaecj",
"cjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaecjaeaebgbgbgbsbsbsbsbsbsbsbgbgbgaeaeaeaeaeaeaeaebgbgbgbsbsbmbsbmbsbmbmbmbmbsbsbsbgaeaeaecjaeaecjaeaeaecjbge`bnbsbmbmbgbgbgbgaebgaebgaeaeaeaeaeaeaeaeaebgaebgaeaeaebgaeaeaeaeaebgaebgbgbgaeaebgbgaeaeaeaeaeaeaecjaeaeaeaecfdhfsfsddfjdheacbdecodiczgg`cdkgigigic`gigeeaczfagic`bcggczggczbhggbugic`deggczbhewgcdsa`a`a`a`bia`dsa`bia`a`dsgcacdhbtdhaecjcjcjcjcjcjcjcjcjcjcjbibnbgcaexdictctghaebgaebsaeaeaeaecjcjcjcjcjcjcjcjcjaecjaecjcjcjcjcjcjcjaecjae",
"cjcjcjcjcjcjcjcjcjcjcjaecjaecjaeaeaeaeaebgaebsbsbsbsbsbsbsbgbgaeaeaebgaeaeaeaebgbsbsbsbsbsbmbmbmbmdtbmbsbsbsbsbsbgaeaeaecjaecjaecjaeaeelbsbgcad`bmbgbgbgbgbgaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaeaeaebgaeaebgaebgbgbgaebgaeaeaeaeaeaeaeaecjaeaeaeaeaecjaecmayfsdddhfjfseqeq`cfhdegibwczdkgegigfeagegiapeaczgigegggggidagibuggcwczcoaubcc`ewfza`a`a`a`a`a`a`a`gccweda`a`cffjcffsfjcjcjcjcjcjcjcjcjcjcjcjcjaebibicjcjcjcjaeaeaeaebgaeaebgaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjcjae",
"cjcjcjcjcjcjcjcjcjaecjaecjaecjaeaeaeaeaeaebgbgbgbsbsbsbsbgbgaeaebgaeaeaebgaebgbgbsbsbsbmbmbmbmdtbmbmbmbmbsbsbsbgaeaeaecjaecjcjaecjaebsghghbgbmbmbsbgbgbgbgbgaebsaeaeaeaeaeaeaecjaeaeaeaeaebgaebgaeaebgaeaee`e`aeaebgbgbgaeaebgaeaeaeaeaeaeaeaeaeaeaeaeaeaecjaeeldhddfsaydh`ccb`cdvffbfemdec`dkgegigigfgegegigiczc`gec`czdafjauapdaggapbhc`apgca`a`a`a`dsa`dsa`a`fzdkdaa`aebicmfjcaddcacjcjcjcjcjcjcjcjcjelcteqcmcjcjcjcjaeaeaeaebgaebgaeaeaeaecjaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cjcjcjcjcjaeaeaecjaeaecjaeaeaecjaeaeaebgaeaeaebgaebgaeaeaeaeaeaeaeaeaeaeaebgbgbsbsbsbmbmdtbmdtbmbmdtbmbmbsbsaebgaecjaecjcjaecjaeaeaebgbsbmbsbsbgbsbgbgaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaeaebgaebgaeaebge`ddghaebgbgaeaebgbgaebgaeaeaeaecjaeaeaeaeaeaeaeaeaecjcjelfjbtddddeecpeqcbcqc`dkczggbfgigegibfapgegigiembfc`gidkbhggczboggdkewfbgecwfza`a`a`a`a`a`a`a`a`a`cdfba`cjcjaodhcffsbicjcjcjcjaecjcjaecjcjbiapffctcicmaecjcjaeaeaebgaebgaeaeaeaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cjcjcjaeaecjcjaeaeaecjaeaecjaeaecjaeaeaeaebgaeaeaeaeaeaebgaeaeaeaeaeaeaebgbgbsbsbsbmbmbmbmbmdtbmbmbsbsbsbgbgaeaecjaecjcjcjcjcjaeaebgbgbgbsbsbsbsbsaebgbgbgaeaeaeaeaeaeaeaecjaeaeaeaeaeaebgbgbgaeaebgaebgele`bgaebgbgbsbme`ercme`bsaecjaeaeaeaeaebgaeaeaeaecjcjcjcjcffjbtayapco`e`cflcogidkgggggiddgegigegigigegigigic`bocuapb`bfc`dk`hgidkgcdsa`a`a`bia`a`a`a`a`a`a`a`a`cjelfs`dfjfjcjcjcjaeaecjaecjcjaecjcjcjcjaefsffctciacbgcjaeaebgaeaeaeaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaeaeaecjaeaeaecjaeaeaeaeaecjaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaebsbgbsbsbmbmbmbmdtbmbmbmbsbsbsaebgaeaeaeaecjcjcjcjaecjaeaebgbgbsbsbsbsbgbgbgbgaeaeaeaeaeaecjaeaeaeaeaeaebgbgaebsbgaebgbgaebgaebgaeaebgbgbgbgbsbncmacf`bnbsaebgaebselbgaeaebgaeaecjaecjcjcjcjelfjayfs`ccbggffcoggdkgeczczgegigegigegigegigegigebhdqcuboaugicwb`bcftfzdsa`aeaea`a`a`a`bia`a`dsa`cjaebtd`accaelcjaeaecjaecjaeaecjaecjcjcjcjcjcjcjbseqctctexe`aeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaeaeaeaeaeaecjaeaecjcjaecjcjcjaecjcjaeaeaeaeaeaecjaecjaeaeaeaebgbgbgbsbmbsbmbmbmbmbsbsbsbsbgbsaeaeaeaeaecjcjcjcjcjcjaeaebgaebgbgbgbsbsbgbsaeaeaeaeaeaeaeaeaecjaeaeaebgaeaebgbsaebgbgbgaebgbgaeaebgaebgaeaeaeaebgaeaeaeaeaeaebsbsaeaeaeaebgdtbsaeaecjcjcjcjcjcjbifjddb`codecibcggc`dkgib`faddgeddgigegigegigigedacwdqbhdadecoaudkdqgca`a`cjaedsa`a`a`a`a`a`a`cjcjfjacacacaebgaecjcjaeaeaeaeaeaecjaecjcjcjcjcjcjcjayexcfexdofl`ce`aeaeaeaeaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaebgaeaebgaeaeaeaecjaecjaecjaecjcjcjaecjcjcjaecjaecjaeaeaeaeaebgbgbgbgbgbsbsbsbsbsbsbsbsbgaebgaeaeaecjcjcjcjcjcjcjcjaecjaeaebgbgbgbsbgbgbgaeaeaeaeaeaecjcjaeaeaeaeaeaeaebsaebsbgbsbgbgbgaebgaeaebgaebgaebgaebgaebgaeaeaeaeaeaeaeaeaebgdtbsaebibgaecjcjcjcjcjcjcjcjelfjeeexeqdeauc`ggapdkgieagfbfgegeddgegigegidkdaftfbftdqcicbgiftcuewgccjcjfzfzdsa`a`a`dsdsaecjfqapfjfjaecjaecjaeaeaeaeaeaeaeaeaecjaecjcjcjcjcjcjayexcjcjaecf`cdoflbqbncjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aebgbgbgbgaebgaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjaecjaecjaeaecjaeaeaeaebgaebgbgbsbsbsbsbsbsbgbgbgaeaeaeaecjaecjaecjcjcjcjcjcjcjaeaeaeaeaebgbgbgaebgaeaeaecjaecjaeaecjaeaeaeaeaebgaebsbgbgbgbgbgbgbgaeaebgaeaebgaeaeaeaebgaeaebgaeaeaeaeaeaeaeeld`cfaeaeaeaeaeaecjcjcjcjcjcjcjbid`b`exeqcigeczgggegebfemgigeddgegidkgibhdaft`xcuftcwdkftcdcugcfzfzaebicddsa`a`dsdsa`aeaeddb`dhfsbncjcjaeaeaeaeaeaebgaeaeaeaeaecjaecjcjcjcjcjdhexcjcjaecjaeaecaeqdodib`cfcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgaebgaebgaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaeaeaeaeaebgbgbgbgbgbsaebgaeaeaeaeaecjaecjcjcjcjcjcjcjcjaecjcjaecjaebgbgaeaebgaeaeaeaecjcjaecjaeaeaeaeaeaebsbsbgbsaebsbgbsbgbgbgbgaeaeaebgaeaeaeaebgaeaeaeaeaeaeaebgbgaeaeaebsbnbsaeaeaeaecjcjcjcjcjcjcjcjcjcjbgfjggcocbgidkczc`gigegibfgigegidkaydkbhda`hftcu`a`agcgcfzfzbia`bibi`aedfzfzbiaea`aegbb`apapfjbicjcjaecjaeaeaebgbgaebgaeaeaeaeaecjaecjcjcjcjdhexcjaecjaeaecjaecjaebcctctdib`bncjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgbgaebgbgaeaeaecjaecjcjcjcjaecjcjcjcjcjcjaecjaecjaecjaecjaeaeaeaeaeaeaeaebgaebgaeaeaeaeaeaecjcjcjcjcjcjaecjaecjaecjcjcjcjaecjaeaeaeaeaeaeaeaeaeaecjcjaecjaecjaecjaeaebgaebgbgbgbsbgbgaebsaebgbgbgaeaebgaeaebgaeaebscke`bsdte`elbsbgbsbsaeaeaeaeaeaeaeaeaeaeaecjaecjcjcjcjcjcjaed``ccbeqggapczgidkdkgidkgedddkbhdkbhbhcwfbghftfbercwftfbcacacfcdgcgcfzaecjaecfb`eqaydheeelcjcjaecjaeaeaebgaebgaebgbgaeaeaeaeaecjaecjcjcjfjexcjcjcjcjcjaecfexctctctctctctctflfscjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"bgaebgaeaeaeaeaeaecjcjcjaecjcjcjcjcjcjaecjcjaecjaecjaeaeaecjaeaeaeaeaeaeaeaeaeaeaeaeaecjcjcjcjcjcjcjcjcjcjaecjaecjcjcjaecjcjcjaecjaeaeaeaeaecjcjcjcjcjcjcjaecjaeaeaeaebsbsbgbgbgbgbsbsbgbgbgaeaeaeaebgaeaeaeaeaeaee`fjcmdtcaghelbncfcabnaeaeaebgaebgaeaeaeaecjaecjcjcjcjcjcjcjcjaecwexcpeqcpco`cfjcw`haogibhbhaydkaydkbhbhbhbhaydkfjdaaccaewcfelgca`aeaeacexcieeacdheebncjcjaecjaeaeaeaeaebgaebsbgaebgaebgaeaeaecjaecjcjdhexcjcjcjcabcdoctctctctctctctctctctctelcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aebgaeaeaeaeaecjcjcjcjcjcjcjcjcjcjaecjcjaeaecjaecjaecjaecjaeaecjaecjaeaeaeaeaeaeaeaecjcjcjcjcjcjcjcjcjcjcjaecjcjcjaecjcjcjaecjcjaecjaecjaecjaecjaecjcjaecjcjaecjaebsaebgbgbgbgbgbgbgaebgbgbgbgaeaeaeaeaeaeaeaeaeaebmelbsbgbsbsbgbsbmbsbgaeaebgbgbgaebgaeaeaeaeaeaecjaecjcjcjcjcjcjaefjeqeqcpdbdveqaycmfbaofjbhbhbhfjbhbhaybhddbhbhfj`hghcdelelelelcfbtexcbcidhaceedhbscjaeaecjaeaeaeaeaebgaebgaebsbgbgaebgaeaeaeaeaecjcjdhcid`eqctctctctctctctctctctctctcteqd`cjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaeaeaeaecjcjaecjcjaecjcjaecjaeaecjaecjaecjaecjaeaeaeaeaecjaecjaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjaecjcjaecjaecjaecjcjcjaecjcjcjaecjcjcjcjcjcjcjcjcjcjaecjaeaeaebsbgbgbgbgbsbgbgbgbsaebgaeaebgaeaeaeaeaeaeaebgaebgaebgaebgaeaeaeaeaeaebgbgaeaebgbgaeaeaeaeaeaeaeaeaecjcjcjcjcjcjcjbnbtbqexeqflflciapaygiaydaacdwayaybhaybhfjaoeracacac`hfjbqcbciciapcmcmfs`cd`bgaeaeaeaeaeaeaeaeaebgbgbgbsaebgbgbgbgaeaebgaecjcjaed`ffctctctctctctctctctctctctenexcmcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aeaecjaecjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaeaeaeaecjaecjaecjcjaecjcjcjaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaebgaebgbgbgaebgaebgbgaebgaeaeaeaeaeaeaeaeaeaeaebgaebgaebgaeaebgaeaeaeaeaeaebgaebgbgaeaeaeaeaebicdbiaecjcjcjcjcjcjcjcjcjbgcaapb`excidbffcbeq`ceqci`ebc`cc`ddbhayddfsapfs`cciexdhaofjfsb`fsdtaeaeaeaeaeaeaeaeaeaebgaeaeaeaebsbgbgbgbsbgaeaebgbhcbctctctctctctctctctctctctdoexcacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"aecjaecjcjcjcjcjcjcjcjaecjaeaeaeaeaeaecjaeaecjaecjaeaecjaecjcjcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaebgbgaebgaebgaebgbgaeaebgaeaeaeaeaeaeaeaeaeaeaebgbgbgaebgaeaebgaeaeaeaeaeaebgaebgaeaebgaeaebgaeaedtelaeaeaecjaecjcjcjcjcjcjcjcjcjelcmd`dheeb`cicicidbdbclcb`eexexapayaycacaacacfjapeefje`aeaebgaebgaeaeaeaeaeaeaeaebsbgbgbsbgbgbgbgbgaecm`ectctctctctctctctctctctctct`ccacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcj",
"cjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaeaeaeaeaeaeaeaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaeaebgaebgaeaebgaebgaeaeaeaeaeaeaecjaeaeaeaebgaeaeaebgaebgaeaeaeaeaeaeaeaeaebgaebgbgaeaeaeaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaebnelcaacaofsfsfseeap`cbq`cbqfsdheraccfbmcjaebgaebgbgbgaeaeaeaeaeaeaeaeaebsaeaebgbgbgbgbsaoctctctctctctctctctctctdoexcmcjcjcjcjcjcjcjcjcjcjcjcjaeaecjaeaecjaecjcjcjcjcjcjcj",
"cjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaeaeaeaeaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaebgaeaeaeaebgaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaebgaeaeaeaeaeaeaeaeaeaeaeaebgaebgaeaeaeaeaebgaebgaebgaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaebgbibneldtbnbibsbsbgbsbgaebgbgbgbgbgbgaebgaeaeaeaeaebgaebsaebgbgbgaebgaoctctctctctctctctdo`ccacjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjaecjaeaecjcjcjcjcjcjcjcj",
"cjcjcjcjcjcjcjcjcjcjcjaecjaecjaeaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaecjaeaeaeaeaeaeaebgaebgaebgaeaeaebgaebgaebgbgaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaebgaeaebgaeaeaeaeaeaeaeaeaeaebgbgaebgbgbgaoctctctctctdob`elcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaecjcjaecjaecjcjcjcjcj",
"cjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaecjaecjaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaeaeaeaeaeaeaeaeaeaeaeaeaeaecjaeaeaeaeaebgaeaeaeaeaecjaeaecjaeaeaeaeaeaebgaeaebgaeaeaeaebgaebgbgbgbgaebgaecjaecjcjcjcjcjcjcjcjcjaeaeaecjcjaecjaecjaecjaeaeaecjaecjaecjaeaecjaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaebgaeaeaeaoctctflb`bncjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjaecjcjcjcjcjcj",
"cjcjcjcjcjcjcjcjcjcjcjcjaeaecjaeaeaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjcjaecjcjaecjaecjaecjaecjaeaeaeaeaeaeaeaeaeaeaeaecjaecjcjaecjaeaeaeaebgaebgaeaeaeaeaeaebgaebgbgbgbsaeaeaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaecjcjcjcjcjcjcjcjcjcjcjaecjaecjaeaebgaeaebgaeaeaeaecjaecjaeaeaebgaeaeaeaeaeaeaed`dbbncjaecjaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjaeaeaecjaecjcjaecjcjcj",
"cjcjcjcjcjcjcjcjcjcjcjaecjaeaecjaecjcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaeaecjaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjcjaecjcjcjaecjaeaeaecjaeaeaeaebgaeaeaecjcjcjcjcjaecjaecjaeaeaeaebgbgaeaeaeaeaeaeaeaebgbgbgbgbgbgaeaecjaecjaecjcjcjcjcjcjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjaecjcjaecjcjcjcjaecjaecjaeaeaeaeaeaeaeaecjaecjcjaeaeaeaeaeaeaeaeaeaed`cicjaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjaecjcjcjcj",
"cjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjcjcjcjaecjaecjaeaeaeaeaeaeaeaecjaecjaecjaecjcjcjcjaeaeaeaeaebgaeaeaeaeaecjaeaeaeaebgbgbgbgaeaeaeaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjaecjcjaecjcjcjcjaecjaeaecjaecjaocicjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjaecj",
"cjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjaecjaecjaeaeaeaebgaeaeaecjcjcjcjcjcjcjaecjaeaeaeaeaebgaeaeaeaecjaeaeaeaeaebgbgbgbgbgaeaecjcjaecjaecjaecjaecjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjcjcjcjcjcjcjcjaecjaecjaecjcjcjcjbicacjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjaecjaecjcjaecjae",
"cjcjcjcjcjcjcjcjcjcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaeaeaeaeaeaecjcjcjcjcjcjcjcjaecjaecjaebgaeaeaeaeaecjaecjcjaeaeaeaebgaeaeaeaeaeaecjaeaeaecjaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjcjcjcjcjcjaecjcjcjcjcjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjcjaecjaecjaecj",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaecjaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaeaeaeaecjaecjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaeaeaeaecjcjaecjaeaeaeaeaeaeaeaeaecjaecjaecjaeaeaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaeaecjae",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjcjaecjaeaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaeaecjcjaecjaecjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaeaecjcjcjcjcjcjaeaeaeaeaeaeaeaecjaecjaeaeaecjaeaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjae",
"cjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjaecjaecjaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaeaecjaecjcjcjcjcjcjcjcjcjcjcjcjaecjaeaeaeaeaecjaecjaecjaecjaeaeaeaeaeaecjcjaecjaecjaeaeaeaecjaeaecjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjcjaecjaecjcjae"
};

6
Background Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
if [ "$3" = "0x00000000" ]; then
display -window root $4 > /dev/null
else
display -window "$3" $4 > /dev/null
fi

87
Imakefile Normal file
View File

@@ -0,0 +1,87 @@
PROGRAMS = amiwm requestchoice executecmd
AMIWM_HOME = /usr/X11/lib/X11/amiwm
SRCS1 = main.c drawinfo.c client.c frame.c icc.c \
icon.c menu.c diskobject.c gram.c lex.c rc.c
OBJS1 = main.o drawinfo.o client.o frame.o icc.o \
icon.o menu.o diskobject.o gram.o lex.o rc.o
SRCS2 = requestchoice.c drawinfo.c
OBJS2 = requestchoice.o drawinfo.o
SRCS3 = executecmd.c drawinfo.c
OBJS3 = executecmd.o drawinfo.o
YFLAGS = -d
all::
/* Some old implementations does not have LexFile and YaccFile... */
#ifndef LexFile
#define LexFile(file) @@\
depend:: file.c @@\
@@\
clean:: @@\
$(RM) lex.yy.c file.c
#endif /* LexFile */
#ifndef YaccFile
#define YaccFile(file,flags) @@\
depend:: file.c @@\
@@\
file.h file.c: file.y @@\
$(YACC) flags file.y @@\
$(MV) y.tab.c file.c @@\
$(MV) y.tab.h file.h @@\
@@\
clean:: @@\
$(RM) y.tab.c y.tab.h file.h file.c
#endif /* YaccFile */
LexFile(lex)
YaccFile(gram,$(YFLAGS))
ComplexProgramTarget_1(amiwm, $(XLIB) $(XMULIB), $(OTHER_LIBS))
ComplexProgramTarget_2(requestchoice, $(XLIB), $(OTHER_LIBS))
ComplexProgramTarget_3(executecmd, $(XLIB), $(OTHER_LIBS))
SpecialCObjectRule(menu,$(_NOOP_),'-DAMIWM_HOME="$(AMIWM_HOME)"')
SpecialCObjectRule(rc,$(_NOOP_),'-DAMIWM_HOME="$(AMIWM_HOME)"')
install ::
MakeDir($(AMIWM_HOME))
RemoveFile($(AMIWM_HOME)/requestchoice)
$(LN) $(BINDIR)/requestchoice $(AMIWM_HOME)/requestchoice
RemoveFile($(AMIWM_HOME)/executecmd)
$(LN) $(BINDIR)/executecmd $(AMIWM_HOME)/executecmd
InstallNonExec(system.amiwmrc, $(AMIWM_HOME)/system.amiwmrc)
InstallNonExec(def_tool.info, $(AMIWM_HOME)/def_tool.info)
/* Targets for my private use. Not very portable. // Marcus */
DISTFILES = README INSTALL Imakefile smakefile scoptions *.[chly] \
system.amiwmrc def_tool.info
patch :
mv version.h old_version.h
sed < old_version.h 's/l/"/' | awk '-F"' '{ printf "%s\"%sl%s\"\n",$$1,$$2,1+$$3 }' > version.h
rm old_version.h
dist : version.h clean
( version=`sed < version.h -e 's/^[^"]*"//' -e 's/"[^"]*$$//'`; \
tarname="amiwm$$version.tar"; \
mkdir amiwm; \
cp $(DISTFILES) amiwm/; \
rm -f $$tarname $$tarname.gz; \
tar cf $$tarname amiwm; \
rm -rf amiwm/; \
gzip $$tarname; \
)

44
LICENSE Normal file
View File

@@ -0,0 +1,44 @@
amiwm is Copyright 1995-1998 by Marcus Comstedt <marcus@lysator.liu.se>
Amiga, AmigaOS and Workbench are registered trademarks of
AMIGA International Inc.
Generic amiwm License
=====================
This license applies to whomever receives this file. It is a generic
license to use and distribute amiwm. If you want to acquire the software
under a different license, please contact the author. This license is
in part based on the XV license by John Bradley.
Permission to copy and distribute amiwm in its entirety, for
non-commercial purposes, is hereby granted without fee, provided
that this license information and copyright notice appear in all copies.
If you redistribute amiwm, the *entire* contents of this distribution
must be distributed, including the README, INSTALL and LICENSE files,
the sources, and the various scripts and Makefiles.
You may distribute binaries built from the unmodified amiwm sources, for
non-commercial purposes, provided that the entire amiwm source distribution
is also included, as per the preceding paragraph.
You may distribute amiwm as a component of an aggregate software
distribution, provided that no other condition of this license is violated.
In particular, the entire amiwm distribution must be included in the
aggregate software distribution.
Unrestricted use of the software is also hereby granted without fee.
Distribution and modification of source or binaries are not considered use
and explicitly covered by other paragraphs of this license.
The software may be modified for your own purposes, but modified versions
may not be distributed without prior consent of the author. You may
freely distribute patches against the unmodified source code.
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.

221
Makefile Normal file
View File

@@ -0,0 +1,221 @@
srcdir = .
SHELL = /bin/sh
CC = gcc
LEX = flex
YACC = bison -y
CFLAGS = -g -O2
YFLAGS = -d
DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_TERMIO_H=1 -DHAVE_X11_EXTENSIONS_SHAPE_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DRETSIGTYPE=void -DHAVE_WAIT3=1 -DHAVE_SELECT=1 -DHAVE_STRDUP=1 -DHAVE_WAITPID=1 -DHAVE_XSHAPE=1 -DBSD_STYLE_GETTIMEOFDAY=1 -DHAVE_XCREATEFONTSET=1 -DHAVE_XMBTEXTESCAPEMENT=1 -DHAVE_XUTF8DRAWIMAGESTRING=1 -DUSE_FONTSETS=1 -DLAME_ENDIAN=1
ALL_CFLAGS = -I. -I. -I./libami $(DEFS) $(CFLAGS)
LIBS = -lSM -lICE -Llibami -lami -lXext -lXmu \
-lX11
prefix = /usr/local
exec_prefix = ${prefix}
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
mandir = $(prefix)/man
INSTALL = /usr/bin/install -c
LN_S = ln -s
RM = -rm -f
LIBAMI = libami/libami.a
DT_DIR = /etc/dt
STRIPFLAG = -s
PROGS = amiwm requestchoice executecmd ppmtoinfo
MODULES = $(srcdir)/Background Keyboard Launcher
OBJS = main.o screen.o client.o frame.o icc.o \
icon.o menu.o diskobject.o gram.o lex.o rc.o \
module.o
SRCS = main.c screen.c client.c frame.c icc.c \
icon.c menu.c diskobject.c gram.c lex.c rc.c \
module.c \
requestchoice.c executecmd.c kbdmodule.c kbdlexer.c \
launchermodule.c
DISTFILES = README README.modules INSTALL LICENSE amiwm.1 \
configure configure.in Makefile.in install-sh smakefile scoptions \
*.[chly] system.amiwmrc def_*.info *.map \
Background Xresources.amiwm.in Amilogo.?m Xsession*.in Xinitrc.in \
amiwm-init libami/Makefile.in libami/*.[chly]
PACKAGENAME = amiwm
AMIWM_HOME = $(libdir)/amiwm
all : lib_all
@$(MAKE) local_all
local_all : $(PROGS) $(MODULES)
lib_all :
@( cd libami; $(MAKE) all )
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
menu.o : menu.c
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
rc.o : rc.c
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
diskobject.o : diskobject.c
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
filesystem.o : joke_fs.c
$(CC) -o $@ -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
ppmtoinfo.o : ppmtoinfo.c
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
gram.h gram.c: gram.y
$(YACC) $(YFLAGS) $<
mv y.tab.c gram.c
mv y.tab.h gram.h
lex.c : lex.l
$(LEX) -t $< > lex.c
kbdmodule.h kbdmodule.c: kbdmodule.y
$(YACC) $(YFLAGS) $<
mv y.tab.c kbdmodule.c
mv y.tab.h kbdmodule.h
kbdlexer.c : kbdlexer.l
$(LEX) -t $< > kbdlexer.c
install : $(PROGS) $(MODULES) Xsession Xsession2 Xinitrc amiwm-init
-mkdir -p $(AMIWM_HOME)
$(INSTALL) $(STRIPFLAG) requestchoice $(AMIWM_HOME)/requestchoice
$(INSTALL) $(STRIPFLAG) executecmd $(AMIWM_HOME)/executecmd
for module in $(MODULES); do \
if [ "$$module" = "$(srcdir)/Background" ]; then \
$(INSTALL) $$module $(AMIWM_HOME)/Background; \
else \
$(INSTALL) $(STRIPFLAG) $$module $(AMIWM_HOME)/$$module; \
fi; \
done
$(INSTALL) -m 644 $(srcdir)/system.amiwmrc $(AMIWM_HOME)/system.amiwmrc
$(INSTALL) -m 644 $(srcdir)/def_tool.info $(AMIWM_HOME)/def_tool.info
$(INSTALL) -m 644 $(srcdir)/system.map $(AMIWM_HOME)/system.map
$(INSTALL) -m 644 $(srcdir)/magicwb.map $(AMIWM_HOME)/magicwb.map
$(INSTALL) -m 644 $(srcdir)/schwartz.map $(AMIWM_HOME)/schwartz.map
$(INSTALL) -m 755 Xsession $(AMIWM_HOME)/Xsession
$(INSTALL) -m 755 Xsession2 $(AMIWM_HOME)/Xsession2
$(INSTALL) -m 755 Xinitrc $(AMIWM_HOME)/Xinitrc
$(INSTALL) -m 755 $(srcdir)/amiwm-init $(AMIWM_HOME)/amiwm-init
-mkdir -p $(bindir)
$(INSTALL) $(STRIPFLAG) amiwm $(bindir)/amiwm
$(INSTALL) $(STRIPFLAG) ppmtoinfo $(bindir)/ppmtoinfo
$(RM) $(bindir)/requestchoice
$(LN_S) $(AMIWM_HOME)/requestchoice $(bindir)/requestchoice
-mkdir -p $(mandir)/man1
$(INSTALL) -m 644 $(srcdir)/amiwm.1 $(mandir)/man1/amiwm.1
fs-install : Filesystem
$(INSTALL) $(STRIPFLAG) Filesystem $(AMIWM_HOME)/Filesystem
$(INSTALL) -m 644 def_disk.info $(AMIWM_HOME)/def_disk.info
$(INSTALL) -m 644 def_drawer.info $(AMIWM_HOME)/def_disk.info
cde-install : Xresources.amiwm Amilogo.bm Amilogo.pm
-mkdir -p $(DT_DIR)/config/C/Xresources.d
$(INSTALL) -m 644 Xresources.amiwm $(DT_DIR)/config/C/Xresources.d/Xresources.amiwm
-mkdir -p $(DT_DIR)/appconfig/icons/C
$(INSTALL) -m 644 Amilogo.bm $(DT_DIR)/appconfig/icons/C/Amilogo.bm
$(INSTALL) -m 644 Amilogo.pm $(DT_DIR)/appconfig/icons/C/Amilogo.pm
amiwm : $(OBJS) $(LIBAMI)
$(CC) -o amiwm $(OBJS) $(LIBS)
requestchoice : requestchoice.o $(LIBAMI)
$(CC) -o requestchoice requestchoice.o $(LIBS)
executecmd : executecmd.o $(LIBAMI)
$(CC) -o executecmd executecmd.o $(LIBS)
Filesystem : filesystem.o $(LIBAMI)
$(CC) -o Filesystem filesystem.o $(LIBS)
Keyboard : kbdmodule.o kbdlexer.o $(LIBAMI)
$(CC) -o Keyboard kbdmodule.o kbdlexer.o $(LIBS)
Launcher : launchermodule.o $(LIBAMI)
$(CC) -o Launcher launchermodule.o $(LIBS)
ppmtoinfo : ppmtoinfo.o
$(CC) -o ppmtoinfo ppmtoinfo.o -lm
localetest : localetest.o $(LIBAMI)
$(CC) -o localetest localetest.o $(LIBS)
clean :
$(RM) core $(PROGS) $(LIBAMI) Keyboard Launcher *.o libami/*.o
$(RM) lex.yy.c lex.c y.tab.c y.tab.h gram.h gram.c
$(RM) kbdlexer.c kbdmodule.h kbdmodule.c
$(RM) config.log
distclean : clean
$(RM) config.status config.cache *~
$(RM) Makefile libami/Makefile Xresources.amiwm Xsession Xsession2 Xinitrc
spotless : distclean
TAGS:
etags *.[ch] libami/*.[ch]
patch :
mv version.h old_version.h
sed < old_version.h 's/l/"/' | awk '-F"' '{ printf "%s\"%sl%s\"\n",$$1,$$2,1+$$3 }' > version.h
rm old_version.h
dist : version.h clean
( version=`sed < version.h -e 's/^[^"]*"//' -e 's/"[^"]*$$//'`; \
tarname="$(PACKAGENAME)$$version.tar"; \
mkdir $(PACKAGENAME)$$version; \
tar cf - $(DISTFILES) | (cd $(PACKAGENAME)$$version/; tar xf - ); \
rm -f $$tarname $$tarname.gz; \
tar cf $$tarname $(PACKAGENAME)$$version; \
rm -rf $(PACKAGENAME)$$version; \
gzip $$tarname; \
)
$(srcdir)/configure: $(srcdir)/configure.in
autoconf $(srcdir)/configure.in > $(srcdir)/configure
config.status: $(srcdir)/configure
$(srcdir)/configure
Makefile: $(srcdir)/Makefile.in config.status
./config.status
libami/Makefile: $(srcdir)/libami/Makefile.in config.status
./config.status
Xresources.amiwm: $(srcdir)/Xresources.amiwm.in
sed -e 's:[@]bindir[@]:$(bindir):g' -e 's:[@]AMIWM_HOME[@]:$(AMIWM_HOME):g' < $(srcdir)/Xresources.amiwm.in > Xresources.amiwm
Xsession: $(srcdir)/Xsession.in config.status
sed -e 's:[@]bindir[@]:$(bindir):g' -e 's:[@]AMIWM_HOME[@]:$(AMIWM_HOME):g' < $(srcdir)/Xsession.in > Xsession
Xsession2: $(srcdir)/Xsession2.in config.status
sed -e 's:[@]bindir[@]:$(bindir):g' -e 's:[@]AMIWM_HOME[@]:$(AMIWM_HOME):g' < $(srcdir)/Xsession2.in > Xsession2
Xinitrc: $(srcdir)/Xinitrc.in config.status
sed -e 's:[@]bindir[@]:$(bindir):g' -e 's:[@]AMIWM_HOME[@]:$(AMIWM_HOME):g' < $(srcdir)/Xinitrc.in > Xinitrc
depend:: $(SRCS)
-@rm Makefile.bak
mv Makefile Makefile.bak
( sed '/^#--DO NOT REMOVE THIS LINE--$$/q' < Makefile.bak ; \
$(CC) -MM $(ALL_CFLAGS) $(SRCS) ) > Makefile
depend::
@( cd libami; $(MAKE) depend )
#--DO NOT REMOVE THIS LINE--

221
Makefile.in Normal file
View File

@@ -0,0 +1,221 @@
srcdir = @srcdir@
VPATH = @srcdir@
SHELL = /bin/sh
CC = @CC@
LEX = @LEX@
YACC = @YACC@
CFLAGS = @CFLAGS@
YFLAGS = -d
DEFS = @DEFS@
ALL_CFLAGS = -I. -I@srcdir@ -I@srcdir@/libami $(DEFS) $(CFLAGS) @X_CFLAGS@
LIBS = @X_LIBS@ @X_PRE_LIBS@ -Llibami -lami @XT_LIB_KLUDGE@ -lXext -lXmu \
-lX11 @X_EXTRA_LIBS@ @LIBS@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
mandir = $(prefix)/man
INSTALL = @INSTALL@
LN_S = @LN_S@
RM = -rm -f
LIBAMI = libami/libami.a
DT_DIR = /etc/dt
STRIPFLAG = -s
PROGS = amiwm requestchoice executecmd ppmtoinfo
MODULES = $(srcdir)/Background Keyboard Launcher
OBJS = main.o screen.o client.o frame.o icc.o \
icon.o menu.o diskobject.o gram.o lex.o rc.o \
module.o
SRCS = main.c screen.c client.c frame.c icc.c \
icon.c menu.c diskobject.c gram.c lex.c rc.c \
module.c \
requestchoice.c executecmd.c kbdmodule.c kbdlexer.c \
launchermodule.c
DISTFILES = README README.modules INSTALL LICENSE amiwm.1 \
configure configure.in Makefile.in install-sh smakefile scoptions \
*.[chly] system.amiwmrc def_*.info *.map \
Background Xresources.amiwm.in Amilogo.?m Xsession*.in Xinitrc.in \
amiwm-init libami/Makefile.in libami/*.[chly]
PACKAGENAME = amiwm
AMIWM_HOME = $(libdir)/amiwm
all : lib_all
@$(MAKE) local_all
local_all : $(PROGS) $(MODULES)
lib_all :
@( cd libami; $(MAKE) all )
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
menu.o : menu.c
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
rc.o : rc.c
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
diskobject.o : diskobject.c
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
filesystem.o : joke_fs.c
$(CC) -o $@ -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
ppmtoinfo.o : ppmtoinfo.c
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $<
gram.h gram.c: gram.y
$(YACC) $(YFLAGS) $<
mv y.tab.c gram.c
mv y.tab.h gram.h
lex.c : lex.l
$(LEX) -t $< > lex.c
kbdmodule.h kbdmodule.c: kbdmodule.y
$(YACC) $(YFLAGS) $<
mv y.tab.c kbdmodule.c
mv y.tab.h kbdmodule.h
kbdlexer.c : kbdlexer.l
$(LEX) -t $< > kbdlexer.c
install : $(PROGS) $(MODULES) Xsession Xsession2 Xinitrc amiwm-init
-mkdir -p $(AMIWM_HOME)
$(INSTALL) $(STRIPFLAG) requestchoice $(AMIWM_HOME)/requestchoice
$(INSTALL) $(STRIPFLAG) executecmd $(AMIWM_HOME)/executecmd
for module in $(MODULES); do \
if [ "$$module" = "$(srcdir)/Background" ]; then \
$(INSTALL) $$module $(AMIWM_HOME)/Background; \
else \
$(INSTALL) $(STRIPFLAG) $$module $(AMIWM_HOME)/$$module; \
fi; \
done
$(INSTALL) -m 644 $(srcdir)/system.amiwmrc $(AMIWM_HOME)/system.amiwmrc
$(INSTALL) -m 644 $(srcdir)/def_tool.info $(AMIWM_HOME)/def_tool.info
$(INSTALL) -m 644 $(srcdir)/system.map $(AMIWM_HOME)/system.map
$(INSTALL) -m 644 $(srcdir)/magicwb.map $(AMIWM_HOME)/magicwb.map
$(INSTALL) -m 644 $(srcdir)/schwartz.map $(AMIWM_HOME)/schwartz.map
$(INSTALL) -m 755 Xsession $(AMIWM_HOME)/Xsession
$(INSTALL) -m 755 Xsession2 $(AMIWM_HOME)/Xsession2
$(INSTALL) -m 755 Xinitrc $(AMIWM_HOME)/Xinitrc
$(INSTALL) -m 755 $(srcdir)/amiwm-init $(AMIWM_HOME)/amiwm-init
-mkdir -p $(bindir)
$(INSTALL) $(STRIPFLAG) amiwm $(bindir)/amiwm
$(INSTALL) $(STRIPFLAG) ppmtoinfo $(bindir)/ppmtoinfo
$(RM) $(bindir)/requestchoice
$(LN_S) $(AMIWM_HOME)/requestchoice $(bindir)/requestchoice
-mkdir -p $(mandir)/man1
$(INSTALL) -m 644 $(srcdir)/amiwm.1 $(mandir)/man1/amiwm.1
fs-install : Filesystem
$(INSTALL) $(STRIPFLAG) Filesystem $(AMIWM_HOME)/Filesystem
$(INSTALL) -m 644 def_disk.info $(AMIWM_HOME)/def_disk.info
$(INSTALL) -m 644 def_drawer.info $(AMIWM_HOME)/def_disk.info
cde-install : Xresources.amiwm Amilogo.bm Amilogo.pm
-mkdir -p $(DT_DIR)/config/C/Xresources.d
$(INSTALL) -m 644 Xresources.amiwm $(DT_DIR)/config/C/Xresources.d/Xresources.amiwm
-mkdir -p $(DT_DIR)/appconfig/icons/C
$(INSTALL) -m 644 Amilogo.bm $(DT_DIR)/appconfig/icons/C/Amilogo.bm
$(INSTALL) -m 644 Amilogo.pm $(DT_DIR)/appconfig/icons/C/Amilogo.pm
amiwm : $(OBJS) $(LIBAMI)
$(CC) -o amiwm $(OBJS) $(LIBS)
requestchoice : requestchoice.o $(LIBAMI)
$(CC) -o requestchoice requestchoice.o $(LIBS)
executecmd : executecmd.o $(LIBAMI)
$(CC) -o executecmd executecmd.o $(LIBS)
Filesystem : filesystem.o $(LIBAMI)
$(CC) -o Filesystem filesystem.o $(LIBS)
Keyboard : kbdmodule.o kbdlexer.o $(LIBAMI)
$(CC) -o Keyboard kbdmodule.o kbdlexer.o $(LIBS)
Launcher : launchermodule.o $(LIBAMI)
$(CC) -o Launcher launchermodule.o $(LIBS)
ppmtoinfo : ppmtoinfo.o
$(CC) -o ppmtoinfo ppmtoinfo.o -lm
localetest : localetest.o $(LIBAMI)
$(CC) -o localetest localetest.o $(LIBS)
clean :
$(RM) core $(PROGS) $(LIBAMI) Keyboard Launcher *.o libami/*.o
$(RM) lex.yy.c lex.c y.tab.c y.tab.h gram.h gram.c
$(RM) kbdlexer.c kbdmodule.h kbdmodule.c
$(RM) config.log
distclean : clean
$(RM) config.status config.cache *~
$(RM) Makefile libami/Makefile Xresources.amiwm Xsession Xsession2 Xinitrc
spotless : distclean
TAGS:
etags *.[ch] libami/*.[ch]
patch :
mv version.h old_version.h
sed < old_version.h 's/l/"/' | awk '-F"' '{ printf "%s\"%sl%s\"\n",$$1,$$2,1+$$3 }' > version.h
rm old_version.h
dist : version.h clean
( version=`sed < version.h -e 's/^[^"]*"//' -e 's/"[^"]*$$//'`; \
tarname="$(PACKAGENAME)$$version.tar"; \
mkdir $(PACKAGENAME)$$version; \
tar cf - $(DISTFILES) | (cd $(PACKAGENAME)$$version/; tar xf - ); \
rm -f $$tarname $$tarname.gz; \
tar cf $$tarname $(PACKAGENAME)$$version; \
rm -rf $(PACKAGENAME)$$version; \
gzip $$tarname; \
)
$(srcdir)/configure: $(srcdir)/configure.in
autoconf $(srcdir)/configure.in > $(srcdir)/configure
config.status: $(srcdir)/configure
$(srcdir)/configure
Makefile: $(srcdir)/Makefile.in config.status
./config.status
libami/Makefile: $(srcdir)/libami/Makefile.in config.status
./config.status
Xresources.amiwm: $(srcdir)/Xresources.amiwm.in
sed -e 's:[@]bindir[@]:$(bindir):g' -e 's:[@]AMIWM_HOME[@]:$(AMIWM_HOME):g' < $(srcdir)/Xresources.amiwm.in > Xresources.amiwm
Xsession: $(srcdir)/Xsession.in config.status
sed -e 's:[@]bindir[@]:$(bindir):g' -e 's:[@]AMIWM_HOME[@]:$(AMIWM_HOME):g' < $(srcdir)/Xsession.in > Xsession
Xsession2: $(srcdir)/Xsession2.in config.status
sed -e 's:[@]bindir[@]:$(bindir):g' -e 's:[@]AMIWM_HOME[@]:$(AMIWM_HOME):g' < $(srcdir)/Xsession2.in > Xsession2
Xinitrc: $(srcdir)/Xinitrc.in config.status
sed -e 's:[@]bindir[@]:$(bindir):g' -e 's:[@]AMIWM_HOME[@]:$(AMIWM_HOME):g' < $(srcdir)/Xinitrc.in > Xinitrc
depend:: $(SRCS)
-@rm Makefile.bak
mv Makefile Makefile.bak
( sed '/^#--DO NOT REMOVE THIS LINE--$$/q' < Makefile.bak ; \
$(CC) -MM $(ALL_CFLAGS) $(SRCS) ) > Makefile
depend::
@( cd libami; $(MAKE) depend )
#--DO NOT REMOVE THIS LINE--

174
README Normal file
View File

@@ -0,0 +1,174 @@
< amiwm > by Marcus Comstedt (marcus@mc.pp.se)
0. Legal notices
This program is distributed as FreeWare. The copyright remains with
the author. See the file LICENSE for more information.
Amiga and Workbench are registered trademarks of AMIGA International Inc.
1. Intro
This is amiwm, an X window manager that tries to make your workstation
look like an Amiga®. "Why?" you ask. Because I wanted it to. So there!
2. Compiling etc.
For instructions on building and installing, read the file INSTALL.
3. Configuration
amiwm reads the file .amiwmrc in the directory pointed to by $HOME
when starting. If this file does not exist, it reads the file
system.amiwmrc instead.
The configuration file can contain any of the following statements:
FastQuit {yes|no}
Specifies whether amiwm should quit directly when the Quit menu item
is selected, rather than popping up a requester.
(on/off or true/false can be used instead of yes/no.)
SizeBorder {right|bottom|both|none}
Specifies which border should be enlarged when a sizegadget is present.
ForceMove {manual|auto|always}
Enables you to move windows outside the perimeter of the root window
when pressing shift, when trying to drag at least 25% of the window
ofscreen, or always, respectively.
IconDir "path"
Specifies a directory in which amiwm will look for icons.
DefaultIcon "name"
Gives the filename of the .info file to use as a default icon.
It is relative to the IconDir.
IconPalette {system|magicwb|schwartz|"filename"}
Selects either the Workbench® default palette, or the MagicWorkbench
standard palette for use with icons. The third option is a 16 color
palette used on the "Eric Schwartz Productions CD Archive". Alternatively,
the filename of a PPM file representing the palette to use can be used.
ScreenFont "fontname"
Selects a font to use for windowtitles etc.
IconFont "fontname"
Selects a font for icontitles.
{detailpen|blockpen|textpen|shinepen|shadowpen|fillpen|filltextpen|
backgroundpen|highlighttextpen|bardetailpen|barblockpen|
bartrimpen} "colorname"
Modifies the colour scheme for the window manager.
CustomIconsOnly {yes|no}
This prevent applications to display their own icons when in iconified state.
Only icons defined in amiwmrc for each apps will be used.
Because apps own icon are too different from one eachother.
They comes in various sizes and themes. Some icons will be 32x32,
while some other will be a 128x128 or even bigger .. By using this option,
You have the possibility to decide which icon should be used for each app.
If no custom icons are defined at all, the def_tool.info will be used for
all iconified apps. Format is: style { class "myClass" icon "myIcon.info" }
To find out a given program's class, use "xlsclients -l" to list all opened
applications, and then use "xprop -id <0x0000000>" to list a
given app's properties. Use either WM_CLASS or WM_ICON_NAME strings in amiwmrc.
ShortLabelIcons {yes|no}
This limit the length of the text for iconified programs. For example, if this
option is activated, an iconified program text will be limited to 8 chars + ".."
Use this option if you don't want iconified program text to be loong strings..
TitleBarClock {yes|no}
Enables a clock in the titlebar. It displays the date and time.
TitleClockFormat [<number>] "time string"
This lets you choose a new format to display the Title Bar Clock.
The time string is formatted with the standard strftime() parameters.
The default is "%c". It has been found that "%a %b %e %Y %l:%M %p" works
well too. Number is the update interval in seconds.
ToolItem "name" "command" ["hotkey"]
Adds an item in the Tools menu with the specified name, which executes
the command when selected. A string containing a single uppercase letter
may be specified as the third argument, making this letter a hotkey for the
item.
ToolItem Separator
Inserts a separator bar in the Tools menu.
ToolItem "name" { <tool item commands> }
Create ToolItem:s in a submenu with the specified name. It is not legal
to create a submenu inside another submenu.
Screen [<number>] "name"
Create a new screen with the specified name. It will be placed below all
earlier created screens. To move a window between two screens, iconify it
and drag the icon over to the other screen. If the second argument is given,
this screen is placed on the corresponding X screen.
ModulePath "path(:path...)"
Sets one or more directories where amiwm will look for module binaries.
The default is AMIWM_HOME. Note that the module binaries cannot be
shared amongst different architectures.
Module "name" ["initstring"]
Start a module with the specified name. If initstring is specified, it
is sent to the module. There are currently two modules shipped with
amiwm; Background and Keyboard. These are documented in the file
README.modules. If a module is limited to a single screen, like the
Background module, the screen that was created last is used.
InterScreenGap number
Sets the size in number of pixels of the "video DMA off" area that appears
between screens when they are dragged.
AutoRaise {yes|no}
Selects wheteher windows will automatically be moved to the front when
they are activated.
Focus {followmouse|sloppy|clicktotype}
Sets the policy by which windows are given focus. Followmouse is the
default and means that the window that contains the mouse pointer will
have focus. Sloppy means that the window that had focus last will keep
it when the pointer is not over a window. ClickToType is the original AmigaOS
policy in which you have to explicitly give focus to windows by clicking
in them.
4. Troubleshooting
The most likely reason for the windowmanager to crash is if it
can't find its default icon, or if this is not accepted as an
.info file. If this happens, amiwm _will_ dump core. So make
sure that either 'make install' runs successfully (in which case
amiwm will know where its icon is), or that the file .amiwmrc
contains a correct specification of the icon's location.
Don't mail me bug reports just because amiwm prints "Bad Window" on
stderr once in a while. Redirect it to /dev/null or live with it. :)

2
README.md Normal file
View File

@@ -0,0 +1,2 @@
# amiwm
Amiga Workbench-like Window Manager for Xorg

70
README.modules Normal file
View File

@@ -0,0 +1,70 @@
Background module
-----------------
To get background images on your screens, use the Background module.
The Module command should come after the Screen command, and the
initstring should be the filename of the picture(*). Example:
Screen "My Screen"
Module "Background" "~/pliki/im"
The Background module is really a shell script that requires that the
program 'display' from imagemagick package. Currently, it doesn't
support any standard imagemagick parameters.
Keyboard module
---------------
With the Keyboard module, you can bind window manager functions to keys
on the keyboard. The initstring should consist of keybindings on the
form
modifiers<keysym>:where:func
modifiers
=========
Modifiers is 0 or more of:
Shift Control Meta Lock
Mod1 Mod2 Mod3 Mod4 Mod5
Button1 Button2 Button3 Button4 Button5
The modifiers listed must be pressed together with the key to activate
the binding.
keysym
======
Keysym is a standard X keysym name, like F1 or Prior.
where
=====
where is either "all", or one or more of window, frame, icon, root
separated with '|' (bar). This controls in what areas of the screen
that the key will be active.
func
====
The function to perform when the key is pressed.
Currently the following are defined:
rotatescreens - Move the frontmost screen to the back
front - Move the window in which the key is pressed to the front
back - Move the window in which the key is pressed to the back
iconify - Iconify the window in which the key is pressed
Example:
Module "Keyboard" "\
Meta<F1>:window|frame:front\
Meta<F2>:window|frame:iconify\
Meta<F3>:window|frame:back"
This binds the keys Meta-F1, Meta-F2 and Meta-F3 to front, back and
iconify respectively. The will only have effect inside windows and in
window frames. (These are the only places that front/iconfy/back has
effect anyway.)

18
Xinitrc Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/ksh
# AmiWM startup script
xrdb $OPENWINHOME/lib/Xdefaults # Load Default X11 resource database
if [ -f $HOME/.Xdefaults ]; then
xrdb -merge $HOME/.Xdefaults # Load Users X11 resource database
fi
xsetroot -solid black
/usr/local/bin/amiwm & wmpid=$!
if [ -x $HOME/.amiwm-init ]; then
$HOME/.amiwm-init # Custom amiwm tools
else
/usr/local/lib/amiwm/amiwm-init # Default amiwm tools
fi
wait $wmpid # Wait for wm (key client) to exit

18
Xinitrc.in Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/ksh
# AmiWM startup script
xrdb $OPENWINHOME/lib/Xdefaults # Load Default X11 resource database
if [ -f $HOME/.Xdefaults ]; then
xrdb -merge $HOME/.Xdefaults # Load Users X11 resource database
fi
xsetroot -solid black
@bindir@/amiwm & wmpid=$!
if [ -x $HOME/.amiwm-init ]; then
$HOME/.amiwm-init # Custom amiwm tools
else
@AMIWM_HOME@/amiwm-init # Default amiwm tools
fi
wait $wmpid # Wait for wm (key client) to exit

17
Xresources.amiwm.in Normal file
View File

@@ -0,0 +1,17 @@
!!######################################################################
!!
!! Xresources.amiwm
!!
!! Configuration file for the amiwm alternate desktop resources
!!
!!######################################################################
!!
!! This file used by the Solaris Desktop Login manager
Dtlogin*altDtsIncrement: True
Dtlogin*altDtName: AmiWM Desktop
Dtlogin*altDtKey: @bindir@/amiwm
Dtlogin*altDtStart: @AMIWM_HOME@/Xsession
Dtlogin*altDtLogo: Amilogo

26
Xsession Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/ksh
if [ -z "$SESSIONTYPE" ]
then
export SESSIONTYPE="altDt"
fi
if [ -z "$DTSTARTIMS" ]
then
export DTSTARTIMS="False"
fi
if [ -z "$SDT_ALT_SESSION" ]
then
export SDT_ALT_SESSION="/usr/local/lib/amiwm/Xsession2"
fi
if [ -z "$SDT_ALT_HELLO" ]
then
export SDT_ALT_HELLO="/usr/dt/bin/dthello -string 'Starting the AmiWM Desktop' &"
fi
export SDT_NO_DSDM=""
/usr/dt/bin/Xsession

26
Xsession.in Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/ksh
if [ -z "$SESSIONTYPE" ]
then
export SESSIONTYPE="altDt"
fi
if [ -z "$DTSTARTIMS" ]
then
export DTSTARTIMS="False"
fi
if [ -z "$SDT_ALT_SESSION" ]
then
export SDT_ALT_SESSION="@AMIWM_HOME@/Xsession2"
fi
if [ -z "$SDT_ALT_HELLO" ]
then
export SDT_ALT_HELLO="/usr/dt/bin/dthello -string 'Starting the AmiWM Desktop' &"
fi
export SDT_NO_DSDM=""
/usr/dt/bin/Xsession

34
Xsession2 Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/ksh
unset SDT_ALT_SESSION
unset SDT_ALT_HELLO
unset SDT_NO_DSDM
#
# Find "xinitrc" file by standard precedence rules and start
# the user's AmiWM Desktop.
#
DEFAULT_XINITRC="/usr/local/lib/amiwm/Xinitrc"
HOME_XINITRC="$HOME/.xinitrc"
if [ -z "$XINITRC" ]; then
if [ -f $HOME_XINITRC ]; then
XINITRC=$HOME_XINITRC
else
XINITRC=$DEFAULT_XINITRC
fi
fi
echo "AmiWM Desktop Login"
if [ -f $XINITRC ]; then
echo "using xinitrc file: $XINITRC"
/bin/ksh $XINITRC
else
echo "xinitrc file: $XINITRC not found"
if [ -f $DEFAULT_XINITRC ]; then
echo "using xinitrc: $DEFAULT_XINITRC"
/bin/ksh $DEFAULT_XINITRC
fi
fi

34
Xsession2.in Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/ksh
unset SDT_ALT_SESSION
unset SDT_ALT_HELLO
unset SDT_NO_DSDM
#
# Find "xinitrc" file by standard precedence rules and start
# the user's AmiWM Desktop.
#
DEFAULT_XINITRC="@AMIWM_HOME@/Xinitrc"
HOME_XINITRC="$HOME/.xinitrc"
if [ -z "$XINITRC" ]; then
if [ -f $HOME_XINITRC ]; then
XINITRC=$HOME_XINITRC
else
XINITRC=$DEFAULT_XINITRC
fi
fi
echo "AmiWM Desktop Login"
if [ -f $XINITRC ]; then
echo "using xinitrc file: $XINITRC"
/bin/ksh $XINITRC
else
echo "xinitrc file: $XINITRC not found"
if [ -f $DEFAULT_XINITRC ]; then
echo "using xinitrc: $DEFAULT_XINITRC"
/bin/ksh $DEFAULT_XINITRC
fi
fi

8
alloc.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef ALLOC_H
#define ALLOC_H
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#endif

187
amiwm.1 Normal file
View File

@@ -0,0 +1,187 @@
.\" @(#)amiwm.1
'\"macro stdmacro
.nr X
.TH amiwm 1 "26 Mar 2017"
.SH NAME
amiwm \- Amiga Workbench-like X Window Manager
.SH SYNOPSIS
amiwm
.SH DESCRIPTION
.I amiwm
is an X Window manager that tries to make your workstation look like
an Amiga\*R.
.SH OPTIONS
.I Amiwm
is configurable with a $HOME/\.amiwmrc-file containing some or all
of the following options:
.SH FastQuit: {yes|no}
Specifies whether amiwm should quit directly when the Quit
menu item is selected, rather than popping up a requester.
(on/off or true/false can be used instead of yes/no.)
.SH SizeBorder {right|bottom|both|none}
Specifies which border should be enlarged when a sizegadget is present.
.SH ForceMove {manual|auto|always}
Enables you to move windows outside the perimeter of the root window
when pressing shift, when trying to drag at least 25% of the window
ofscreen, or always, respectively.
.SH IconDir path
Specifies a directory in which amiwm will look for icons.
.SH DefaultIcon name
Gives the filename of the .info file to use as a default icon.
It is relative to the IconDir.
.SH IconPalette {system|magicwb|schwartz|\f1\*(lq\f3filename"}
Selects either the Workbench\*R default palette, or the MagicWorkbench
standard palette for use with icons. The third option is a 16 color
palette used on the "Eric Schwartz Productions CD Archive". Alternatively,
the filename of a PPM file representing the palette to use can be used.
.SH ScreenFont \f1\*(lq\f3fontname"
Selects a font to use for windowtitles etc.
.SH IconFont \f1\*(lq\f3fontname"
Selects a font for icontitles.
.SH {detailpen|blockpen|textpen|shinepen|shadowpen|fillpen|filltextpen|
backgroundpen|highlighttextpen|bardetailpen|barblockpen|
bartrimpen} \f1\*(lq\f3colorname"
Modifies the colour scheme for the window manager.
.SH CustomIconsOnly {yes|no}
This prevent applications to display their own icons when in iconified state.
Only icons defined in amiwmrc for each apps will be used.
Because apps own icon are too different from one eachother.
They comes in various sizes and themes. Some icons will be 32x32,
while some other will be a 128x128 or even bigger .. By using this option,
You have the possibility to decide which icon should be used for each app.
If no custom icons are defined at all, the def_tool.info will be used for
all iconified apps. Format is: style { class "myClass" icon "myIcon.info" }
To find out a given program's class, use "xlsclients -l" to list all opened
applications, and then use "xprop -id <0x0000000>" to list a
given app's properties. Use either WM_CLASS or WM_ICON_NAME strings in amiwmrc.
.SH ShortLabelIcons {yes|no}
This limit the length of the text for iconified programs. For example, if this
option is activated, an iconified program text will be limited to 8 chars + ".."
Use this option if you don't want iconified program text to be loong strings..
.SH TitleBarClock {yes|no}
Enables a clock in the titlebar. It displays the date and time.
.SH TitleClockFormat [<number>] "time string"
This lets you choose a new format to display the Title Bar Clock.
The time string is formatted with the standard strftime() parameters.
The default is "%c". It has been found that "%a %b %e %Y %l:%M %p" works
well too. Number is the update interval in seconds.
.SH ToolItem \f1\*(lq\f3name" \f1\*(lq\f3command" \f1\*(lq\f3hotkey"
Adds an item in the Tools menu with the specified name, which executes
the command when selected. A string containing a single uppercase letter
may be specified as the third argument, making this letter a hotkey for the
item.
.SH ToolItem Separator
Inserts a separator bar in the Tools menu.
.SH ToolItem \f1\*(lq\f3name" { <tool item commands>}
Create ToolItem:s in a submenu with the specified name. It is not legal
to create a submenu inside another submenu.
.SH Screen [<number>] \f1\*(lq\f3name"
Create a new screen with the specified name. It will be placed below all
earlier created screens. To move a window between two screens, iconify it
and drag the icon over to the other screen. If the second argument is given,
this screen is placed on the corresponding X screen.
.SH ModulePath \f1\*(lq\f3path(:path...)"
Sets one or more directories where amiwm will look for module binaries.
The default is AMIWM_HOME. Note that the module binaries cannot be
shared amongst different architectures.
.SH Module \f1\*(lq\f3name" ["initstring"]
Start a module with the specified name. If initstring is specified, it
is sent to the module. There are currently two modules shipped with
amiwm; Background and Keyboard. These are documented in the file
README.modules. If a module is limited to a single screen, like the
Background module, the screen that was created last is used.
.SH InterScreenGap number
Sets the size in number of pixels of the "video DMA off" area that appears
between screens when they are dragged.
.SH AutoRaise {yes|no}
Selects whether windows will automatically be moved to the front when
they are activated.
.SH Focus {followmouse|sloppy|clicktotype}
Sets the policy by which windows are given focus. Followmouse is the
default and means that the window that contains the mouse pointer will
have focus. Sloppy means that the window that had focus last will keep
it when the pointer is not over a window. ClickToType is the original AmigaOS
policy in which you have to explicitly give focus to windows by clicking
in them.
.SH TROUBLESHOOTING
The most likely reason for amiwm to crash is if it
can't find its default icon, or if this is not accepted as a
*.info file. If this happens, amiwm _will_ dump core. So make
sure that either 'make install' runs successfully (in which case
amiwm will know where its icon is), or that the file .amiwmrc
contains a correct specification of the icon's location.
.SH CONFIGURATION FILES
.nf
$HOME/.amiwmrc
$AMIWM_HOME/system.amiwmrc
.fi
.SH COPYRIGHT NOTICES
This program is distributed as freeware. The copyright remains with
the author. See the file LICENSE for more information.
Amiga and Workbench are registered trademarks of AMIGA International Inc.
.SH ORIGINAL AUTHOR
Marcus Comstedt,
.I marcus@mc.pp.se
.SH CONTRIBUTORS
Scott Lawrence,
.I amiwm10@umlautllama.com
Nicolas Sipieter,
.I freeeaks@gmail.com
redsPL,
.I reds@desu.gq

361
client.c Normal file
View File

@@ -0,0 +1,361 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "drawinfo.h"
#include "screen.h"
#include "icon.h"
#include "client.h"
#include "icc.h"
#include "prefs.h"
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
extern Display *dpy;
extern XContext client_context, screen_context;
extern Client *activeclient;
extern Scrn *menuactive;
extern void setfocus(Window);
Client *clients=NULL;
void grav_map_frame_to_win(Client *c, int x0, int y0, int *x, int *y)
{
switch(c->gravity) {
case EastGravity:
case NorthEastGravity:
case SouthEastGravity:
*x=x0+c->framewidth-c->old_bw-c->old_bw; break;
case CenterGravity:
case NorthGravity:
case SouthGravity:
*x=x0+4-c->old_bw; break;
case WestGravity:
case NorthWestGravity:
case SouthWestGravity:
default:
*x=x0; break;
}
switch(c->gravity) {
case SouthGravity:
case SouthEastGravity:
case SouthWestGravity:
*y=y0+c->frameheight-c->old_bw-c->old_bw; break;
case CenterGravity:
case EastGravity:
case WestGravity:
*y=y0+c->scr->bh-c->old_bw; break;
case NorthGravity:
case NorthEastGravity:
case NorthWestGravity:
default:
*y=y0; break;
}
}
void grav_map_win_to_frame(Client *c, int x0, int y0, int *x, int *y)
{
switch(c->gravity) {
case EastGravity:
case NorthEastGravity:
case SouthEastGravity:
*x=x0-c->framewidth+c->old_bw+c->old_bw; break;
case CenterGravity:
case NorthGravity:
case SouthGravity:
*x=x0-4+c->old_bw; break;
case WestGravity:
case NorthWestGravity:
case SouthWestGravity:
default:
*x=x0; break;
}
switch(c->gravity) {
case SouthGravity:
case SouthEastGravity:
case SouthWestGravity:
*y=y0-c->frameheight+c->old_bw+c->old_bw; break;
case CenterGravity:
case EastGravity:
case WestGravity:
*y=y0-c->scr->bh+c->old_bw; break;
case NorthGravity:
case NorthEastGravity:
case NorthWestGravity:
default:
*y=y0; break;
}
}
void sendconfig(Client *c)
{
XConfigureEvent ce;
ce.type = ConfigureNotify;
ce.event = c->window;
ce.window = c->window;
/*
grav_map_frame_to_win(c, c->x, c->y, &ce.x, &ce.y);
*/
ce.x = c->x+4;
#ifndef ASSIMILATE_WINDOWS
ce.y = c->y+c->scr->bh+c->scr->y;
#else
ce.y = c->y+c->scr->bh;
#endif
ce.width = c->pwidth-c->framewidth;
ce.height = c->pheight-c->frameheight;
ce.border_width = c->old_bw;
ce.above = None;
ce.override_redirect = 0;
XSendEvent(dpy, c->window, False, StructureNotifyMask, (XEvent*)&ce);
XSync(dpy, False);
}
void scrsendconfig(Scrn *s)
{
Client *c;
for (c=clients; c; c = c->next)
if(c->scr == s)
sendconfig(c);
}
void checksizehints(Client *c)
{
long supplied;
XGetWMNormalHints(dpy, c->window, &c->sizehints, &supplied);
if(!(c->sizehints.flags&PMinSize))
c->sizehints.min_width=c->sizehints.min_height=0;
if(!(c->sizehints.flags&PMaxSize))
c->sizehints.max_width=c->sizehints.max_height=1<<30;
if(!(c->sizehints.flags&PResizeInc))
c->sizehints.width_inc=c->sizehints.height_inc=1;
if(c->sizehints.flags&PBaseSize) {
c->sizehints.min_width=c->sizehints.base_width;
c->sizehints.min_height=c->sizehints.base_height;
}
if(c->sizehints.min_width<1) c->sizehints.min_width=1;
if(c->sizehints.min_height<1) c->sizehints.min_height=1;
c->sizehints.base_width=c->sizehints.min_width;
c->sizehints.base_height=c->sizehints.min_height;
if(c->sizehints.flags&PWinGravity) c->gravity=c->sizehints.win_gravity;
}
void setclientstate(Client *c, int state)
{
long data[2];
data[0] = (long) state;
data[1] = (long) None;
c->state = state;
XChangeProperty(dpy, c->window, wm_state, wm_state, 32,
PropModeReplace, (unsigned char *)data, 2);
}
void getstate(Client *c)
{
long *data=NULL;
if(_getprop(c->window, wm_state, wm_state, 2l, (char **)&data)>0) {
c->state=*data;
XFree((char *)data);
}
}
Client *createclient(Window w)
{
extern void checkstyle(Client *c);
XWindowAttributes attr;
Client *c;
if(w==0) return 0;
if(!XFindContext(dpy, w, client_context, (XPointer*)&c)) return c;
XGetWindowAttributes(dpy, w, &attr);
c = (Client *)calloc(1, sizeof(Client));
c->scr = scr;
c->window = w;
c->parent = scr->root;
c->old_bw = attr.border_width;
c->next = clients;
c->state = WithdrawnState;
c->gravity = NorthWestGravity;
c->reparenting = 0;
XSelectInput(dpy, c->window, PropertyChangeMask);
#ifdef USE_FONTSETS
{
XTextProperty prop;
c->title = NULL;
if(XGetWMName(dpy, c->window, &prop) && prop.value) {
char **list;
int n;
if(XmbTextPropertyToTextList(dpy, &prop, &list, &n) >= Success) {
if(n > 0)
c->title = strdup(list[0]);
XFreeStringList(list);
}
XFree(prop.value);
}
}
#else
XGetWMName(dpy, c->window, &c->title);
#endif
c->style = NULL;
checkstyle(c);
checksizehints(c);
c->zoomx=0;
c->zoomy=scr->bh;
if(c->sizehints.width_inc) {
c->zoomw=scr->width-c->sizehints.base_width-22;
c->zoomw-=c->zoomw%c->sizehints.width_inc;
c->zoomw+=c->sizehints.base_width;
if(c->zoomw>c->sizehints.max_width)
c->zoomw=c->sizehints.max_width;
if(c->zoomw<c->sizehints.min_width)
c->zoomw=c->sizehints.min_width;
} else
c->zoomw=attr.width;
if(c->sizehints.height_inc) {
c->zoomh=scr->height-c->sizehints.base_height-scr->bh-c->zoomy-2;
c->zoomh-=c->zoomh%c->sizehints.height_inc;
c->zoomh+=c->sizehints.base_height;
if(c->zoomh>c->sizehints.max_height)
c->zoomh=c->sizehints.max_height;
if(c->zoomh<c->sizehints.min_height)
c->zoomh=c->sizehints.min_height;
} else
c->zoomh=attr.height;
XSaveContext(dpy, w, client_context, (XPointer)c);
return clients = c;
}
void rmclient(Client *c)
{
Client *cc;
if (c == clients)
clients = c->next;
else
if((cc = clients))
for (; cc->next; cc = cc->next)
if (cc->next == c) {
cc->next = cc->next->next;
break;
}
if(c->active) {
if(!menuactive)
setfocus(None);
c->active=False;
activeclient = NULL;
XInstallColormap(dpy, scr->cmap);
} else if(prefs.focus==FOC_CLICKTOTYPE)
XUngrabButton(dpy, Button1, AnyModifier, c->parent);
#ifdef USE_FONTSETS
if(c->title)
free(c->title);
#else
if(c->title.value)
XFree(c->title.value);
#endif
if(c->parent != c->scr->root) {
XDestroyWindow(dpy, c->parent);
XDeleteContext(dpy, c->parent, client_context);
}
if(c->close)
XDeleteContext(dpy, c->close, client_context);
if(c->drag)
XDeleteContext(dpy, c->drag, client_context);
if(c->iconify)
XDeleteContext(dpy, c->iconify, client_context);
if(c->zoom)
XDeleteContext(dpy, c->zoom, client_context);
if(c->depth)
XDeleteContext(dpy, c->depth, client_context);
if(c->resize)
XDeleteContext(dpy, c->resize, client_context);
if(c->icon)
rmicon(c->icon);
if(c->window)
XDeleteContext(dpy, c->window, client_context);
free(c);
}
int screen_has_clients()
{
int n = 0;
Client *c = clients;
while(c) {
if(c->scr == scr)
n++;
c = c->next;
}
return n;
}
void flushclients()
{
unsigned int i, nwins;
Window dw1, dw2, *wins;
Client *c;
#ifdef ASSIMILATE_WINDOWS
Scrn *scr2;
#endif
if((scr = front)) do {
scr = scr->upfront;
XQueryTree(dpy, scr->back, &dw1, &dw2, &wins, &nwins);
for(i=0; i<nwins; i++)
if((!XFindContext(dpy, wins[i], client_context, (XPointer *)&c))&&wins[i]==c->parent) {
int x,y;
grav_map_frame_to_win(c, c->x, c->y, &x, &y);
XReparentWindow(dpy, c->window, scr->root, x, y);
XSetWindowBorderWidth(dpy, c->window, c->old_bw);
XRemoveFromSaveSet(dpy, c->window);
wins[i]=c->window;
rmclient(c);
}
#ifdef ASSIMILATE_WINDOWS
else if((!XFindContext(dpy, wins[i], screen_context, (XPointer *)&scr2)) && scr2==scr) {
XWindowAttributes attr;
XSetWindowAttributes xsa;
XGetWindowAttributes(dpy, wins[i], &attr);
XReparentWindow(dpy, wins[i], scr->root, attr.x, attr.y);
xsa.override_redirect = True;
XChangeWindowAttributes(dpy, wins[i], CWOverrideRedirect, &xsa);
XDeleteContext(dpy, wins[i], screen_context);
XRemoveFromSaveSet(dpy, wins[i]);
}
#endif
/*
if(nwins) {
for(i=0; i<(nwins>>1); i++) {
Window w=wins[i];
wins[i]=wins[nwins-1-i];
wins[nwins-1-i]=w;
}
XRestackWindows(dpy, wins, nwins);
}
*/
XFree((void *) wins);
} while(scr!=front);
while((c=clients)) {
if(c->parent != c->scr->root) {
int x,y;
grav_map_frame_to_win(c, c->x, c->y, &x, &y);
XReparentWindow(dpy, c->window, c->scr->root, x, y);
XSetWindowBorderWidth(dpy, c->window, c->old_bw);
XRemoveFromSaveSet(dpy, c->window);
}
rmclient(c);
}
}

46
client.h Normal file
View File

@@ -0,0 +1,46 @@
#ifndef CLIENT_H
#define CLIENT_H
#include <X11/Xlib.h>
#include <X11/Xutil.h>
struct _Icon;
struct _Scrn;
typedef struct _Client {
struct _Client *next;
struct _Scrn *scr;
struct _Icon *icon;
struct module *module;
int wflags;
Window window, parent;
Window close, drag, iconify, zoom, depth, resize;
Window clicked;
Colormap colormap;
int x, y, pwidth, pheight, dragw, framewidth, frameheight;
int zoomx, zoomy, zoomw, zoomh;
int old_bw, proto, state, gravity, reparenting;
int active, shaped;
#ifdef USE_FONTSETS
char *title;
#else
XTextProperty title;
#endif
XSizeHints sizehints;
struct _Style *style;
} Client;
extern Client *clients;
extern Client *getclient(Window);
extern Client *getclientbyicon(Window);
extern Client *createclient(Window);
extern void rmclient(Client *);
extern void flushclients(void);
extern void scrsendconfig(struct _Scrn *);
extern void sendconfig(Client *);
extern void getstate(Client *);
extern void grav_map_frame_to_win(Client *, int, int, int *, int *);
extern void grav_map_win_to_frame(Client *, int, int, int *, int *);
extern void setclientstate(Client *, int);
#endif

6504
configure vendored Executable file

File diff suppressed because it is too large Load Diff

115
configure.in Normal file
View File

@@ -0,0 +1,115 @@
AC_INIT(diskobject.c)
AC_ENABLE(fontsets,
[use_fontsets="$enableval"], [use_fontsets=auto])
AC_PROG_CC
AC_ISC_POSIX
AC_PROG_AWK
AC_PROG_YACC
AC_PROG_LEX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PATH_XTRA
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h sys/types.h unistd.h sys/select.h sys/resource.h sys/stat.h termio.h)
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS(X11/extensions/shape.h)
CPPFLAGS="$ac_save_CPPFLAGS"
AC_C_CONST
AC_C_CHAR_UNSIGNED
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_FUNC_ALLOCA
AC_TYPE_SIGNAL
AC_FUNC_WAIT3
AC_CHECK_FUNCS(select strdup waitpid)
dnl On SunOS4, libXmu seems to be all in one unit forcing references
dnl to libXt into the linking. Only fix I can think of is to link with
dnl libXt too, so that's what we'll do.
AC_MSG_CHECKING([for broken libXmu])
old_LIBS="$LIBS"
LIBS="$X_LIBS $X_PRE_LIBS -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS"
AC_TRY_LINK([],[
extern void XmuCopyISOLatin1Lowered(char *,char *);
char foo[]="FOO";
XmuCopyISOLatin1Lowered (foo, foo);
], AC_MSG_RESULT([no])
XT_LIB_KLUDGE="", AC_MSG_RESULT([yes])
XT_LIB_KLUDGE="-lXt")
LIBS="$old_LIBS"
AC_SUBST(XT_LIB_KLUDGE)
if test "x$ac_cv_header_X11_extensions_shape_h" = xyes; then
ac_save_LIBS="$LIBS"
LIBS="$X_LIBS $X_PRE_LIBS $XT_LIB_KLUDGE -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS"
AC_CHECK_FUNC(XShapeQueryExtension, AC_DEFINE([HAVE_XSHAPE],1,[Define this if your Xlib supports the SHAPE X server extension.]))
LIBS="$ac_save_LIBS"
else
:
fi
AC_MSG_CHECKING([number of arguments to gettimeofday])
AC_TRY_LINK([
#include <stdlib.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
],[
struct timeval tp;
struct timezone tz;
gettimeofday(&tp, &tz);
], AC_DEFINE(BSD_STYLE_GETTIMEOFDAY,1,[Define this if gettimeofday() takes two arguments.])
AC_MSG_RESULT([2]), AC_MSG_RESULT([1]))
AC_CHECK_TYPE(caddr_t, char *)
AC_MSG_CHECKING([for XPointer])
AC_EGREP_HEADER([XPointer[^a-zA-Z_]], [$]x_includes[$]{x_includes:+/}X11/Xlib.h, AC_MSG_RESULT([yes]), AC_DEFINE(XPointer, caddr_t,[Define this to a pointer type if XPointer is not a predefined type])
AC_MSG_RESULT([no]))
ac_save_LIBS="$LIBS"
LIBS="$X_LIBS $X_PRE_LIBS $XT_LIB_KLUDGE -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS"
AC_CHECK_FUNCS(XCreateFontSet XmbTextEscapement Xutf8DrawImageString)
LIBS="$ac_save_LIBS"
if test "x$ac_cv_func_XCreateFontSet:$ac_cv_func_XmbTextEscapement:$use_fontsets" = xyes:yes:auto; then
use_fontsets=yes
else
:
fi
if test "x$use_fontsets" = xyes; then
AC_DEFINE([USE_FONTSETS])
else
:
fi
AC_MSG_CHECKING([byteorder])
AC_TRY_RUN([
int main()
{
union { int i; char c[sizeof(int)]; } v;
v.i=0;
v.c[0]=1;
if(v.i==1) exit(0); else exit(1);
return 0;
}
], AC_DEFINE([LAME_ENDIAN],1,[Define this is your achitecture stores integers backwards in memory])
AC_MSG_RESULT([backward]), AC_MSG_RESULT([normal]), AC_MSG_RESULT([no idea]))
AC_SUBST(x_includes)
AC_SUBST(x_libraries)
AC_OUTPUT(Makefile libami/Makefile)

BIN
def_disk.info Normal file

Binary file not shown.

BIN
def_drawer.info Normal file

Binary file not shown.

BIN
def_project.info Normal file

Binary file not shown.

BIN
def_tool.info Normal file

Binary file not shown.

199
diskobject.c Normal file
View File

@@ -0,0 +1,199 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xmd.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <string.h>
#include "alloc.h"
#include "drawinfo.h"
#include "prefs.h"
#include "screen.h"
#include "libami.h"
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
extern Display *dpy;
extern char *progname;
char *iconcolorname[256];
int iconcolormask;
static char *sysiconcolorname[]={
"#aaaaaa", "#000000", "#ffffff", "#6688bb",
"#ee4444", "#55dd55", "#0044dd", "#ee9e00"
};
static char *magicwbcolorname[]={
"#aaaaaa", "#000000", "#ffffff", "#6688bb",
"#999999", "#bbbbbb", "#bbaa99", "#ffbbaa"
};
static char *schwartziconcolorname[]={
"#aaa0aa", "#000000", "#ffffff", "#5b78f5",
"#999099", "#bbb0bb", "#bbaa99", "#ffbbaa",
"#d922f1", "#915a46", "#3e3e41", "#6e6973",
"#ff1919", "#ffff00", "#727d92", "#00c800"
};
Pixmap image_to_pixmap_scr(Scrn *scr, struct Image *im, int width, int height,
struct ColorStore *cs)
{
return image_to_pixmap(dpy, scr->back, scr->gc,
scr->dri.dri_Pens[BACKGROUNDPEN],
scr->iconcolor, iconcolormask, im, width, height, cs);
}
void load_do(const char *filename, struct IconPixmaps *ip)
{
struct DiskObject *dobj;
#ifdef AMIGAOS
char fn[256];
strncpy(fn, prefs.icondir, sizeof(fn)-1);
fn[sizeof(fn)-1]='\0';
AddPart(fn,filename,sizeof(fn));
#else
int rl=strlen(filename)+strlen(prefs.icondir)+2;
#ifdef HAVE_ALLOCA
char *fn=alloca(rl);
#else
char fn[1024];
#endif
sprintf(fn, "%s/%s", prefs.icondir, filename);
#endif
fn[strlen(fn)-5]=0;
if((dobj=GetDiskObject(fn))) {
ip->pm=image_to_pixmap_scr(scr, (struct Image *)dobj->do_Gadget.GadgetRender,
dobj->do_Gadget.Width, dobj->do_Gadget.Height, &ip->cs);
ip->pm2=image_to_pixmap_scr(scr, (struct Image *)dobj->do_Gadget.SelectRender,
dobj->do_Gadget.Width, dobj->do_Gadget.Height, &ip->cs2);
FreeDiskObject(dobj);
} else ip->pm=ip->pm2=None;
}
void init_iconpalette()
{
extern Status myXAllocNamedColor(Display *, Colormap, char *, XColor *, XColor *);
XColor scrp, xact;
char *name;
int i;
for(i=0; i<=iconcolormask; i++) {
if(!myXAllocNamedColor(dpy, scr->cmap, name = iconcolorname[i], &scrp, &xact)) {
fprintf(stderr, "%s: cannot allocate color %s\n", progname, name);
exit(1);
}
scr->iconcolor[i]=scrp.pixel;
scr->iconcolorsallocated=i+1;
}
}
void set_mwb_palette()
{
iconcolormask=7;
memcpy(iconcolorname, magicwbcolorname, sizeof(magicwbcolorname));
}
void set_sys_palette()
{
iconcolormask=7;
memcpy(iconcolorname, sysiconcolorname, sizeof(sysiconcolorname));
}
void set_schwartz_palette()
{
iconcolormask=15;
memcpy(iconcolorname, schwartziconcolorname, sizeof(schwartziconcolorname));
}
#ifndef HAVE_STRDUP
/* defined in gram.y */
extern char *strdup(char *);
#endif
static int custom_palette_from_file(char *fn, int ignorenofile)
{
FILE *file;
int rows, cols, pixels, pixel;
int format, mv;
if(!(file=fopen(fn, "r"))) {
if(!ignorenofile)
perror(fn);
return 0;
}
if(4!=fscanf(file, "P%d %d %d %d", &format, &cols, &rows, &mv) ||
(format!=3 && format!=6)) {
fprintf(stderr, "%s: bad magic number - not a ppm file\n", fn);
fclose(file);
return 0;
}
if(format==6)
getc(file);
pixels = rows*cols;
if(pixels>256)
pixels = 256;
for(pixel=0; pixel<pixels; ++pixel) {
unsigned int r, g, b;
char nam[16];
if(format==3)
fscanf(file, "%u %u %u", &r, &g, &b);
else {
r = getc(file);
g = getc(file);
b = getc(file);
}
if(mv==255)
sprintf(nam, "#%02x%02x%02x", r&0xff, g&0xff, b&0xff);
else if(mv==65536)
sprintf(nam, "#%04x%04x%04x", r&0xffff, g&0xffff, b&0xffff);
else if(mv<255)
sprintf(nam, "#%02x%02x%02x", (r*0xff/mv)&0xff,
(g*0xff/mv)&0xff, (b*0xff/mv)&0xff);
else
sprintf(nam, "#%04x%04x%04x", (r*0xffff/mv)&0xffff,
(g*0xffff/mv)&0xffff, (b*0xffff/mv)&0xffff);
iconcolorname[pixel] = strdup(nam);
}
fclose(file);
while(pixels&(pixels-1))
iconcolorname[pixels++]="black";
iconcolormask=pixels-1;
return 1;
}
void set_custom_palette(char *fn)
{
if(*fn!='/') {
char *fn2;
int r;
#ifdef HAVE_ALLOCA
fn2 = alloca(strlen(fn)+strlen(AMIWM_HOME)+2);
#else
fn2 = malloc(strlen(fn)+strlen(AMIWM_HOME)+2);
#endif
sprintf(fn2, "%s/%s", AMIWM_HOME, fn);
r=custom_palette_from_file(fn2, 1);
#ifndef HAVE_ALLOCA
free(fn2);
#endif
if(r)
return;
}
custom_palette_from_file(fn, 0);
}
char *get_current_icondir()
{
return prefs.icondir;
}

579
executecmd.c Normal file
View File

@@ -0,0 +1,579 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/keysym.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include <errno.h>
#ifdef USE_FONTSETS
#include <locale.h>
#include <wchar.h>
#endif
#include "drawinfo.h"
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
#define MAX_CMD_CHARS 256
#define VISIBLE_CMD_CHARS 35
#define BOT_SPACE 4
#define TEXT_SIDE 8
#define BUT_SIDE 12
#define TOP_SPACE 4
#define INT_SPACE 7
#define BUT_VSPACE 2
#define BUT_HSPACE 8
static const char ok_txt[]="Ok", cancel_txt[]="Cancel";
static const char enter_txt[]="Enter Command and its Arguments:";
static const char cmd_txt[]="Command:";
static int selected=0, depressed=0, stractive=1;
static Window button[3];
static const char *buttxt[]={ NULL, ok_txt, cancel_txt };
char cmdline[MAX_CMD_CHARS+1];
int buf_len=0;
int cur_pos=0;
int left_pos=0;
int cur_x=6;
char *progname;
Display *dpy;
struct DrawInfo dri;
Window root, mainwin, strwin;
GC gc;
int strgadw, strgadh, fh, mainw, mainh, butw;
#ifdef USE_FONTSETS
static XIM xim = (XIM) NULL;
static XIC xic = (XIC) NULL;
#endif
int getchoice(Window w)
{
int i;
for(i=1; i<3; i++)
if(button[i]==w)
return i;
return 0;
}
void refresh_button(Window w, const char *txt, int idx)
{
int h=fh+2*BUT_VSPACE, l=strlen(txt);
#ifdef USE_FONTSETS
int tw=XmbTextEscapement(dri.dri_FontSet, txt, l);
#else
int tw=XTextWidth(dri.dri_Font, txt, l);
#endif
XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]);
#ifdef USE_FONTSETS
XmbDrawString(dpy, w, dri.dri_FontSet, gc, (butw-tw)>>1,
dri.dri_Ascent+BUT_VSPACE, txt, l);
#else
XDrawString(dpy, w, gc, (butw-tw)>>1,
dri.dri_Ascent+BUT_VSPACE, txt, l);
#endif
XSetForeground(dpy, gc, dri.dri_Pens[(selected==idx && depressed)?
SHADOWPEN:SHINEPEN]);
XDrawLine(dpy, w, gc, 0, 0, butw-2, 0);
XDrawLine(dpy, w, gc, 0, 0, 0, h-2);
XSetForeground(dpy, gc, dri.dri_Pens[(selected==idx && depressed)?
SHINEPEN:SHADOWPEN]);
XDrawLine(dpy, w, gc, 1, h-1, butw-1, h-1);
XDrawLine(dpy, w, gc, butw-1, 1, butw-1, h-1);
XSetForeground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]);
XDrawPoint(dpy, w, gc, butw-1, 0);
XDrawPoint(dpy, w, gc, 0, h-1);
}
void refresh_main(void)
{
int w;
XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]);
#ifdef USE_FONTSETS
XmbDrawString(dpy, mainwin, dri.dri_FontSet, gc, TEXT_SIDE,
TOP_SPACE+dri.dri_Ascent, enter_txt, strlen(enter_txt));
#else
XDrawString(dpy, mainwin, gc, TEXT_SIDE, TOP_SPACE+dri.dri_Ascent,
enter_txt, strlen(enter_txt));
#endif
XSetForeground(dpy, gc, dri.dri_Pens[HIGHLIGHTTEXTPEN]);
#ifdef USE_FONTSETS
w=XmbTextEscapement(dri.dri_FontSet, cmd_txt, strlen(cmd_txt));
XmbDrawString(dpy, mainwin, dri.dri_FontSet, gc,
mainw-strgadw-w-TEXT_SIDE-BUT_SIDE,
TOP_SPACE+fh+INT_SPACE+dri.dri_Ascent,
cmd_txt, strlen(cmd_txt));
#else
w=XTextWidth(dri.dri_Font, cmd_txt, strlen(cmd_txt));
XDrawString(dpy, mainwin, gc, mainw-strgadw-w-TEXT_SIDE-BUT_SIDE,
TOP_SPACE+fh+INT_SPACE+dri.dri_Ascent,
cmd_txt, strlen(cmd_txt));
#endif
}
void refresh_str_text(void)
{
int l, mx=6;
XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]);
if(buf_len>left_pos) {
#ifdef USE_FONTSETS
int w, c;
for(l=0; l<buf_len-left_pos; ) {
c=mbrlen(cmdline+left_pos+l, buf_len-left_pos-l, NULL);
w=6+XmbTextEscapement(dri.dri_FontSet, cmdline+left_pos, l+c);
if(w>strgadw-6)
break;
mx=w;
l+=c;
}
XmbDrawImageString(dpy, strwin, dri.dri_FontSet, gc, 6, 3+dri.dri_Ascent,
cmdline+left_pos, l);
#else
mx+=XTextWidth(dri.dri_Font, cmdline+left_pos, l=buf_len-left_pos);
while(mx>strgadw-6)
mx-=XTextWidth(dri.dri_Font, cmdline+left_pos+--l, 1);
XDrawImageString(dpy, strwin, gc, 6, 3+dri.dri_Ascent,
cmdline+left_pos, l);
#endif
}
XSetForeground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]);
XFillRectangle(dpy, strwin, gc, mx, 3, strgadw-mx-6, fh);
if(stractive) {
if(cur_pos<buf_len) {
XSetBackground(dpy, gc, ~0);
#ifdef USE_FONTSETS
l=mbrlen(cmdline+cur_pos, buf_len-cur_pos, NULL);
XmbDrawImageString(dpy, strwin, dri.dri_FontSet, gc, cur_x,
3+dri.dri_Ascent, cmdline+cur_pos, l);
#else
XDrawImageString(dpy, strwin, gc, cur_x, 3+dri.dri_Ascent,
cmdline+cur_pos, 1);
#endif
XSetBackground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]);
} else {
XSetForeground(dpy, gc, ~0);
#ifdef USE_FONTSETS
XFillRectangle(dpy, strwin, gc, cur_x, 3,
XExtentsOfFontSet(dri.dri_FontSet)->
max_logical_extent.width, fh);
#else
XFillRectangle(dpy, strwin, gc, cur_x, 3,
dri.dri_Font->max_bounds.width, fh);
#endif
}
}
}
void refresh_str(void)
{
refresh_str_text();
XSetForeground(dpy, gc, dri.dri_Pens[SHINEPEN]);
XDrawLine(dpy, strwin, gc, 0, strgadh-1, 0, 0);
XDrawLine(dpy, strwin, gc, 0, 0, strgadw-2, 0);
XDrawLine(dpy, strwin, gc, 3, strgadh-2, strgadw-4, strgadh-2);
XDrawLine(dpy, strwin, gc, strgadw-4, strgadh-2, strgadw-4, 2);
XDrawLine(dpy, strwin, gc, 1, 1, 1, strgadh-2);
XDrawLine(dpy, strwin, gc, strgadw-3, 1, strgadw-3, strgadh-2);
XSetForeground(dpy, gc, dri.dri_Pens[SHADOWPEN]);
XDrawLine(dpy, strwin, gc, 1, strgadh-1, strgadw-1, strgadh-1);
XDrawLine(dpy, strwin, gc, strgadw-1, strgadh-1, strgadw-1, 0);
XDrawLine(dpy, strwin, gc, 3, strgadh-3, 3, 1);
XDrawLine(dpy, strwin, gc, 3, 1, strgadw-4, 1);
XDrawLine(dpy, strwin, gc, 2, 1, 2, strgadh-2);
XDrawLine(dpy, strwin, gc, strgadw-2, 1, strgadw-2, strgadh-2);
}
void strkey(XKeyEvent *e)
{
void endchoice(void);
#ifdef USE_FONTSETS
Status stat;
#else
static XComposeStatus stat;
#endif
KeySym ks;
char buf[256];
int x, i, n;
#ifndef USE_FONTSETS
n=XLookupString(e, buf, sizeof(buf), &ks, &stat);
#else
n=XmbLookupString(xic, e, buf, sizeof(buf), &ks, &stat);
if(stat == XLookupKeySym || stat == XLookupBoth)
#endif
switch(ks) {
case XK_Return:
case XK_Linefeed:
selected=1;
endchoice();
break;
case XK_Left:
if(cur_pos) {
#ifdef USE_FONTSETS
int p=cur_pos;
int z;
while(p>0) {
--p;
if(((int)mbrlen(cmdline+p, cur_pos-p, NULL))>0) {
cur_pos=p;
break;
}
}
#else
--cur_pos;
#endif
}
break;
case XK_Right:
if(cur_pos<buf_len) {
#ifdef USE_FONTSETS
int l=mbrlen(cmdline+cur_pos, buf_len-cur_pos, NULL);
if(l>0)
cur_pos+=l;
#else
cur_pos++;
#endif
}
break;
case XK_Begin:
cur_pos=0;
break;
case XK_End:
cur_pos=buf_len;
break;
case XK_Delete:
if(cur_pos<buf_len) {
int l=1;
#ifdef USE_FONTSETS
l=mbrlen(cmdline+cur_pos, buf_len-cur_pos, NULL);
if(l<=0)
break;
#endif
buf_len-=l;
for(x=cur_pos; x<buf_len; x++)
cmdline[x]=cmdline[x+l];
cmdline[x] = 0;
} else XBell(dpy, 100);
break;
case XK_BackSpace:
if(cur_pos>0) {
int l=1;
#ifdef USE_FONTSETS
int p=cur_pos;
while(p>0) {
--p;
if(((int)mbrlen(cmdline+p, cur_pos-p, NULL))>0) {
l=cur_pos-p;
break;
}
}
#endif
buf_len-=l;
for(x=(cur_pos-=l); x<buf_len; x++)
cmdline[x]=cmdline[x+l];
cmdline[x] = 0;
} else XBell(dpy, 100);
break;
#ifdef USE_FONTSETS
default:
if(stat == XLookupBoth)
stat = XLookupChars;
}
if(stat == XLookupChars) {
#else
default:
#endif
for(i=0; i<n && buf_len<MAX_CMD_CHARS; i++) {
for(x=buf_len; x>cur_pos; --x)
cmdline[x]=cmdline[x-1];
cmdline[cur_pos++]=buf[i];
buf_len++;
}
if(i<n)
XBell(dpy, 100);
}
if(cur_pos<left_pos)
left_pos=cur_pos;
cur_x=6;
#ifdef USE_FONTSETS
if(cur_pos>left_pos)
cur_x+=XmbTextEscapement(dri.dri_FontSet, cmdline+left_pos, cur_pos-left_pos);
if(cur_pos<buf_len) {
int l=mbrlen(cmdline+cur_pos, buf_len-cur_pos, NULL);
x=XmbTextEscapement(dri.dri_FontSet, cmdline+cur_pos, l);
} else
x=XExtentsOfFontSet(dri.dri_FontSet)->max_logical_extent.width;
#else
if(cur_pos>left_pos)
cur_x+=XTextWidth(dri.dri_Font, cmdline+left_pos, cur_pos-left_pos);
if(cur_pos<buf_len)
x=XTextWidth(dri.dri_Font, cmdline+cur_pos, 1);
else
x=dri.dri_Font->max_bounds.width;
#endif
if((x+=cur_x-(strgadw-6))>0) {
cur_x-=x;
while(x>0) {
#ifdef USE_FONTSETS
int l=mbrlen(cmdline+left_pos, buf_len-left_pos, NULL);
x-=XmbTextEscapement(dri.dri_FontSet, cmdline+left_pos, l);
left_pos += l;
#else
x-=XTextWidth(dri.dri_Font, cmdline+left_pos++, 1);
#endif
}
cur_x+=x;
}
refresh_str_text();
}
void strbutton(XButtonEvent *e)
{
int w, l=1;
stractive=1;
cur_pos=left_pos;
cur_x=6;
while(cur_x<e->x && cur_pos<buf_len) {
#ifdef USE_FONTSETS
l=mbrlen(cmdline+cur_pos, buf_len-cur_pos, NULL);
if(l<=0)
break;
w=XmbTextEscapement(dri.dri_FontSet, cmdline+cur_pos, l);
#else
w=XTextWidth(dri.dri_Font, cmdline+cur_pos, 1);
#endif
if(cur_x+w>e->x)
break;
cur_x+=w;
cur_pos+=l;
}
refresh_str();
}
void toggle(int c)
{
XSetWindowBackground(dpy, button[c], dri.dri_Pens[(depressed&&c==selected)?
FILLPEN:BACKGROUNDPEN]);
XClearWindow(dpy, button[c]);
refresh_button(button[c], buttxt[c], c);
}
void abortchoice()
{
if(depressed) {
depressed=0;
toggle(selected);
}
selected=0;
}
void endchoice()
{
int c=selected;
abortchoice();
XCloseDisplay(dpy);
if(c==1)
system(cmdline);
exit(0);
}
int main(int argc, char *argv[])
{
XWindowAttributes attr;
static XSizeHints size_hints;
static XTextProperty txtprop1, txtprop2;
Window ok, cancel;
int w2, c;
#ifdef USE_FONTSETS
char *p;
setlocale(LC_CTYPE, "");
#endif
progname=argv[0];
if(!(dpy = XOpenDisplay(NULL))) {
fprintf(stderr, "%s: cannot connect to X server %s\n", progname,
XDisplayName(NULL));
exit(1);
}
root = RootWindow(dpy, DefaultScreen(dpy));
XGetWindowAttributes(dpy, root, &attr);
init_dri(&dri, dpy, root, attr.colormap, False);
#ifdef USE_FONTSETS
strgadw=VISIBLE_CMD_CHARS*XExtentsOfFontSet(dri.dri_FontSet)->
max_logical_extent.width+12;
#else
strgadw=VISIBLE_CMD_CHARS*dri.dri_Font->max_bounds.width+12;
#endif
strgadh=(fh=dri.dri_Ascent+dri.dri_Descent)+6;
#ifdef USE_FONTSETS
butw=XmbTextEscapement(dri.dri_FontSet, ok_txt, strlen(ok_txt))+2*BUT_HSPACE;
w2=XmbTextEscapement(dri.dri_FontSet, cancel_txt, strlen(cancel_txt))+2*BUT_HSPACE;
#else
butw=XTextWidth(dri.dri_Font, ok_txt, strlen(ok_txt))+2*BUT_HSPACE;
w2=XTextWidth(dri.dri_Font, cancel_txt, strlen(cancel_txt))+2*BUT_HSPACE;
#endif
if(w2>butw)
butw=w2;
mainw=2*(BUT_SIDE+butw)+BUT_SIDE;
#ifdef USE_FONTSETS
w2=XmbTextEscapement(dri.dri_FontSet, enter_txt, strlen(enter_txt))+2*TEXT_SIDE;
#else
w2=XTextWidth(dri.dri_Font, enter_txt, strlen(enter_txt))+2*TEXT_SIDE;
#endif
if(w2>mainw)
mainw=w2;
#ifdef USE_FONTSETS
w2=strgadw+XmbTextEscapement(dri.dri_FontSet, cmd_txt, strlen(cmd_txt))+
2*TEXT_SIDE+2*BUT_SIDE+butw;
#else
w2=strgadw+XTextWidth(dri.dri_Font, cmd_txt, strlen(cmd_txt))+
2*TEXT_SIDE+2*BUT_SIDE+butw;
#endif
if(w2>mainw)
mainw=w2;
mainh=3*fh+TOP_SPACE+BOT_SPACE+2*INT_SPACE+2*BUT_VSPACE;
mainwin=XCreateSimpleWindow(dpy, root, 20, 20, mainw, mainh, 1,
dri.dri_Pens[SHADOWPEN],
dri.dri_Pens[BACKGROUNDPEN]);
strwin=XCreateSimpleWindow(dpy, mainwin, mainw-BUT_SIDE-strgadw,
TOP_SPACE+fh+INT_SPACE-3,
strgadw, strgadh, 0,
dri.dri_Pens[SHADOWPEN],
dri.dri_Pens[BACKGROUNDPEN]);
ok=XCreateSimpleWindow(dpy, mainwin, BUT_SIDE,
mainh-BOT_SPACE-2*BUT_VSPACE-fh,
butw, fh+2*BUT_VSPACE, 0,
dri.dri_Pens[SHADOWPEN],
dri.dri_Pens[BACKGROUNDPEN]);
cancel=XCreateSimpleWindow(dpy, mainwin, mainw-butw-BUT_SIDE,
mainh-BOT_SPACE-2*BUT_VSPACE-fh,
butw, fh+2*BUT_VSPACE, 0,
dri.dri_Pens[SHADOWPEN],
dri.dri_Pens[BACKGROUNDPEN]);
button[0]=None;
button[1]=ok;
button[2]=cancel;
XSelectInput(dpy, mainwin, ExposureMask|KeyPressMask|ButtonPressMask);
XSelectInput(dpy, strwin, ExposureMask|ButtonPressMask);
XSelectInput(dpy, ok, ExposureMask|ButtonPressMask|ButtonReleaseMask|
EnterWindowMask|LeaveWindowMask);
XSelectInput(dpy, cancel, ExposureMask|ButtonPressMask|ButtonReleaseMask|
EnterWindowMask|LeaveWindowMask);
gc=XCreateGC(dpy, mainwin, 0, NULL);
XSetBackground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]);
#ifndef USE_FONTSETS
XSetFont(dpy, gc, dri.dri_Font->fid);
#endif
#ifdef USE_FONTSETS
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
xim = XOpenIM(dpy, NULL, NULL, NULL);
if (!xim)
fprintf(stderr, "Failed to open input method.\n");
else {
xic = XCreateIC(xim,
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, mainwin,
XNFocusWindow, mainwin,
NULL);
if (!xic)
fprintf(stderr, "Failed to create input context.\n");
}
if (!xic)
exit(1);
#endif
size_hints.flags = PResizeInc;
txtprop1.value=(unsigned char *)"Execute a File";
txtprop2.value=(unsigned char *)"ExecuteCmd";
txtprop2.encoding=txtprop1.encoding=XA_STRING;
txtprop2.format=txtprop1.format=8;
txtprop1.nitems=strlen((char *)txtprop1.value);
txtprop2.nitems=strlen((char *)txtprop2.value);
XSetWMProperties(dpy, mainwin, &txtprop1, &txtprop2, argv, argc,
&size_hints, NULL, NULL);
XMapSubwindows(dpy, mainwin);
XMapRaised(dpy, mainwin);
for(;;) {
XEvent event;
XNextEvent(dpy, &event);
#ifdef USE_FONTSETS
if(!XFilterEvent(&event, mainwin))
#endif
switch(event.type) {
case Expose:
if(!event.xexpose.count)
if(event.xexpose.window == mainwin)
refresh_main();
else if(event.xexpose.window == strwin)
refresh_str();
else if(event.xexpose.window == ok)
refresh_button(ok, ok_txt, 1);
else if(event.xexpose.window == cancel)
refresh_button(cancel, cancel_txt, 2);
case LeaveNotify:
if(depressed && event.xcrossing.window==button[selected]) {
depressed=0;
toggle(selected);
}
break;
case EnterNotify:
if((!depressed) && selected && event.xcrossing.window==button[selected]) {
depressed=1;
toggle(selected);
}
break;
case ButtonPress:
if(event.xbutton.button==Button1) {
if(stractive && event.xbutton.window!=strwin) {
stractive=0;
refresh_str();
}
if((c=getchoice(event.xbutton.window))) {
abortchoice();
depressed=1;
toggle(selected=c);
} else if(event.xbutton.window==strwin)
strbutton(&event.xbutton);
}
break;
case ButtonRelease:
if(event.xbutton.button==Button1 && selected)
if(depressed)
endchoice();
else
abortchoice();
break;
case KeyPress:
if(stractive)
strkey(&event.xkey);
}
}
}

591
frame.c Normal file
View File

@@ -0,0 +1,591 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#ifdef HAVE_X11_EXTENSIONS_SHAPE_H
#include <X11/extensions/shape.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "drawinfo.h"
#include "screen.h"
#include "icon.h"
#include "client.h"
#include "icc.h"
#include "prefs.h"
#include "module.h"
#include "libami.h"
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
#define mx(a,b) ((a)>(b)?(a):(b))
extern Display *dpy;
extern XContext client_context, screen_context;
extern Cursor wm_curs;
extern int shape_extn;
extern void redrawmenubar(Window);
void reshape_frame(Client *c);
Window creategadget(Client *c, Window p, int x, int y, int w, int h)
{
XSetWindowAttributes attr;
Window r;
attr.override_redirect=True;
attr.background_pixel=scr->dri.dri_Pens[BACKGROUNDPEN];
r=XCreateWindow(dpy, p, x, y, w, h, 0, CopyFromParent, InputOutput,
CopyFromParent, CWOverrideRedirect|CWBackPixel, &attr);
XSelectInput(dpy, r, ExposureMask|ButtonPressMask|ButtonReleaseMask|
EnterWindowMask|LeaveWindowMask);
XSaveContext(dpy, r, client_context, (XPointer)c);
return r;
}
void spread_top_gadgets(Client *c)
{
int w=c->pwidth;
w-=23; XMoveWindow(dpy, c->depth, w, 0);
if(c->zoom) {
w-=23; XMoveWindow(dpy, c->zoom, w, 0);
}
if(c->iconify) {
w-=23; XMoveWindow(dpy, c->iconify, w, 0);
}
XResizeWindow(dpy, c->drag, c->dragw=mx(4, w-19), scr->bh);
}
void setclientborder(Client *c, int old, int new)
{
int wc=0;
int x=c->x, y=c->y, oldpw=c->pwidth, oldph=c->pheight;
old&=(Psizeright|Psizebottom|Psizetrans);
new&=(Psizeright|Psizebottom|Psizetrans);
if(new!=old) {
if((new & Psizeright)&&!(old & Psizeright))
{ c->pwidth+=14; wc++; }
else if((old & Psizeright)&&!(new & Psizeright))
{ c->pwidth-=14; wc++; }
if((new & Psizebottom)&&!(old & Psizebottom))
c->pheight+=8;
else if((old & Psizebottom)&&!(new & Psizebottom))
c->pheight-=8;
XResizeWindow(dpy, c->parent, c->pwidth, c->pheight);
if(c->resize)
XMoveWindow(dpy, c->resize, c->pwidth-18, c->pheight-10);
if(wc)
spread_top_gadgets(c);
}
c->proto = (c->proto&~(Psizeright|Psizebottom|Psizetrans)) | new;
c->framewidth=((new&Psizeright)?22:8);
c->frameheight=scr->bh+((new&Psizebottom)?10:2);
if(c->gravity==EastGravity || c->gravity==NorthEastGravity ||
c->gravity==SouthEastGravity)
x-=(c->pwidth-oldpw);
if(c->gravity==SouthGravity || c->gravity==SouthEastGravity ||
c->gravity==SouthWestGravity)
y-=(c->pheight-oldph);
if(x!=c->x || y!=c->y)
XMoveWindow(dpy, c->parent, c->x=x, c->y=y);
}
void resizeclientwindow(Client *c, int width, int height)
{
if(width!=c->pwidth || height!=c->pheight) {
int old_width=c->pwidth;
XResizeWindow(dpy, c->parent, c->pwidth=width, c->pheight=height);
if(width!=old_width)
spread_top_gadgets(c);
if(c->resize)
XMoveWindow(dpy, c->resize, c->pwidth-18, c->pheight-10);
XResizeWindow(dpy, c->window, c->pwidth-c->framewidth, c->pheight-c->frameheight);
if(c->shaped)
reshape_frame(c);
sendconfig(c);
}
}
static int resizable(XSizeHints *xsh)
{
int r=0;
if(xsh->width_inc) {
if(xsh->min_width+xsh->width_inc<=xsh->max_width)
r++;
}
if(xsh->height_inc) {
if(xsh->min_height+xsh->height_inc<=xsh->max_height)
r+=2;
}
return r;
}
extern unsigned int meta_mask;
void reshape_frame(Client *c)
{
XRectangle r;
#ifdef HAVE_XSHAPE
if(!shape_extn)
return;
XShapeCombineShape(dpy, c->parent, ShapeBounding, 4, c->scr->bh, c->window,
ShapeBounding, ShapeSet);
r.x = 0;
r.y = 0;
r.width = c->pwidth;
r.height = c->scr->bh;
XShapeCombineRectangles(dpy, c->parent, ShapeBounding,
0, 0, &r, 1, ShapeUnion, Unsorted);
if(c->proto & Psizeright) {
r.x = c->pwidth-18;
r.y = 0;
r.width = 18;
r.height = c->pheight;
XShapeCombineRectangles(dpy, c->parent, ShapeBounding,
0, 0, &r, 1, ShapeUnion, Unsorted);
}
if(c->proto & Psizebottom) {
r.x = 0;
r.y = c->pheight-10;
r.width = c->pwidth;
r.height = 10;
XShapeCombineRectangles(dpy, c->parent, ShapeBounding,
0, 0, &r, 1, ShapeUnion, Unsorted);
}
#endif
}
void redrawclient(Client *);
void reparent(Client *c)
{
XWindowAttributes attr;
XSetWindowAttributes attr2;
XTextProperty screen_prop;
Scrn *s=scr;
int cb;
Window leader;
Client *lc;
struct mcmd_keygrab *kg;
extern struct mcmd_keygrab *keygrabs;
char **cargv = NULL;
int cargc;
if(XGetTransientForHint(dpy, c->window, &leader) &&
!XFindContext(dpy, leader, client_context, (XPointer *)&lc))
c->scr = lc->scr;
else if(XGetTextProperty(dpy, c->window, &screen_prop, amiwm_screen)) {
do {
if(s->root == scr->root &&
(!s->deftitle[screen_prop.nitems])&&!strncmp(s->deftitle,
(char *)screen_prop.value, screen_prop.nitems))
break;
s=s->behind;
} while(s!=scr);
XFree(screen_prop.value);
c->scr=s;
} else if(XGetCommand(dpy, c->window, &cargv, &cargc)) {
XrmDatabase db = (XrmDatabase)NULL;
XrmValue value;
char *str_type;
static XrmOptionDescRec table [] = {
{"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL},
};
XrmParseCommand(&db, table, 1, "amiwm", &cargc, cargv);
if(XrmGetResource(db, "amiwm.screen", "Amiwm.Screen",
&str_type, &value) == True &&
value.size != 0) {
do {
if(s->root == scr->root &&
(!s->deftitle[value.size])&&!strncmp(s->deftitle, value.addr,
value.size))
break;
s=s->behind;
} while(s!=scr);
c->scr=s;
}
XrmDestroyDatabase (db);
}
scr=c->scr;
if(c->parent && c->parent != scr->root)
return;
getproto(c);
getwflags(c);
XAddToSaveSet(dpy, c->window);
XGetWindowAttributes(dpy, c->window, &attr);
c->colormap = attr.colormap;
c->old_bw = attr.border_width;
c->framewidth=8;
c->frameheight=scr->bh+2;
attr2.override_redirect=True;
grav_map_win_to_frame(c, attr.x, attr.y, &c->x, &c->y);
c->parent=XCreateWindow(dpy, scr->back, c->x, c->y,
c->pwidth=attr.width+8, c->pheight=attr.height+2+scr->bh,
0, CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect, &attr2);
XSaveContext(dpy, c->parent, client_context, (XPointer)c);
XSaveContext(dpy, c->parent, screen_context, (XPointer)c->scr);
XSetWindowBackground(dpy, c->parent, scr->dri.dri_Pens[BACKGROUNDPEN]);
XSetWindowBorderWidth(dpy, c->window, 0);
XReparentWindow(dpy, c->window, c->parent, 4, scr->bh);
XSelectInput(dpy, c->window, EnterWindowMask | LeaveWindowMask |
ColormapChangeMask | PropertyChangeMask |
(c->module? SubstructureNotifyMask:0));
#ifdef HAVE_XSHAPE
if(shape_extn)
XShapeSelectInput(dpy, c->window, ShapeNotifyMask);
#endif
XSelectInput(dpy, c->parent, SubstructureRedirectMask |
SubstructureNotifyMask | StructureNotifyMask | ExposureMask |
EnterWindowMask | LeaveWindowMask | ButtonPressMask);
for(kg=keygrabs; kg; kg=kg->next)
XGrabKey(dpy, kg->keycode, kg->modifiers, c->window, False, GrabModeAsync,
GrabModeAsync);
cb=(resizable(&c->sizehints)? prefs.sizeborder:0);
c->close=creategadget(c, c->parent, 0, 0, 19, scr->bh);
c->drag=creategadget(c, c->parent, 19, 0, 1, 1);
if(c->wflags&WF_NOICONIFY)
c->iconify=None;
else
c->iconify=creategadget(c, c->parent, 0, 0, 23, scr->bh);
if(cb)
c->zoom=creategadget(c, c->parent, 0, 0, 23, scr->bh);
c->depth=creategadget(c, c->parent, 0, 0, 23, scr->bh);
spread_top_gadgets(c);
setclientborder(c, 0, cb);
if(cb)
c->resize=creategadget(c, c->parent, c->pwidth-18, c->pheight-10, 18, 10);
c->shaped = 0;
#ifdef HAVE_XSHAPE
if(shape_extn) {
int xbs, ybs, cShaped, xcs, ycs;
unsigned int wbs, hbs, wcs, hcs;
XShapeQueryExtents (dpy, c->window, &c->shaped, &xbs, &ybs, &wbs, &hbs,
&cShaped, &xcs, &ycs, &wcs, &hcs);
if(c->shaped)
reshape_frame(c);
}
#endif
XMapSubwindows(dpy, c->parent);
sendconfig(c);
setstringprop(c->window, amiwm_screen, scr->deftitle);
if(prefs.focus == FOC_CLICKTOTYPE)
XGrabButton(dpy, Button1, AnyModifier, c->parent, True,
ButtonPressMask, GrabModeSync, GrabModeAsync, None, wm_curs);
}
void redraw(Client *c, Window w)
{
if(w==c->parent) {
int x, y;
x=c->pwidth-((c->proto&Psizeright)?18:4);
y=c->pheight-((c->proto&Psizebottom)?10:2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, c->pwidth-1, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, c->pheight-1);
XDrawLine(dpy, w, scr->gc, 4, y, x, y);
XDrawLine(dpy, w, scr->gc, x, scr->bh, x, y);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 1, c->pheight-1, c->pwidth-1, c->pheight-1);
XDrawLine(dpy, w, scr->gc, c->pwidth-1, 1, c->pwidth-1, c->pheight-1);
XDrawLine(dpy, w, scr->gc, 3, scr->bh-1, 3, y);
XDrawLine(dpy, w, scr->gc, 3, scr->bh-1, x, scr->bh-1);
} else if(w==c->close) {
if(c->active) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]);
XFillRectangle(dpy, w, scr->gc, 7, scr->h3, 4, scr->h7-scr->h3);
}
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->gc, 7, scr->h3, 4, scr->h7-scr->h3);
if(c->clicked==w) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, 18, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, scr->bh-2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, scr->bh-1, 18, scr->bh-1);
XDrawLine(dpy, w, scr->gc, 18, 1, 18, scr->bh-1);
} else {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, 18, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, scr->bh-1);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 1, scr->bh-1, 18, scr->bh-1);
XDrawLine(dpy, w, scr->gc, 18, 1, 18, scr->bh-1);
}
} else if(w==c->drag) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->active?FILLTEXTPEN:TEXTPEN]);
XSetBackground(dpy, scr->gc, scr->dri.dri_Pens[c->active?FILLPEN:BACKGROUNDPEN]);
#ifdef USE_FONTSETS
if(c->title)
XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, scr->gc,
11, 1+scr->dri.dri_Ascent,
c->title, strlen(c->title));
#else
if(c->title.value)
XDrawImageString(dpy, w, scr->gc, 11, 1+scr->dri.dri_Ascent,
(char *)c->title.value, c->title.nitems);
#endif
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, c->dragw-1, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, scr->bh-2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 0, scr->bh-1, c->dragw-1, scr->bh-1);
XDrawLine(dpy, w, scr->gc, c->dragw-1, 1, c->dragw-1, scr->bh-1);
} else if(w==c->iconify) {
if(c->active) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]);
XFillRectangle(dpy, w, scr->gc, 7, scr->h8-4, 4, 2);
}
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->gc, 7, scr->h8-4, 4, 2);
if(c->clicked==w) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->active? FILLPEN:BACKGROUNDPEN]);
XDrawRectangle(dpy, w, scr->gc, 5, scr->h2, 12, scr->h8-scr->h2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->gc, 5, scr->h8-(scr->bh>11? 7:6), 9, (scr->bh>11? 7:6));
} else {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->active? FILLPEN:BACKGROUNDPEN]);
XDrawRectangle(dpy, w, scr->gc, 5, scr->h8-(scr->bh>11? 7:6), 9, (scr->bh>11? 7:6));
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->gc, 5, scr->h2, 12, scr->h8-scr->h2);
}
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->clicked==w?SHADOWPEN:SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, 22, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, scr->bh-2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->clicked==w?SHINEPEN:SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 0, scr->bh-1, 22, scr->bh-1);
XDrawLine(dpy, w, scr->gc, 22, 0, 22, scr->bh-1);
} else if(w==c->zoom) {
if(c->active) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->clicked==w? SHINEPEN:FILLPEN]);
XFillRectangle(dpy, w, scr->gc, 5, scr->h2, 12, scr->h8-scr->h2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->clicked==w? FILLPEN:SHINEPEN]);
XFillRectangle(dpy, w, scr->gc, 6, scr->h2, 5, scr->h5-scr->h2);
}
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->gc, 6, scr->h2, 5, scr->h5-scr->h2);
XDrawRectangle(dpy, w, scr->gc, 5, scr->h2, 7, scr->h5-scr->h2);
XDrawRectangle(dpy, w, scr->gc, 5, scr->h2, 12, scr->h8-scr->h2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->clicked==w? SHADOWPEN:SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, 22, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, scr->bh-2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->clicked==w? SHINEPEN:SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 0, scr->bh-1, 22, scr->bh-1);
XDrawLine(dpy, w, scr->gc, 22, 0, 22, scr->bh-1);
} else if(w==c->depth) {
if(c->active) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[BACKGROUNDPEN]);
XFillRectangle(dpy, w, scr->gc, 4, scr->h2, 10, scr->h6-scr->h2);
}
if(c->clicked!=w) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->gc, 4, scr->h2, 10, scr->h6-scr->h2);
}
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->active?SHINEPEN:BACKGROUNDPEN]);
XFillRectangle(dpy, w, scr->gc, 8, scr->h4, 10, scr->h8-scr->h4);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->gc, 8, scr->h4, 10, scr->h8-scr->h4);
if(c->clicked==w)
XDrawRectangle(dpy, w, scr->gc, 4, scr->h2, 10, scr->h6-scr->h2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->clicked==w? SHADOWPEN:SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, 22, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, scr->bh-2);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->clicked==w? SHINEPEN:SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 0, scr->bh-1, 22, scr->bh-1);
XDrawLine(dpy, w, scr->gc, 22, 0, 22, scr->bh-1);
} else if(w==c->resize) {
static XPoint points[]={{4,6},{13,2},{14,2},{14,7},{4,7}};
if(c->active) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]);
XFillPolygon(dpy, w, scr->gc, points, sizeof(points)/sizeof(points[0]), Convex, CoordModeOrigin);
}
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawLines(dpy, w, scr->gc, points, sizeof(points)/sizeof(points[0]), CoordModeOrigin);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, 16, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, 8);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 0, 9, 17, 9);
XDrawLine(dpy, w, scr->gc, 17, 0, 17, 9);
}
}
void redrawclient(Client *c)
{
unsigned long bgpix;
scr=c->scr;
if((!c->parent) || c->parent == scr->root)
return;
bgpix=scr->dri.dri_Pens[c->active?FILLPEN:BACKGROUNDPEN];
XSetWindowBackground(dpy, c->parent, bgpix);
XSetWindowBackground(dpy, c->close, bgpix);
XSetWindowBackground(dpy, c->drag, bgpix);
if(c->iconify)
XSetWindowBackground(dpy, c->iconify, bgpix);
if(c->zoom)
XSetWindowBackground(dpy, c->zoom, bgpix);
XSetWindowBackground(dpy, c->depth, bgpix);
if(c->resize)
XSetWindowBackground(dpy, c->resize, bgpix);
XClearWindow(dpy, c->parent);
XClearWindow(dpy, c->close);
XClearWindow(dpy, c->drag);
if(c->iconify)
XClearWindow(dpy, c->iconify);
if(c->zoom)
XClearWindow(dpy, c->zoom);
XClearWindow(dpy, c->depth);
if(c->resize)
XClearWindow(dpy, c->resize);
redraw(c, c->parent);
redraw(c, c->close);
redraw(c, c->drag);
if(c->iconify)
redraw(c, c->iconify);
if(c->zoom)
redraw(c, c->zoom);
redraw(c, c->depth);
if(c->resize)
redraw(c, c->resize);
}
extern Client *clickclient;
extern Window clickwindow;
extern Scrn *mbdclick, *mbdscr;
void clickenter()
{
if((scr=mbdscr)&& clickwindow == scr->menubardepth) {
mbdclick = scr;
redrawmenubar(scr->menubardepth);
} else {
scr = clickclient->scr;
redraw(clickclient, clickclient->clicked=clickwindow);
}
}
void clickleave()
{
if((scr=mbdscr)&& clickwindow == scr->menubardepth) {
mbdclick = NULL;
redrawmenubar(scr->menubardepth);
} else {
scr = clickclient->scr;
clickclient->clicked=None;
redraw(clickclient, clickwindow);
}
}
void gadgetclicked(Client *c, Window w, XEvent *e)
{
scr=c->scr;
redraw(c, clickwindow=(clickclient=c)->clicked=w);
}
void gadgetaborted(Client *c)
{
Window w;
scr=c->scr;
if((w=c->clicked)) {
c->clicked=None;
redraw(c, w);
}
clickwindow=None;
clickclient=NULL;
}
static Client *topmostmappedclient(Window *children, unsigned int nchildren)
{
int n;
Client *c;
for(n=nchildren-1; n>=0; --n)
if((!XFindContext(dpy, children[n], client_context, (XPointer*)&c)) &&
(children[n]==c->parent || children[n]==c->window) &&
c->state==NormalState)
return c;
return NULL;
}
static Client *bottommostmappedclient(Window *children, unsigned int nchildren)
{
int n;
Client *c;
for(n=0; n<nchildren; n++)
if((!XFindContext(dpy, children[n], client_context, (XPointer*)&c)) &&
children[n]==c->parent && c->state==NormalState)
return c;
return NULL;
}
void raiselowerclient(Client *c, int place)
{
Window r,p,*children;
unsigned int nchildren;
if(place!=PlaceOnTop &&
XQueryTree(dpy, scr->back, &r, &p, &children, &nchildren)) {
if(place==PlaceOnBottom || topmostmappedclient(children, nchildren)==c) {
Client *c2 = bottommostmappedclient(children, nchildren);
if(c2 != NULL && c2 != c) {
Window ws[2];
ws[0]=c2->parent;
ws[1]=c->parent;
XRestackWindows(dpy, ws, 2);
} else if(place!=PlaceOnBottom)
XRaiseWindow(dpy, c->parent);
} else
XRaiseWindow(dpy, c->parent);
if(children) XFree(children);
} else XRaiseWindow(dpy, c->parent);
}
void gadgetunclicked(Client *c, XEvent *e)
{
extern void adjusticon(Icon *);
Window w;
scr=c->scr;
if((w=c->clicked)) {
c->clicked=None;
redraw(c, w);
if(w==c->close) {
if((c->proto & Pdelete)&&!(e->xbutton.state&ShiftMask))
sendcmessage(c->window, wm_protocols, wm_delete);
else
XKillClient(dpy, c->window);
} else if(w==c->depth)
raiselowerclient(c, -1);
else if(w==c->zoom) {
XWindowAttributes xwa;
XGetWindowAttributes(dpy, c->parent, &xwa);
XMoveWindow(dpy, c->parent, c->x=c->zoomx, c->y=c->zoomy);
resizeclientwindow(c, c->zoomw+c->framewidth, c->zoomh+c->frameheight);
c->zoomx=xwa.x;
c->zoomy=xwa.y;
c->zoomw=xwa.width-c->framewidth;
c->zoomh=xwa.height-c->frameheight;
/* XWarpPointer(dpy, None, c->zoom, 0, 0, 0, 0, 23/2, scr->h5); */
sendconfig(c);
} else if(w==c->iconify) {
if(!(c->icon))
createicon(c);
XUnmapWindow(dpy, c->parent);
/* XUnmapWindow(dpy, c->window); */
adjusticon(c->icon);
XMapWindow(dpy, c->icon->window);
if(c->icon->labelwidth)
XMapWindow(dpy, c->icon->labelwin);
c->icon->mapped=1;
setclientstate(c, IconicState);
}
}
clickwindow=None;
clickclient=NULL;
}

184
gnome.c Normal file
View File

@@ -0,0 +1,184 @@
/* GNOME Window Manager Compliance support for amiwm
by Peter Bortas february 2000 */
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
extern void gnome_setup()
{
/* Section 1 - Detection of a GNOME compliant Window Manager
There is a single unambiguous way to detect if there currently is
a GNOME compliant Window Manager running. It is the job of the
Window Manager to set up a few things to make this
possible. Using the following method it is also possible for
applications to detect compliance by receiving an event when the
Window Manager exits.
To do this the Window Manager should create a Window, that is a
child of the root window. There is no need to map it, just create
it. The Window Manager may reuse ANY window it has for this
purpose - even if it is mapped, just as long as the window is
never destroyed while the Window Manager is running.
Once the Window is created the Window Manager should set a
property on the root window of the name _WIN_SUPPORTING_WM_CHECK,
and type CARDINAL. The atom's data would be a CARDINAL that is
the Window ID of the window that was created above. The window
that was created would ALSO have this property set on it with the
same values and type.*/
Display *disp;
Window root_window;
Atom atom_set;
CARD32 val;
Window win;
Atom list[10];
atom_set = XInternAtom(disp, "_WIN_SUPPORTING_WM_CHECK", False);
win = XCreateSimpleWindow(disp, root_window, -200, -200, 5, 5, 0, 0, 0);
val = win;
XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)&val, 1);
XChangeProperty(disp, win, atom_set, XA_CARDINAL, 32, PropModeReplace,
(unsigned char *)&val, 1);
/* Section 2 - Listing GNOME Window Manager Compliance
It is important to list which parts of GNOME Window Manager
compliance are supported. This is done fairly easily by doing the
following:
Create a property on the root window of the atom name
_WIN_PROTOCOLS. This property contains a list(array)of atoms that
are all the properties the Window Manager supports. These atoms
are any number of the following:
_WIN_LAYER
_WIN_STATE
_WIN_HINTS
_WIN_APP_STATE
_WIN_EXPANDED_SIZE
_WIN_ICONS
_WIN_WORKSPACE
_WIN_WORKSPACE_COUNT
_WIN_WORKSPACE_NAMES
_WIN_CLIENT_LIST
If you list one of these properties then you support it and
applications can expect information provided by, or accepted by
the Window Manager to work. */
atom_set = XInternAtom(disp, "_WIN_PROTOCOLS", False);
list[0] = XInternAtom(disp, "_WIN_LAYER", False);
list[1] = XInternAtom(disp, "_WIN_STATE", False);
list[2] = XInternAtom(disp, "_WIN_HINTS", False);
list[3] = XInternAtom(disp, "_WIN_APP_STATE", False);
list[4] = XInternAtom(disp, "_WIN_EXPANDED_SIZE", False);
list[5] = XInternAtom(disp, "_WIN_ICONS", False);
list[6] = XInternAtom(disp, "_WIN_WORKSPACE", False);
list[7] = XInternAtom(disp, "_WIN_WORKSPACE_COUNT", False);
list[8] = XInternAtom(disp, "_WIN_WORKSPACE_NAMES", False);
list[9] = XInternAtom(disp, "_WIN_CLIENT_LIST", False);
XChangeProperty(disp, root_window, atom_set, XA_ATOM, 32, PropModeReplace,
(unsigned char *)list, 10);
}
extern void gnome_managed_clients()
{
/* Section 3 - Providing Shortcuts Managed Clients
As an aide in having external applications be able to list and
access clients being managed by the Window Manager, a property
should be set on the root window of the name _WIN_CLIENT_LIST
which is an array of type CARDINAL. Each entry is the Window ID
of a managed client. If the list of managed clients changes,
clients are added or deleted, this list should be updated. */
Display *disp;
Window root_window;
Atom atom_set;
Window *wl;
int num;
fprintf(stderr, "FIXME: snome_managed_clients is a stub\n");
atom_set = XInternAtom(disp, "_WIN_CLIENT_LIST", False);
num = 0; /* FIXME: number of clients goes here */
wl = malloc(sizeof(Window) * num);
/* FIXME: Fill in array of window ID's */
XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)wl, num);
if (wl)
free(wl);
}
extern void gnome_multiple_desktops()
{
/* Section 3 - Providing Multiple/Virtual Desktop Information.
If your Window Manager supports the concept of Multiple/Virtual
Desktops or Workspaces then you will definitely want to include
it. This involves your Window Manager setting several properties
on the root window.
First you should advertise how many Desktops your Window Manager
supports. This is done by setting a property on the root window
with the atom name _WIN_WORKSPACE_COUNT of type CARDINAL. The
properties data is a 32-bit integer that is the number of
Desktops your Window Manager currently supports. If you can add
and delete desktops while running, you may change this property
and its value whenever required. You should also set a property
of the atom _WIN_WORKSPACE of type CARDINAL that contains the
number of the currently active desktop (which is a number between
0 and the number advertised by _WIN_WORKSPACE_COUNT -
1). Whenever the active desktop changes, change this property.
Lastly you should set a property that is a list of strings called
_WIN_WORKSPACE_NAMES that contains names for the desktops (the
first string is the name of the first desktop, the second string
is the second desktop, etc.). This will allow applications toq
know what the name of the desktop is too, possibly to display it. */
Display *disp;
Window root_window;
Atom atom_set;
XTextProperty text;
int i, current_desk, number_of_desks;
char **names, s[1024];
CARD32 val;
/* FIXME: set current_desk, number_of_desks names */
atom_set = XInternAtom(disp, "_WIN_WORKSPACE", False);
val = (CARD32) current_desk;
XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)&val, 1);
atom_set = XInternAtom(disp, "_WIN_WORKSPACE_COUNT", False);
val = (CARD32) number_of_desks;
XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)&val, 1);
atom_set = XInternAtom(disp, "_WIN_WORKSPACE_NAMES", False);
names = malloc(sizeof(char *) * number_of_desks);
for (i = 0; i < number_of_desks; i++)
{
snprintf(s, sizeof(s), "Desktop %i", i);
names[i] = malloc(strlen(s) + 1);
strcpy(names[i], s);
}
if (XStringListToTextProperty(names, mode.numdesktops, ))
{
XSetTextProperty(disp, root_window, &val, atom_set);
XFree(text.value);
}
for (i = 0; i < number_of_desks; i++)
free(names[i]);
free(names);
}

2101
gram.c Normal file

File diff suppressed because it is too large Load Diff

195
gram.h Normal file
View File

@@ -0,0 +1,195 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
ERRORTOKEN = 258,
LEFTBRACE = 259,
RIGHTBRACE = 260,
YES = 261,
NO = 262,
RIGHT = 263,
BOTTOM = 264,
BOTH = 265,
NONE = 266,
MAGICWB = 267,
SYSTEM = 268,
SCHWARTZ = 269,
ALWAYS = 270,
AUTO = 271,
MANUAL = 272,
SEPARATOR = 273,
T_DETAILPEN = 274,
T_BLOCKPEN = 275,
T_TEXTPEN = 276,
T_SHINEPEN = 277,
T_SHADOWPEN = 278,
T_FILLPEN = 279,
T_FILLTEXTPEN = 280,
T_BACKGROUNDPEN = 281,
T_HIGHLIGHTTEXTPEN = 282,
T_BARDETAILPEN = 283,
T_BARBLOCKPEN = 284,
T_BARTRIMPEN = 285,
FASTQUIT = 286,
SIZEBORDER = 287,
DEFAULTICON = 288,
ICONDIR = 289,
ICONPALETTE = 290,
SCREENFONT = 291,
ICONFONT = 292,
TOOLITEM = 293,
FORCEMOVE = 294,
SCREEN = 295,
MODULE = 296,
MODULEPATH = 297,
INTERSCREENGAP = 298,
AUTORAISE = 299,
FOCUS = 300,
FOLLOWMOUSE = 301,
CLICKTOTYPE = 302,
SLOPPY = 303,
CUSTOMICONSONLY = 304,
TITLEBARCLOCK = 305,
TITLECLOCKFORMAT = 306,
OPAQUEMOVE = 307,
OPAQUERESIZE = 308,
SCREENMENU = 309,
STYLE = 310,
CLASS = 311,
TITLE = 312,
ICONTITLE = 313,
ICON = 314,
SHORTLABELICONS = 315,
STRING = 316,
NUMBER = 317
};
#endif
/* Tokens. */
#define ERRORTOKEN 258
#define LEFTBRACE 259
#define RIGHTBRACE 260
#define YES 261
#define NO 262
#define RIGHT 263
#define BOTTOM 264
#define BOTH 265
#define NONE 266
#define MAGICWB 267
#define SYSTEM 268
#define SCHWARTZ 269
#define ALWAYS 270
#define AUTO 271
#define MANUAL 272
#define SEPARATOR 273
#define T_DETAILPEN 274
#define T_BLOCKPEN 275
#define T_TEXTPEN 276
#define T_SHINEPEN 277
#define T_SHADOWPEN 278
#define T_FILLPEN 279
#define T_FILLTEXTPEN 280
#define T_BACKGROUNDPEN 281
#define T_HIGHLIGHTTEXTPEN 282
#define T_BARDETAILPEN 283
#define T_BARBLOCKPEN 284
#define T_BARTRIMPEN 285
#define FASTQUIT 286
#define SIZEBORDER 287
#define DEFAULTICON 288
#define ICONDIR 289
#define ICONPALETTE 290
#define SCREENFONT 291
#define ICONFONT 292
#define TOOLITEM 293
#define FORCEMOVE 294
#define SCREEN 295
#define MODULE 296
#define MODULEPATH 297
#define INTERSCREENGAP 298
#define AUTORAISE 299
#define FOCUS 300
#define FOLLOWMOUSE 301
#define CLICKTOTYPE 302
#define SLOPPY 303
#define CUSTOMICONSONLY 304
#define TITLEBARCLOCK 305
#define TITLECLOCKFORMAT 306
#define OPAQUEMOVE 307
#define OPAQUERESIZE 308
#define SCREENMENU 309
#define STYLE 310
#define CLASS 311
#define TITLE 312
#define ICONTITLE 313
#define ICON 314
#define SHORTLABELICONS 315
#define STRING 316
#define NUMBER 317
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
#line 50 "gram.y" /* yacc.c:1909 */
int num;
char *ptr;
#line 183 "y.tab.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
extern YYSTYPE yylval;
int yyparse (void);
#endif /* !YY_YY_Y_TAB_H_INCLUDED */

205
gram.y Normal file
View File

@@ -0,0 +1,205 @@
%{
#include <X11/Xlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "prefs.h"
#include "drawinfo.h"
#include "screen.h"
#include "icc.h"
#include "style.h"
extern void set_sys_palette(void);
extern void set_mwb_palette(void);
extern void set_schwartz_palette(void);
extern void set_custom_palette(char *fn);
extern void add_toolitem(char *, char *, char *, int);
extern Scrn *openscreen(char *, Window);
extern void create_module(Scrn *, char *, char *);
extern char *default_colors[NUMDRIPENS];
extern char *default_screenfont, *label_font_name;
extern Display *dpy;
#ifndef HAVE_ALLOCA
#define alloca malloc
#endif
#ifndef HAVE_STRDUP
char *strdup(s) char *s;
{
char *ptr=(char *)malloc(strlen(s)+1);
if(ptr) strcpy(ptr, s);
return ptr;
}
#endif
static void append_to(char **x, char *y)
{
if(*x==NULL)
*x=y;
else {
char *t = malloc(strlen(y)+strlen(*x)+2);
sprintf(t, "%s\n%s", *x, y);
free(*x);
free(y);
*x=t;
}
}
static int ti_level=0;
%}
%union
{
int num;
char *ptr;
};
%token <num> ERRORTOKEN LEFTBRACE RIGHTBRACE
%token <num> YES NO
%token <num> RIGHT BOTTOM BOTH NONE
%token <num> MAGICWB SYSTEM SCHWARTZ
%token <num> ALWAYS AUTO MANUAL
%token <num> SEPARATOR
%token <num> T_DETAILPEN T_BLOCKPEN T_TEXTPEN T_SHINEPEN T_SHADOWPEN
%token <num> T_FILLPEN T_FILLTEXTPEN T_BACKGROUNDPEN T_HIGHLIGHTTEXTPEN
%token <num> T_BARDETAILPEN T_BARBLOCKPEN T_BARTRIMPEN
%token <num> FASTQUIT SIZEBORDER DEFAULTICON ICONDIR ICONPALETTE SCREENFONT
%token <num> ICONFONT TOOLITEM FORCEMOVE SCREEN MODULE MODULEPATH
%token <num> INTERSCREENGAP AUTORAISE FOCUS FOLLOWMOUSE CLICKTOTYPE SLOPPY
%token <num> CUSTOMICONSONLY
%token <num> TITLEBARCLOCK TITLECLOCKFORMAT
%token <num> OPAQUEMOVE OPAQUERESIZE SCREENMENU STYLE CLASS TITLE ICONTITLE ICON
%token <num> SHORTLABELICONS
%token <ptr> STRING
%token <num> NUMBER
%type <num> truth sizeborder dri_pen forcemove_policy focuspolicy
%type <ptr> string
%start amiwmrc
%%
amiwmrc : stmts
;
stmts : stmts stmt
|
;
stmt : error
| toolitem
| toolsubmenu toolitems RIGHTBRACE { ti_level=0; }
| FASTQUIT truth { prefs.fastquit = $2; }
| SIZEBORDER sizeborder { prefs.sizeborder = $2; }
| DEFAULTICON string { prefs.defaulticon = $2; }
| ICONDIR string { prefs.icondir = $2; }
| ICONPALETTE SYSTEM { set_sys_palette(); }
| ICONPALETTE MAGICWB { set_mwb_palette(); }
| ICONPALETTE SCHWARTZ { set_schwartz_palette(); }
| ICONPALETTE STRING { set_custom_palette($2); }
| dri_pen string { default_colors[$1] = $2; }
| SCREENFONT string { default_screenfont = $2; }
| ICONFONT string { label_font_name = $2; }
| FORCEMOVE forcemove_policy { prefs.forcemove = $2; }
| SCREEN string { openscreen($2,DefaultRootWindow(dpy)); }
| SCREEN NUMBER string { if(($2==DefaultScreen(dpy)||prefs.manage_all) && $2<ScreenCount(dpy)) openscreen($3,RootWindow(dpy,$2)); }
| MODULEPATH string { prefs.module_path = $2; }
| MODULE string STRING { create_module((front? front->upfront:NULL), $2, $3); }
| MODULE string { create_module((front? front->upfront:NULL), $2, NULL); }
| INTERSCREENGAP NUMBER { prefs.borderwidth=$2; }
| AUTORAISE truth { prefs.autoraise=$2; }
| OPAQUEMOVE truth { prefs.opaquemove=$2; }
| OPAQUERESIZE truth { prefs.opaqueresize=$2; }
| FOCUS focuspolicy { prefs.focus=$2; }
| CUSTOMICONSONLY truth { prefs.customiconsonly = $2; }
| SHORTLABELICONS truth { prefs.shortlabelicons = $2; }
| TITLEBARCLOCK truth { prefs.titlebarclock = $2; }
| TITLECLOCKFORMAT string { prefs.titleclockformat = $2; }
| TITLECLOCKFORMAT NUMBER string {
prefs.titleclockinterval=$2;
prefs.titleclockformat=$3; }
| SCREENMENU truth { prefs.screenmenu=$2; }
| stylespec styleitems RIGHTBRACE
;
toolsubmenu : TOOLITEM string LEFTBRACE { add_toolitem($2, NULL, NULL, -1); ti_level=1; }
;
toolitems : toolitems toolitem
|
;
toolitem : TOOLITEM string string { add_toolitem($2, $3, NULL, ti_level); }
| TOOLITEM string string string { add_toolitem($2, $3, $4, ti_level); }
| TOOLITEM SEPARATOR { add_toolitem(NULL, NULL, NULL, ti_level); }
;
stylespec : STYLE LEFTBRACE { Style *s = malloc(sizeof(Style));
memset(s, 0, sizeof(*s));
s->next=NULL; s->style_class=NULL;
s->style_title=s->style_icon_title=NULL;
s->icon_name=NULL;
s->icon_pms.cs.colors=NULL;
s->icon_pms.cs2.colors=NULL;
if(prefs.firststyle)
prefs.laststyle->next=s;
else
prefs.firststyle=s;
prefs.laststyle=s; }
styleitems : styleitems styleitem
|
;
styleitem : CLASS string { append_to(&prefs.laststyle->style_class, $2);}
| TITLE string { append_to(&prefs.laststyle->style_title, $2);}
| ICONTITLE string { append_to(&prefs.laststyle->style_icon_title, $2);}
| ICON string { prefs.laststyle->icon_name=$2; }
string : STRING { $$ = strdup($1); }
;
truth : YES { $$ = True; }
| NO { $$ = False; }
;
sizeborder : RIGHT { $$ = Psizeright; }
| BOTTOM { $$ = Psizebottom; }
| BOTH { $$ = Psizeright|Psizebottom; }
| NONE { $$ = Psizetrans; }
| NO { $$ = Psizetrans; }
;
focuspolicy : FOLLOWMOUSE { $$ = FOC_FOLLOWMOUSE; }
| SLOPPY { $$ = FOC_SLOPPY; }
| CLICKTOTYPE { $$ = FOC_CLICKTOTYPE; }
;
dri_pen : T_DETAILPEN { $$ = DETAILPEN; }
| T_BLOCKPEN { $$ = BLOCKPEN; }
| T_TEXTPEN { $$ = TEXTPEN; }
| T_SHINEPEN { $$ = SHINEPEN; }
| T_SHADOWPEN { $$ = SHADOWPEN; }
| T_FILLPEN { $$ = FILLPEN; }
| T_FILLTEXTPEN { $$ = FILLTEXTPEN; }
| T_BACKGROUNDPEN { $$ = BACKGROUNDPEN; }
| T_HIGHLIGHTTEXTPEN { $$ = HIGHLIGHTTEXTPEN; }
| T_BARDETAILPEN { $$ = BARDETAILPEN; }
| T_BARBLOCKPEN { $$ = BARBLOCKPEN; }
| T_BARTRIMPEN { $$ = BARTRIMPEN; }
;
forcemove_policy : ALWAYS { $$ = FM_ALWAYS; }
| AUTO { $$ = FM_AUTO; }
| MANUAL { $$ = FM_MANUAL; }
;
%%
extern char *progname;
extern int ParseError;
int yyerror(s) char *s;
{
fprintf (stderr, "%s: error in input file: %s\n", progname, s ? s : "");
ParseError = 1;
return 0;
}

286
icc.c Normal file
View File

@@ -0,0 +1,286 @@
#include "drawinfo.h"
#include "screen.h"
#include "icc.h"
#include "icon.h"
#include "style.h"
#include "prefs.h"
#include <string.h>
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
extern void redraw(Client *, Window);
Atom wm_state, wm_change_state, wm_protocols, wm_delete, wm_take_focus;
Atom wm_colormaps, wm_name, wm_normal_hints, wm_hints, wm_icon_name, wm_class;
Atom amiwm_screen, swm_vroot, amiwm_wflags, amiwm_appiconmsg, amiwm_appwindowmsg;
extern Display *dpy;
void init_atoms()
{
wm_state = XInternAtom(dpy, "WM_STATE", False);
wm_change_state = XInternAtom(dpy, "WM_CHANGE_STATE", False);
wm_protocols = XInternAtom(dpy, "WM_PROTOCOLS", False);
wm_delete = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
wm_take_focus = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
wm_colormaps = XInternAtom(dpy, "WM_COLORMAP_WINDOWS", False);
wm_name = XInternAtom(dpy, "WM_NAME", False);
wm_normal_hints = XInternAtom(dpy, "WM_NORMAL_HINTS", False);
wm_hints = XInternAtom(dpy, "WM_HINTS", False);
wm_icon_name = XInternAtom(dpy, "WM_ICON_NAME", False);
wm_class = XInternAtom(dpy, "WM_CLASS", False);
amiwm_screen = XInternAtom(dpy, "AMIWM_SCREEN", False);
swm_vroot = XInternAtom(dpy, "__SWM_VROOT", False);
amiwm_wflags = XInternAtom(dpy, "AMIWM_WFLAGS", False);
amiwm_appiconmsg = XInternAtom(dpy, "AMIWM_APPICONMSG", False);
amiwm_appwindowmsg = XInternAtom(dpy, "AMIWM_APPWINDOWMSG", False);
}
void setstringprop(Window w, Atom a, char *str)
{
XTextProperty txtp;
txtp.value=(unsigned char *)str;
txtp.encoding=XA_STRING;
txtp.format=8;
txtp.nitems=strlen(str);
XSetTextProperty(dpy, w, &txtp, a);
}
XEvent *mkcmessage(Window w, Atom a, long x)
{
static XEvent ev;
memset(&ev, 0, sizeof(ev));
ev.xclient.type = ClientMessage;
ev.xclient.window = w;
ev.xclient.message_type = a;
ev.xclient.format = 32;
ev.xclient.data.l[0] = x;
ev.xclient.data.l[1] = CurrentTime;
return &ev;
}
void sendcmessage(Window w, Atom a, long x)
{
if(!(XSendEvent(dpy, w, False, 0L, mkcmessage(w, a, x))))
XBell(dpy, 100);
}
long _getprop(Window w, Atom a, Atom type, long len, char **p)
{
Atom real_type;
int format;
unsigned long n, extra;
int status;
status = XGetWindowProperty(dpy, w, a, 0L, len, False, type, &real_type, &format,
&n, &extra, (unsigned char **)p);
if (status != Success || *p == 0)
return -1;
if (n == 0)
XFree((void*) *p);
return n;
}
void getwflags(Client *c)
{
BITS32 *p;
long n;
c->wflags = 0;
if ((n = _getprop(c->window, amiwm_wflags, amiwm_wflags, 1L, (char**)&p)) <= 0)
return;
c->wflags = p[0];
XFree((char *) p);
}
void getproto(Client *c)
{
Atom *p;
int i;
long n;
Window w;
w = c->window;
c->proto &= ~(Pdelete|Ptakefocus);
if ((n = _getprop(w, wm_protocols, XA_ATOM, 20L, (char**)&p)) <= 0)
return;
for (i = 0; i < n; i++)
if (p[i] == wm_delete)
c->proto |= Pdelete;
else if (p[i] == wm_take_focus)
c->proto |= Ptakefocus;
XFree((char *) p);
}
static int stylematch_low(char *p, int l, char *m)
{
char *lf;
int ml;
--m;
do {
lf = strchr(++m, '\n');
ml = (lf? lf-m:strlen(m));
if(ml == l && !strncmp(m, p, ml))
return 1;
} while((m=lf));
return 0;
}
static int stylematch_tprop(XTextProperty *p, char *m)
{
return stylematch_low((char *)p->value, p->nitems, m);
}
#ifdef USE_FONTSETS
static int stylematch_str(char *p, char *m)
{
return stylematch_low(p, strlen(p), m);
}
#endif
void checkstyle(Client *c)
{
XTextProperty icon_name, class_name;
Style *style;
if(prefs.firststyle==NULL)
return;
if(!XGetTextProperty(dpy, c->window, &class_name, wm_class))
class_name.value=NULL;
else
/* This value seems to be 2x it's correct value always... */
class_name.nitems=strlen((char *)class_name.value);
if(!XGetWMIconName(dpy, c->window, &icon_name))
icon_name.value=NULL;
for(style=prefs.firststyle; style!=NULL; style=style->next)
if((class_name.value!=NULL && style->style_class!=NULL &&
stylematch_tprop(&class_name, style->style_class)) ||
#ifdef USE_FONTSETS
(c->title!=NULL && style->style_title!=NULL &&
stylematch_str(c->title, style->style_title)) ||
#else
(c->title.value!=NULL && style->style_title!=NULL &&
stylematch_tprop(&c->title, style->style_title)) ||
#endif
(icon_name.value!=NULL && style->style_icon_title!=NULL &&
stylematch_tprop(&icon_name, style->style_icon_title))) {
c->style = style;
break;
}
if(icon_name.value)
XFree(icon_name.value);
if(class_name.value)
XFree(class_name.value);
}
void propertychange(Client *c, Atom a)
{
extern void checksizehints(Client *);
extern void newicontitle(Client *);
if(a==wm_name) {
#ifdef USE_FONTSETS
XTextProperty prop;
if(c->title) {
free(c->title);
c->title = NULL;
}
if(XGetWMName(dpy, c->window, &prop) && prop.value) {
char **list;
int n;
if(XmbTextPropertyToTextList(dpy, &prop, &list, &n) >= Success) {
if(n > 0)
c->title = strdup(list[0]);
XFreeStringList(list);
}
XFree(prop.value);
}
#else
if(c->title.value)
XFree(c->title.value);
XGetWMName(dpy, c->window, &c->title);
#endif
if(c->style==NULL)
checkstyle(c);
if(c->drag) {
XClearWindow(dpy, c->drag);
redraw(c, c->drag);
}
} else if(a==wm_normal_hints) {
checksizehints(c);
} else if(a==wm_hints) {
XWMHints *xwmh;
if((xwmh=XGetWMHints(dpy, c->window))) {
if((xwmh->flags&(IconWindowHint|IconPixmapHint))&&c->icon) {
destroyiconicon(c->icon);
createiconicon(c->icon, xwmh);
}
if((xwmh->flags&IconPositionHint)&&c->icon&&c->icon->window) {
XMoveWindow(dpy, c->icon->window, c->icon->x=xwmh->icon_x,
c->icon->y=xwmh->icon_y);
adjusticon(c->icon);
}
XFree(xwmh);
}
} else if(a==wm_protocols) {
getproto(c);
} else if(a==wm_icon_name) {
if(c->style==NULL)
checkstyle(c);
if(c->icon) newicontitle(c);
} else if(a==wm_state) {
if(c->parent==c->scr->root) {
getstate(c);
if(c->state==NormalState)
c->state=WithdrawnState;
}
} else if(a==wm_class && c->style==NULL)
checkstyle(c);
}
void handle_client_message(Client *c, XClientMessageEvent *xcme)
{
if(xcme->message_type == wm_change_state) {
int state=xcme->data.l[0];
if(state==IconicState)
if(c->state!=IconicState) {
if(!(c->icon))
createicon(c);
XUnmapWindow(dpy, c->parent);
/* XUnmapWindow(dpy, c->window); */
adjusticon(c->icon);
XMapWindow(dpy, c->icon->window);
if(c->icon->labelwidth)
XMapWindow(dpy, c->icon->labelwin);
c->icon->mapped=1;
setclientstate(c, IconicState);
} else ;
else
if(c->state==IconicState && c->icon) {
Icon *i=c->icon;
if(i->labelwin)
XUnmapWindow(dpy, i->labelwin);
if(i->window)
XUnmapWindow(dpy, i->window);
i->mapped=0;
deselecticon(i);
XMapWindow(dpy, c->window);
if(c->parent!=c->scr->root)
XMapRaised(dpy, c->parent);
setclientstate(c, NormalState);
}
}
}

24
icc.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef ICC_H
#define ICC_H
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include "client.h"
extern void init_atoms(void);
extern void sendcmessage(Window, Atom, long);
extern void getproto(Client *c);
extern void setstringprop(Window, Atom, char *);
extern void propertychange(Client *, Atom);
extern long _getprop(Window, Atom, Atom, long, char **);
extern void getwflags(Client *);
extern Atom wm_state, wm_change_state, wm_protocols, wm_delete, wm_take_focus, wm_colormaps, wm_hints, amiwm_screen, swm_vroot;
#define Pdelete 1
#define Ptakefocus 2
#define Psizebottom 4
#define Psizeright 8
#define Psizetrans 16
#endif

637
icon.c Normal file
View File

@@ -0,0 +1,637 @@
#include <X11/Xlib.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "drawinfo.h"
#include "screen.h"
#include "icon.h"
#include "client.h"
#include "prefs.h"
#include "icc.h"
#include "style.h"
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
#define NO_ICON_POSITION (0x80000000)
extern Display *dpy;
extern char *progname;
extern XContext icon_context, client_context, screen_context;
extern void init_iconpalette();
#ifdef USE_FONTSETS
XFontSet labelfontset;
int labelfont_ascent;
#else
XFontStruct *labelfont;
#endif
char *label_font_name="-b&h-lucida-medium-r-normal-sans-10-*-*-*-*-*-iso8859-1"
#ifdef USE_FONTSETS
",-misc-fixed-medium-r-normal--10-*-*-*-*-*-iso10646-1"
#endif
;
void redrawicon(Icon *i, Window w)
{
Pixmap pm;
scr=i->scr;
if(w==i->window) {
pm=i->iconpm;
if(i->selected && i->secondpm)
pm=i->secondpm;
if(pm) {
XGCValues xgc;
Window r;
int x, y;
unsigned int w, h, bw, d;
XGetGeometry(dpy, pm, &r, &x, &y, &w, &h, &bw, &d);
if(i->maskpm) {
xgc.clip_mask = i->maskpm;
xgc.clip_x_origin = xgc.clip_y_origin = 4;
XChangeGC(dpy, scr->gc, GCClipXOrigin|GCClipYOrigin|GCClipMask, &xgc);
}
if(d!=scr->depth) {
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]);
XSetBackground(dpy, scr->gc, scr->dri.dri_Pens[BACKGROUNDPEN]);
XCopyPlane(dpy, pm, i->window, scr->gc, 0, 0,
i->width-8, i->height-8, 4, 4, 1);
}
else
XCopyArea(dpy, pm, i->window, scr->gc, 0, 0,
i->width-8, i->height-8, 4, 4);
if(i->maskpm) {
xgc.clip_mask = None;
XChangeGC(dpy, scr->gc, GCClipMask, &xgc);
}
}
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[i->selected? SHADOWPEN:SHINEPEN]);
XDrawLine(dpy, w, scr->gc, 0, 0, i->width-1, 0);
XDrawLine(dpy, w, scr->gc, 0, 0, 0, i->height-1);
XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[i->selected? SHINEPEN:SHADOWPEN]);
XDrawLine(dpy, w, scr->gc, 1, i->height-1, i->width-1, i->height-1);
XDrawLine(dpy, w, scr->gc, i->width-1, 1, i->width-1, i->height-1);
#ifdef USE_FONTSETS
} else if(w==i->labelwin && i->label) {
XmbDrawImageString(dpy, w, labelfontset, scr->icongc, 0, labelfont_ascent,
i->label, strlen(i->label));
#else
} else if(w==i->labelwin && i->label.value) {
XDrawImageString(dpy, w, scr->icongc, 0, labelfont->ascent,
(char *)i->label.value, i->label.nitems);
#endif
}
}
void selecticon(Icon *i)
{
if(!(i->selected)) {
i->nextselected = i->scr->firstselected;
i->scr->firstselected = i;
i->selected = 1;
if(i->mapped)
redrawicon(i, i->window);
}
}
void deselecticon(Icon *i)
{
Icon *i2;
if(i==i->scr->firstselected)
i->scr->firstselected = i->nextselected;
else for(i2=i->scr->firstselected; i2; i2=i2->nextselected)
if(i2->nextselected==i) {
i2->nextselected = i->nextselected;
break;
}
i->nextselected = NULL;
i->selected=0;
if(i->mapped)
redrawicon(i, i->window);
}
void deselect_all_icons(Scrn *scr)
{
while(scr->firstselected)
deselecticon(scr->firstselected);
}
void select_all_icons(Scrn *scr)
{
Icon *i;
for(i=scr->icons; i; i=i->next)
if(i->window && i->mapped)
selecticon(i);
}
void reparenticon(Icon *i, Scrn *s, int x, int y)
{
Icon **ip;
int os=i->selected;
if(s==i->scr) {
if(x!=i->x || y!=i->y)
XMoveWindow(dpy, i->window, i->x=x, i->y=y);
return;
}
if(os)
deselecticon(i);
for(ip=&i->scr->icons; *ip; ip=&(*ip)->next)
if(*ip==i) {
*ip=i->next;
break;
}
XReparentWindow(dpy, i->window, s->back, i->x=x, i->y=y);
if(i->labelwin) {
XReparentWindow(dpy, i->labelwin, s->back,
x+(i->width>>1)-(i->labelwidth>>1),
y+i->height+1);
}
i->scr=s;
i->next=s->icons;
s->icons=i;
if(i->client) {
i->client->scr=s;
if(i->client->parent != i->client->scr->root)
XReparentWindow(dpy, i->client->parent, s->back,
i->client->x, i->client->y);
setstringprop(i->client->window, amiwm_screen, s->deftitle);
sendconfig(i->client);
}
if(os)
selecticon(i);
}
void createdefaulticons()
{
Window r;
int x,y;
unsigned int b,d;
extern void load_do(const char *, struct IconPixmaps *);
init_iconpalette();
load_do(prefs.defaulticon, &scr->default_tool_pms);
if(scr->default_tool_pms.pm == None) {
fprintf(stderr, "%s: Cannot load default icon \"%s\".\n",
progname, prefs.defaulticon);
exit(1);
}
XGetGeometry(dpy, scr->default_tool_pms.pm, &r, &x, &y,
&scr->default_tool_pm_w, &scr->default_tool_pm_h, &b, &d);
}
void adjusticon(Icon *i)
{
Window w=i->window,lw=i->labelwin;
int nx, ny;
Window rt, ws[3];
Icon *i2;
int xx, yy;
unsigned int maxx, maxy, bw, dd;
scr=i->scr;
maxx=scr->width; maxy=scr->height;
if(i->parent!=scr->back)
XGetGeometry(dpy, i->parent, &rt, &xx, &yy, &maxx, &maxy, &bw, &dd);
nx=i->x; ny=i->y;
for(i2=scr->icons; i2; i2=i2->next)
if(i2->parent==i->parent && i2!=i && i2->mapped &&
nx<i2->x+i2->width && nx+i->width>i2->x &&
ny<i2->y+i2->height+scr->lh+2 && ny+i->height+scr->lh+2>i2->y) {
ny=i2->y+i2->height+scr->lh+4;
if(ny+i->height+scr->lh+1>maxy) {
nx=i2->x+i2->width+5;
if(i->parent==scr->back && nx+i->width>maxx) {
ny=maxy;
break;
} else
ny=scr->bh+4;
}
i2=scr->icons;
continue;
}
if(i->parent==scr->back) {
if(nx+i->width>maxx)
nx=maxx-i->width;
if(ny+i->height>maxy)
ny=maxy-i->height;
if(nx<0) nx=0;
if(ny<scr->bh) ny=scr->bh;
}
if(nx!=i->x || ny!=i->y)
XMoveWindow(dpy, w, i->x=nx, i->y=ny);
if(i->parent==scr->back) {
ws[0]=scr->menubar;
ws[1]=w;
ws[2]=lw;
XRestackWindows(dpy, ws, 3);
} else {
XRaiseWindow(dpy, lw);
XRaiseWindow(dpy, w);
}
XMoveWindow(dpy, lw, nx+(i->width>>1)-(i->labelwidth>>1),
ny+i->height+1);
}
void destroyiconicon(Icon *i)
{
if(i->innerwin) {
XUnmapWindow(dpy, i->innerwin);
XReparentWindow(dpy, i->innerwin, i->scr->root, i->x+4, i->y+4);
XRemoveFromSaveSet(dpy, i->innerwin);
i->innerwin=None;
}
i->iconpm = i->secondpm = i->maskpm = None;
}
static void setstdiconicon(Icon *i, unsigned int *w, unsigned int *h)
{
Style *s;
if(i->client && (s=i->client->style) && s->icon_name) {
if(s->icon_pms.pm==None) {
Window r;
int x,y;
unsigned int b,d;
extern void load_do(const char *, struct IconPixmaps *);
load_do(s->icon_name, &s->icon_pms);
if(s->icon_pms.pm == None) {
fprintf(stderr, "%s: Cannot load icon \"%s\".\n",
progname, s->icon_name);
s->icon_name = NULL;
} else
XGetGeometry(dpy, s->icon_pms.pm, &r, &x, &y,
&s->icon_pm_w, &s->icon_pm_h, &b, &d);
}
if(s->icon_pms.pm!=None) {
i->iconpm=s->icon_pms.pm;
i->secondpm=s->icon_pms.pm2;
i->maskpm=None;
*w=s->icon_pm_w+8;
*h=s->icon_pm_h+8;
return;
}
}
i->iconpm=scr->default_tool_pms.pm;
i->secondpm=scr->default_tool_pms.pm2;
i->maskpm=None;
*w=scr->default_tool_pm_w+8;
*h=scr->default_tool_pm_h+8;
}
void createiconicon(Icon *i, XWMHints *wmhints)
{
XSetWindowAttributes attr;
int x=20, y=20;
unsigned int w=40, h=40;
Window win=None;
void newicontitle(Client *);
scr=i->scr;
if(wmhints && !prefs.customiconsonly) {
if((wmhints->flags&IconWindowHint) && wmhints->icon_window) {
Window r;
unsigned int b, d;
i->innerwin=win=wmhints->icon_window;
XGetGeometry(dpy, win, &r, &x, &y, &w, &h, &b, &d);
x-=4; y-=4; w+=8; h+=8;
} else if((wmhints->flags&IconPixmapHint) && wmhints->icon_pixmap) {
Window r;
int x, y;
unsigned int b, d;
i->iconpm=wmhints->icon_pixmap;
i->secondpm=None;
if(wmhints->flags&IconMaskHint)
i->maskpm = wmhints->icon_mask;
else
i->maskpm = None;
XGetGeometry(dpy, i->iconpm, &r, &x, &y, &w, &h, &b, &d);
w+=8;
h+=8;
} else
setstdiconicon(i, &w, &h);
if(wmhints->flags&IconPositionHint) {
x=wmhints->icon_x;
y=wmhints->icon_y;
} else if(i->window) {
Window r;
unsigned int w, h, bw, d;
XGetGeometry(dpy, i->window, &r, &x, &y, &w, &h, &bw, &d);
}
} else
setstdiconicon(i, &w, &h);
if(!(i->window)) {
attr.override_redirect=True;
attr.background_pixel=scr->dri.dri_Pens[BACKGROUNDPEN];
i->window=XCreateWindow(dpy, scr->back, i->x=x, i->y=y,
i->width=w, i->height=h, 0, CopyFromParent,
InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel, &attr);
i->mapped=0;
XSaveContext(dpy, i->window, icon_context, (XPointer)i);
XLowerWindow(dpy, i->window);
XSelectInput(dpy, i->window,ExposureMask|ButtonPressMask|ButtonReleaseMask);
} else {
XMoveResizeWindow(dpy, i->window, i->x=x, i->y=y, i->width=w, i->height=h);
if(i->mapped)
redrawicon(i, i->window);
}
if(!(i->labelwin)) {
i->labelwin=XCreateWindow(dpy, scr->back, 0, 0, 1, 1, 0,
CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel, &attr);
XSaveContext(dpy, i->labelwin, icon_context, (XPointer)i);
XLowerWindow(dpy, i->labelwin);
XSelectInput(dpy, i->labelwin, ExposureMask);
}
if(i->client)
newicontitle(i->client);
if((win=i->innerwin)) {
XAddToSaveSet(dpy, win);
XReparentWindow(dpy, win, i->window, 4, 4);
XSelectInput(dpy, win, SubstructureRedirectMask);
XMapWindow(dpy, win);
}
adjusticon(i);
}
void createicon(Client *c)
{
XWMHints *wmhints;
Icon *i;
c->icon=i=(Icon *)calloc(1, sizeof(Icon));
i->scr=scr=c->scr;
i->client=c;
i->module=NULL;
i->next=scr->icons;
i->parent=scr->back;
scr->icons=i;
wmhints=XGetWMHints(dpy, c->window);
createiconicon(i, wmhints);
if(wmhints) XFree(wmhints);
}
Icon *createappicon(struct module *m, Window p, char *name,
Pixmap pm1, Pixmap pm2, Pixmap pmm, int x, int y)
{
Icon *i;
Client *c;
int tx, ty, ap=0;
unsigned int w, h, b, d;
Window r, ws[3];
XSetWindowAttributes attr;
if(x==NO_ICON_POSITION || y==NO_ICON_POSITION) {
x=0; y=0; ap++;
}
i=(Icon *)calloc(1, sizeof(Icon));
if(!XFindContext(dpy, p, client_context, (XPointer*)&c)) {
scr=c->scr;
} else
if(XFindContext(dpy, p, screen_context, (XPointer*)&scr))
scr=front;
if(p==scr->root) p=scr->back;
i->scr=scr;
i->client=NULL;
i->module=m;
i->next=scr->icons;
i->parent=p;
scr->icons=i;
i->iconpm=pm1;
i->secondpm=pm2;
i->maskpm=pmm;
XGetGeometry(dpy, i->iconpm, &r, &tx, &ty, &w, &h, &b, &d);
w+=8;
h+=8;
attr.override_redirect=True;
attr.background_pixel=scr->dri.dri_Pens[BACKGROUNDPEN];
i->window=XCreateWindow(dpy, p, i->x=x, i->y=y,
i->width=w, i->height=h, 0, CopyFromParent,
InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel, &attr);
XSaveContext(dpy, i->window, icon_context, (XPointer)i);
XSelectInput(dpy, i->window,ExposureMask|ButtonPressMask|ButtonReleaseMask);
i->labelwin=XCreateWindow(dpy, p, 0, 0, 1, 1, 0,
CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel, &attr);
XSaveContext(dpy, i->labelwin, icon_context, (XPointer)i);
XSelectInput(dpy, i->labelwin, ExposureMask);
#ifdef USE_FONTSETS
if((i->label=malloc(strlen(name)+1))!=NULL) {
strcpy(i->label, name);
i->labelwidth=XmbTextEscapement(labelfontset, i->label,
strlen(i->label));
#else
if((i->label.value=malloc((i->label.nitems=strlen(name))+1))!=NULL) {
strcpy((char *)i->label.value, name);
i->labelwidth=XTextWidth(labelfont, (char *)i->label.value,
i->label.nitems);
#endif
if(i->labelwidth)
XResizeWindow(dpy, i->labelwin, i->labelwidth, scr->lh);
XMoveWindow(dpy, i->labelwin,
i->x+(i->width>>1)-(i->labelwidth>>1),
i->y+i->height+1);
}
if(i->parent==scr->back) {
ws[0]=scr->menubar;
ws[1]=i->window;
ws[2]=i->labelwin;
XRestackWindows(dpy, ws, 3);
} else {
XRaiseWindow(dpy, i->labelwin);
XRaiseWindow(dpy, i->window);
}
if(ap) adjusticon(i);
i->mapped=1;
if(i->labelwidth)
XMapWindow(dpy, i->labelwin);
XMapWindow(dpy, i->window);
return i;
}
void rmicon(Icon *i)
{
Icon *ii;
if (i->selected)
deselecticon(i);
if (i == i->scr->icons)
i->scr->icons = i->next;
else
if((ii = i->scr->icons))
for (; ii->next; ii = ii->next)
if (ii->next == i) {
ii->next = i->next;
break;
}
destroyiconicon(i);
XDestroyWindow(dpy, i->window);
XDeleteContext(dpy, i->window, icon_context);
if(i->labelwin) {
XDestroyWindow(dpy, i->labelwin);
XDeleteContext(dpy, i->labelwin, icon_context);
}
#ifdef USE_FONTSETS
if(i->label)
free(i->label);
#else
if(i->label.value)
if(i->module)
free(i->label.value);
else
XFree(i->label.value);
#endif
free(i);
}
static int cmp_iconpos(const Icon **p1, const Icon **p2)
{
int r;
return((r=(*p2)->mapped-(*p1)->mapped)?r:((r=(*p1)->x-(*p2)->x)?r:
(*p1)->y-(*p2)->y));
}
static void placeicons(Icon **p, int n, int x, int w)
{
int i;
x+=w>>1;
for(i=0; i<n; i++) {
Icon *i=*p++;
XMoveWindow(dpy, i->window, i->x=x-(i->width>>1), i->y);
XMoveWindow(dpy, i->labelwin, x-(i->labelwidth>>1),
i->y+i->height+1);
}
}
void cleanupicons()
{
Icon *i, **icons;
int nicons=0, maxicons=16;
if((icons=calloc(maxicons, sizeof(Icon*)))) {
for(i=scr->icons; i; i=i->next)
if(i->window) {
if(nicons>=maxicons)
if(!(icons=realloc(icons, sizeof(Icon*)*(maxicons<<=1))))
return;
icons[nicons]=i;
i->x+=i->width>>1;
nicons++;
}
if(nicons) {
int i0=0, i, x=5, y=scr->bh+4, w, mw=0;
qsort(icons, nicons, sizeof(*icons),
(int (*)(const void *, const void *))cmp_iconpos);
for(i=0; i<nicons; i++) {
if(i>i0 && y+icons[i]->height>scr->height-4-scr->lh) {
placeicons(icons+i0, i-i0, x, mw);
x+=mw+5;
y=scr->bh+4;
mw=0;
i0=i;
}
icons[i]->y=y;
w=icons[i]->width;
if(icons[i]->mapped && icons[i]->labelwidth>w)
w=icons[i]->labelwidth;
if(w>mw)
mw=w;
y+=icons[i]->height+4+scr->lh;
}
placeicons(icons+i0, nicons-i0, x, mw);
}
free(icons);
}
}
void newicontitle(Client *c)
{
Icon *i=c->icon;
#ifdef USE_FONTSETS
XTextProperty prop;
if(i->label) {
free(i->label);
i->label = NULL;
}
if(XGetWMIconName(dpy, c->window, &prop) && prop.value) {
char **list;
int n;
if(XmbTextPropertyToTextList(dpy, &prop, &list, &n) >= Success) {
if(n > 0) {
if( prefs.shortlabelicons )
{
if (strlen(list[0])>10){
char *str1=list[0];
char str2[11];
strncpy (str2,str1,8);
str2[8]='.';
str2[9]='.';
str2[10]='\0';
i->label = strdup(str2);
} else {
i->label = strdup(list[0]);
}
} else {
i->label = strdup(list[0]);
}
i->labelwidth=XmbTextEscapement(labelfontset, i->label,
strlen(i->label));
}
XFreeStringList(list);
}
XFree(prop.value);
}
if(!i->label)
i->labelwidth = 0;
#else
if(i->label.value)
XFree(i->label.value);
if(!(XGetWMIconName(dpy, c->window, &i->label))) {
i->label.value=NULL;
i->labelwidth=0;
} else
i->labelwidth=XTextWidth(labelfont, (char *)i->label.value,
i->label.nitems);
#endif
if(i->labelwidth)
XResizeWindow(dpy, i->labelwin, i->labelwidth, c->scr->lh);
if(i->mapped && i->labelwidth>0)
XMapWindow(dpy, i->labelwin);
else
XUnmapWindow(dpy, i->labelwin);
XMoveWindow(dpy, i->labelwin,
i->x+(i->width>>1)-(i->labelwidth>>1),
i->y+i->height+1);
if(i->mapped)
redrawicon(i, i->labelwin);
}
void free_icon_pms(struct IconPixmaps *pms)
{
if(pms->pm!=None) XFreePixmap(dpy, pms->pm);
if(pms->pm2!=None) XFreePixmap(dpy, pms->pm2);
free_color_store(dpy, &pms->cs);
free_color_store(dpy, &pms->cs2);
}

43
icon.h Normal file
View File

@@ -0,0 +1,43 @@
#ifndef ICON_H
#define ICON_H
#include "client.h"
#include "libami.h"
struct _Scrn;
typedef struct _Icon {
struct _Icon *next, *nextselected;
struct _Scrn *scr;
Client *client;
struct module *module;
Window parent, window, labelwin, innerwin;
Pixmap iconpm, secondpm, maskpm;
#ifdef USE_FONTSETS
char *label;
#else
XTextProperty label;
#endif
int x, y, width, height;
int labelwidth;
int selected, mapped;
} Icon;
struct IconPixmaps
{
Pixmap pm, pm2;
struct ColorStore cs, cs2;
};
extern void redrawicon(Icon *, Window);
extern void rmicon(Icon *);
extern void createicon(Client *);
extern void createiconicon(Icon *i, XWMHints *);
extern void destroyiconicon(Icon *);
extern void cleanupicons();
extern void createdefaulticons();
extern void adjusticon(Icon *);
extern void selecticon(Icon *);
extern void deselecticon(Icon *);
extern void free_icon_pms(struct IconPixmaps *pms);
#endif

66
iconinfo.pl Executable file
View File

@@ -0,0 +1,66 @@
#!/usr/local/bin/perl
sub chompstring {
my ($len, $rest)=unpack("Na*", $_[0]);
return unpack("a".$len."a*", $rest);
}
sub imginfo {
my ($left, $top, $width, $height, $depth, $pp, $poo, $rest) =
unpack("n5x4CCx4a*", $_[0]);
print "Image: ${width}x${height}+$left+$top $depth bit\n";
my $bpr=2*(($width+15)>>4);
my $imgsz=$bpr*$height*$depth;
return substr($rest, $imgsz);
}
%itypes=( 1=>disk, 2=>drawer, 3=>tool, 4=>project, 5=>garbage, 6=>device,
7=>kick, 8=>appicon );
undef $/; $i=<>;
($magic, $version, $gad, $ty, $deftool, $tts, $x, $y, $drwdata, $toolwin, $stacksize, $rest) =
unpack("nna44CxNNNNNNNa*", $i);
($left, $top, $width, $height, $flags, $activ, $gty, $gid, $gud) =
unpack("x4n7x20nN", $gad);
if($x==0x80000000) { $x="no position"; }
if($y==0x80000000) { $y="no position"; }
printf "Magic: %04x Version: %d Revision: %d Type: $itypes{$ty}\n", $magic, $version, $gud&0xff;
print "X=$x, Y=$y, stacksize=$stacksize\n";
printf "Gadget: ${width}x${height}+$left+$top flags=%04x, activ=%04x\n", $flags, $activ;
if($drwdata!=0) {
($left, $top, $width, $height, $panx, $pany, $rest) =
unpack("n4x40N2a*", $rest);
printf "Window: ${width}x${height}+$left+$top(+$panx+$pany)\n";
}
$rest=imginfo($rest);
if($flags&2) { $rest=imginfo($rest); }
if($deftool!=0) {
($deftool, $rest)=chompstring($rest);
printf "Default tool: $deftool\n";
}
if($tts) {
($arraybytes, $rest)=unpack("Na*", $rest);
for(2..$arraybytes>>2) {
($tooltype, $rest)=chompstring($rest);
print "ToolType: $tooltype\n";
}
}
if($toolwin) {
($toolwin, $rest)=chompstring($rest);
print "ToolWin: $toolwin\n";
}
if($drwdata!=0 and $version>0) {
($wflags, $vmodes, $rest)=unpack("Nna*", $rest);
printf "Window: flags=%08x viewmodes=%04x\n",$wflags,$vmodes;
}
printf "%d bytes remaining.\n", length($rest);

238
install-sh Executable file
View File

@@ -0,0 +1,238 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
tranformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

157
intui_look.txt Normal file
View File

@@ -0,0 +1,157 @@
wwwwwwwwwwwwwwwwwww wwwwww
bkwbbbbbbbbbbbkkbbb .XX.... ..|||k
bkwbbbbbbbbbbbkkbbb .XX.... ..|||k
bkwbbbbbbbbbbbkkbbb .XX.... ..|||k
bkwbbbbbbbbbbbkkbbb .XX.... ..|||k
bkwbbbbbbbbbbbkkbbb .XX.... ..|||k
bkwbbbbbbbbbbbkkbbb .XX.... ..|||k
bkwbbbbbbbbbbbkkkkk .XXXXXX
bkwbbbbbbbbbbbbbbbb .......
bkwbbbbbbbbbbbbbbbb
kkkkkkkkkkkkkkkkkkk
H=48
h=11
HH=78
0 ------- 0 -------- 0 ----------- 0 --------- 0 ---------
14(3)[23] ------- 9(2) -------- 9(2) ----------- > 8(2)[12]<--------- 32(2) ---------
close zoom depth icon1 icon2
33(7)[54] ------- 24(5) -------- 19(4) ----------- 35(4) --------- 35(4) ---------
47 ------- 38(8) -------- 28(6) ----------- 37(6) --------- 37(6) ---------
47 -------- 38(8) ----------- >39(8)[65]<--------- >39(8)<---------
47 ----------- 47 --------- 47 ---------
h0 0 0 0 i1h1 8(2) [h1-e]
h2 9 2 1/5 i1h2 39(8) [h7+e]
h3 14 3 3/10
h4 19 4 2/5
h5 24 5 1/2
h6 28 6 3/5
h7 33 7 7/10
h8 38 8 4/5
h10 47 10 0-e
h0 0/10
h2 2/10
h3 3/10
h4 4/10
h5 5/10
h6 6/10
h7 7/10
h8 8/10
h10 10/10-e
0 *
1
2
3
4 10
5 9
6 78
7
8 6
9 * 5 10
10 9
11
12 4 8
13 7
14 * 10
15
16 3 6 9
17
18 8
19 * 5 10 0 *
20 7 1 678910
21 9 2 * 45 8910
22 3 * 3 67 910
23 4 * 5 78910
24 * 2 4 6 8 10 5 * 2 4 6 8 10
25 6 * 5 78910
26 9 7 * 3 67 910
27 7 8 * 45 8910
28 * 5 10 9 678910
29 10 *
30 8
31
32 3 6 9
33 * 10
34 7
35
36 4 8
37 9
38 * 5 10
39
40 6
41 7
42 89
43 10
44
45
46
47 *
wwwwwwwwwwwwwwwwwwwwwwwwwww wwKKKKKKKKKKKKKKKKKKKKKKKww
bkwbbbbbbbbbbbbbbbbbbbbbkwb x7(1) bkKbbbbbbbbbbbbbbbbbbbbbWwb x31(1)
bkwbbbbkkkkkkkkkkkkkbbbbkwb bkKbbbbkkkkkkkkkkkkkbbbbWwb
bkwbbbbkbbbbbbbbbbbkbbbbkwb x26(1) bkKbbbbkbbbbbbbbbbbkbbbbWwb x2(1) (2 if h>11)
bkwbbbbkbkkkkbbbbbbkbbbbkwb bkKbbbbkbkkkkbbbbbbkbbbbWwb
bkwbbbbkbkwwkbbbbbbkbbbbkwb x1 bkKbbbbkbkwwkbbbbbbkbbbbWwb x1
bkwbbbbkbkkkkbbbbbbkbbbbkwb bkKbbbbkbkkkkbbbbbbkbbbbWwb
bkwbbbbkbbbbbbbbbbbkbbbbkwb x1 bkKbbbbkbbbbbbbbbbbkbbbbWwb x1
bkwbbbbkkkkkkkkkkkkkbbbbkwb bkKbbbbkkkkkkkkkkkkkbbbbWwb
bkwbbbbbbbbbbbbbbbbbbbbbkwb x7(1) bkKbbbbbbbbbbbbbbbbbbbbbWwb x7(1)
kkkkkkkkkkkkkkkkkkkkkkkkkkk kkWWWWWWWWWWWWWWWWWWWWWWWkk
wwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwww
wbbbbbbbbbbbbbbbbbkwbb x13(2) bkwbbbbbbbbbbbbbbbbbbbbbkwb x8(1) bkwbbbbbbbbbbbbbbbbbbbbbk x8(1)
wbbbbbbkkkkkbbbbbbkwbb bkwbbbbkkkkkkkkkkkkkbbbbkwb bkwbbbkkkkkkkkkkkbbbbbbbk
wbbbbbbkwwwkbbbbbbkwbb x18(3) bkwbbbbkkwwwkkbbbbbkbbbbkwb x14(2) bkwbbbk kbbbbbbbk x9(1)
wbbbbbbkkkkkbbbbbbkwbb bkwbbbbkkkkkkkbbbbbkbbbbkwb bkwbbbk kkkkkkkkkkkbbbk
wbbbbbbbbbbbbbbbbbkwbb x13(2) bkwbbbbkbbbbbbbbbbbkbbbbkwb x13(2) bkwbbbk kwwwwwwwwwkbbbk x8(1)
wkkkkkkkkkkkkkkkkkkkkk bkwbbbbkkkkkkkkkkkkkbbbbkwb bkwbbbkkkkkwwwwwwwwwkbbbk
wbbk bkwbbbbbbbbbbbbbbbbbbbbbkwb x8(1) bkwbbbbbbbkwwwwwwwwwkbbbk x9(1)
wbbk kkkkkkkkkkkkkkkkkkkkkkkkkkk bkwbbbbbbbkkkkkkkkkkkbbbk
bkwbbbbbbbbbbbbbbbbbbbbbk x8(1)
kkkkkkkkkkkkkkkkkkkkkkkkk
wbbk
KKKKKKKKKKKKKKKKKKKwww wwKKKKKKKKKKKKKKKKKKKKKKKww wwKKKKKKKKKKKKKKKKKKKKKKK
KbbbbbbbbbbbbbbbbbWwbb x13(2) bkKbbbbbbbbbbbbbbbbbbbbbWwb x8(1) bkKbbbbbbbbbbbbbbbbbbbbbW x8(1)
KbbbbbbkkkkkbbbbbbWwbb bkKbbbbkkkkkkkkkkkkkbbbbWwb bkKbbbkkkkkkkkkkkbbbbbbbW
KbbbbbbkキキキkbbbbbbWwbb x18(3) bkKbbbbkkBBBkkWWWWWkbbbbWwb x14(2) bkKbbbk kbbbbbbbW x9(1)
KbbbbbbkkkkkbbbbbbWwbb bkKbbbbkkkkkkkWWWWWkbbbbWwb bkKbbbk kkkkkkkkkkkbbbW
KbbbbbbbbbbbbbbbbbWwbb x13(2) bkKbbbbkWWWWWWWWWWWkbbbbWwb x13(2) bkKbbbk kwwwwwKwwwkbbbW x8(1)
wWWWWWWWWWWWWWWWWWWkkk bkKbbbbkkkkkkkkkkkkkbbbbWwb bkKbbbkkkkkKKKKKKwwwkbbbW
wbbk bkKbbbbbbbbbbbbbbbbbbbbbWwb x8(1) bkKbbbbbbbkwwwwwwwwwkbbbW x9(1)
wbbk kkWWWWWWWWWWWWWWWWWWWWWWWkk bkKbbbbbbbkkkkkkkkkkkbbbW
bkKbbbbbbbbbbbbbbbbbbbbbW x8(1)
kkWWWWWWWWWWWWWWWWWWWWWWW
wbbk
wbbbbbbbbbbbbbbbbk
wwwwwwwwwwwwwwwwwwwwwk
bbwbbbbbbbbbbbbbbbbk
bwbbbbbbbbbbbkkkbbk
wbbbbbbbbbkkwwkbbk
wbbbbbbbkkwwwwkbbk
wbbk wbbbbbkkwwwwwwkbbk
wbbk wbbbkkwwwwwwwwkbbk
wbbk wbbbkkkkkkkkkkkbbk
wbbkwwwwwwwwwwww wwwbbbbbbbbbbbbbbbbk
wkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkk

390
joke_fs.c Normal file
View File

@@ -0,0 +1,390 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "libami.h"
#include "drawinfo.h"
#ifdef BSD_STYLE_GETTIMEOFDAY
#define GETTIMEOFDAY(tp) gettimeofday(tp, NULL)
#else
#define GETTIMEOFDAY(tp) gettimeofday(tp)
#endif
#define FIXUPTV(tv) { \
while((tv).tv_usec<0) { (tv).tv_usec+=1000000; (tv).tv_sec--; } \
while((tv).tv_usec>=1000000) { (tv).tv_usec-=1000000; (tv).tv_sec++; } \
}
#define BIN_PREFIX AMIWM_HOME"/"
#define NFMT 2
char fmt[NFMT+2][80];
int fmtw[NFMT];
Display *dpy;
char *progname;
unsigned long color_scheme[2];
int scr, coloralloc, state=0;
Window root, win, win2;
Colormap cmap;
GC gc;
XFontStruct *font;
int gh, gw, ascent;
char *rcpath = BIN_PREFIX"requestchoice";
char *rcmsg = "Notice";
Pixmap disk_icon1, disk_icon2;
struct ColorStore colorstore1, colorstore2;
struct DrawInfo dri;
Atom appiconmsg;
char *currentdir = NULL;
XContext dircontext;
int my_in_fd, my_out_fd;
void load_diskicon()
{
struct DiskObject *disk_do;
disk_do = GetDefDiskObject(1/*WBDISK*/);
if(disk_do == NULL)
disk_do = GetDefDiskObject(2/*WBDRAWER*/);
if(disk_do == NULL)
disk_do = GetDefDiskObject(3/*WBTOOL*/);
if(disk_do == NULL) {
md_errormsg(md_root, "Failed to load disk icon");
md_exit(0);
}
disk_icon1 =
md_image_to_pixmap(md_root, dri.dri_Pens[BACKGROUNDPEN],
(struct Image *)disk_do->do_Gadget.GadgetRender,
disk_do->do_Gadget.Width, disk_do->do_Gadget.Height,
&colorstore1);
disk_icon2 =
md_image_to_pixmap(md_root, dri.dri_Pens[BACKGROUNDPEN],
(struct Image *)disk_do->do_Gadget.SelectRender,
disk_do->do_Gadget.Width, disk_do->do_Gadget.Height,
&colorstore2);
FreeDiskObject(disk_do);
XSync(dpy, False);
}
void broker_cb(XEvent *evt, unsigned long mask)
{
XPointer ret;
if(evt->type != ClientMessage || evt->xclient.message_type != appiconmsg)
return;
if(!XFindContext(dpy, evt->xclient.window, dircontext, &ret))
currentdir = (char*)ret;
}
void create_broker()
{
cx_broker(0, broker_cb);
}
void create_baseicons(char *dirs)
{
char *dir, *dup = malloc(strlen(dirs)+1);
if(dup == NULL)
return;
strcpy(dup, dirs);
for(dir=strtok(dup, ":"); dir; dir=strtok(NULL, ":")) {
Window win = md_create_appicon(md_root, 0x80000000, 0x80000000,
dir, disk_icon1, disk_icon2, None);
XSaveContext(dpy, win, dircontext, (XPointer)dir);
}
free(dup);
}
void migrate(int amount)
{
Window r, p, *c = NULL;
unsigned int i, nc;
if(XQueryTree(dpy, root, &r, &p, &c, &nc)) {
XWarpPointer(dpy, None, None, 0, 0, 0, 0, 0, amount);
for(i=0; i<nc; i++) {
int x,y;
unsigned int w, h, bw, d;
if(XGetGeometry(dpy, c[i], &r, &x, &y, &w, &h, &bw, &d)) {
XMoveWindow(dpy, c[i], x, y+amount);
}
}
}
if(c != NULL)
XFree(c);
}
void activate()
{
Window r, ch;
int x, y, wx, wy;
unsigned int m;
XGrabServer(dpy);
migrate(gh);
XMoveWindow(dpy, win, 0, 0);
XMapRaised(dpy, win);
XQueryPointer(dpy, win, &r, &ch, &x, &y, &wx, &wy, &m);
XMoveResizeWindow(dpy, win2, x, y, 1, 1);
XMapRaised(dpy, win2);
XGrabPointer(dpy, win, False, ButtonPressMask, GrabModeAsync, GrabModeSync, win2, None, CurrentTime);
}
void deactivate()
{
XUngrabPointer(dpy, CurrentTime);
XUnmapWindow(dpy, win2);
XUnmapWindow(dpy, win);
migrate(-gh);
XUngrabServer(dpy);
}
void install_kw(char *dst, char *src)
{
int i, n = strlen(src);
for(i=0; i<2*n; i+=2) {
char c = src[(i>=n? i-n+1:i)];
if((c>'@' && c<'[')||(c>'`' && c<'{'))
c = (c&0xe0)|((((c&0x1f)+12)%26)+1);
*dst++ = c;
}
*dst = '\0';
}
void setup()
{
XWindowAttributes attr;
XSetWindowAttributes nw;
XGCValues gcv;
XColor clr;
int i;
dircontext = XUniqueContext();
XGetWindowAttributes(dpy, root, &attr);
cmap = attr.colormap;
coloralloc = 0;
color_scheme[0] = BlackPixel(dpy, scr);
clr.flags = DoRed|DoGreen|DoBlue;
clr.red = ~0;
clr.green = 0;
clr.blue = 0;
if(XAllocColor(dpy, cmap, &clr)) {
color_scheme[1] = clr.pixel;
coloralloc = 1;
} else
color_scheme[1] = WhitePixel(dpy, scr);
nw.background_pixel = color_scheme[0];
nw.border_pixel = color_scheme[1];
nw.backing_store = NotUseful;
nw.save_under = False;
nw.event_mask = ExposureMask|ButtonPressMask;
nw.override_redirect = True;
nw.colormap = cmap;
nw.cursor = None;
install_kw(fmt[0], "Fsbgs gzjbnhefrr Sonhvgyghbear .g b pCbeargfvfa hyrr.");
win = XCreateWindow(dpy, root, 0, 0, gw = attr.width, gh = 84, 0,
attr.depth, InputOutput, attr.visual,
CWBackPixel|CWBorderPixel|CWBackingStore|CWSaveUnder|
CWEventMask|CWOverrideRedirect|CWColormap|CWCursor, &nw);
install_kw(fmt[1], "T0h0e0h0 0Z0r0q4v.g0n0g0v0bNaO 7#8");
win2 = XCreateWindow(dpy, root, 0, 0, 1, 1, 0, 0, InputOnly,
attr.visual, CWOverrideRedirect, &nw);
install_kw(fmt[2], "NYC!E!V!Y\n' F S:B-B)");
font = XLoadQueryFont(dpy, "-*-courier-bold-r-normal--14-*-*-*-*-*-iso8859-1");
if(font == NULL)
font = XLoadQueryFont(dpy, "fixed");
install_kw(fmt[3], "Ubrqu ,w btxbr");
gcv.font = font->fid;
gc = XCreateGC(dpy, win, GCFont, &gcv);
for(i=0; i<NFMT; i++) {
int dir, d;
XCharStruct o;
XTextExtents(font, fmt[i], strlen(fmt[i]), &dir, &ascent, &d, &o);
fmtw[i] = o.width;
}
XGetWindowAttributes(dpy, md_root, &attr);
init_dri(&dri, dpy, md_root, attr.colormap, False);
appiconmsg = XInternAtom(dpy, "AMIWM_APPICONMSG", False);
}
void post(char **msg)
{
int pid;
msg[0]=rcpath;
msg[1]=rcmsg;
if(!(pid=fork())) {
int of = open("/dev/null", O_WRONLY);
if(my_in_fd>=0)
close(my_in_fd);
if(my_out_fd>=0 && my_out_fd != my_in_fd)
close(my_out_fd);
if(of>=0) {
if(of!=1) dup2(of, 1);
if(of!=2) dup2(of, 2);
}
execv(msg[0], msg);
perror("execv");
_exit(1);
} else if(pid<0) {
perror("fork");
exit(1);
}
}
void cleanup()
{
XFreeGC(dpy, gc);
XFreeFont(dpy, font);
XDestroyWindow(dpy, win);
XDestroyWindow(dpy, win2);
if(coloralloc)
XFreeColors(dpy, cmap, color_scheme+1, 1, 0);
}
void post_cleanup()
{
char *clu[5];
int i;
for(i=0; i<4; i++)
clu[i]=fmt[i];
clu[4]=NULL;
post(clu);
}
void redraw()
{
int i;
if(state)
XSetForeground(dpy, gc, color_scheme[1]);
else
XSetForeground(dpy, gc, color_scheme[0]);
XFillRectangle(dpy, win, gc, 2, 2, 8, gh-4);
XFillRectangle(dpy, win, gc, gw-10, 2, 8, gh-4);
XFillRectangle(dpy, win, gc, 2, 2, gw-4, 8);
XFillRectangle(dpy, win, gc, 2, gh-10, gw-4, 8);
if(!state)
XSetForeground(dpy, gc, color_scheme[1]);
for(i=0; i<NFMT; i++)
XDrawString(dpy, win, gc, (gw-fmtw[i])>>1, 22+i*26+ascent,
fmt[i], strlen(fmt[i]));
}
int main(int argc, char *argv[])
{
int x_fd, cnt=0;
fd_set rfd_set;
struct timeval nextt;
char *basedir;
progname = argv[0];
basedir = md_init(argc, argv);
if(basedir == NULL)
basedir = "/";
my_in_fd=strtol(argv[1], NULL, 0);
my_out_fd=strtol(argv[2], NULL, 0);
if(!(dpy = md_display())) {
fprintf(stderr, "%s: cannot connect to X server %s\n", progname,
XDisplayName(NULL));
exit(1);
}
scr = DefaultScreen(dpy);
root = RootWindow(dpy, scr);
x_fd = ConnectionNumber(dpy);
setup();
load_diskicon();
create_broker();
create_baseicons(basedir);
do
md_process_queued_events();
while(currentdir == NULL && md_handle_input()>=0);
activate();
XSync(dpy, False);
GETTIMEOFDAY(&nextt);
for(;;) {
XEvent event;
struct timeval t;
while(QLength(dpy)>0) {
XNextEvent(dpy, &event);
switch(event.type) {
case Expose:
redraw();
break;
case ButtonPress:
cnt = 999;
break;
}
}
FD_ZERO(&rfd_set);
FD_SET(x_fd, &rfd_set);
GETTIMEOFDAY(&t);
t.tv_sec = nextt.tv_sec - t.tv_sec;
t.tv_usec = nextt.tv_usec - t.tv_usec;
FIXUPTV(t);
while(t.tv_sec<0) {
state = !state;
cnt++;
redraw();
t.tv_usec += 800000;
nextt.tv_usec += 800000;
FIXUPTV(nextt);
FIXUPTV(t);
}
XFlush(dpy);
if(cnt>=16)
break;
if(select(x_fd+1, &rfd_set, NULL, NULL, &t)<0) {
perror("select");
break;
}
if(FD_ISSET(x_fd, &rfd_set))
XPeekEvent(dpy, &event);
}
deactivate();
cleanup();
post_cleanup();
XCloseDisplay(dpy);
md_exit(0);
return 0;
}

1971
kbdlexer.c Normal file

File diff suppressed because it is too large Load Diff

145
kbdlexer.l Normal file
View File

@@ -0,0 +1,145 @@
%{
#include <X11/Xmu/CharSet.h>
#include <string.h>
#include "libami.h"
#include "kbdmodule.h"
unsigned char *inptr;
extern char *progname;
#ifdef FLEX_SCANNER
#undef YY_INPUT
#define YY_INPUT(buf,result,size) ((result) = doinput((buf),(size)))
int doinput (char *buf, int size)
{
int l=strlen((char *)inptr);
if(l>size) l=size;
if(l>0) {
memcpy(buf, inptr, l);
inptr+=l;
}
return l;
}
#endif
static void k_rotscreens(Window w)
{
Window root;
int x, y;
unsigned int width, height, bw, d;
if(XGetGeometry(md_display(), w, &root, &x, &y, &width, &height, &bw, &d))
md_rotate_screen(root);
}
typedef void (*mdfuncp)(Window);
int parse_keyword(char *str, YYSTYPE *val)
{
struct { char *name; mdfuncp func; } functab[] = {
{ "back", (mdfuncp)md_back },
{ "front", (mdfuncp)md_front },
{ "iconify", (mdfuncp)md_iconify },
{ "rotatescreens", (mdfuncp)k_rotscreens },
};
#define N_FUNC (sizeof(functab)/sizeof(functab[0]))
struct { char *name; int token, num; } kwtab[] = {
{ "all", WHEREABOUTS, IN_ANYTHING_MASK },
{ "b1", MODIFIER, Button1Mask },
{ "b2", MODIFIER, Button2Mask },
{ "b3", MODIFIER, Button3Mask },
{ "b4", MODIFIER, Button4Mask },
{ "b5", MODIFIER, Button5Mask },
{ "button1", MODIFIER, Button1Mask },
{ "button2", MODIFIER, Button2Mask },
{ "button3", MODIFIER, Button3Mask },
{ "button4", MODIFIER, Button4Mask },
{ "button5", MODIFIER, Button5Mask },
{ "control", MODIFIER, ControlMask },
{ "frame", WHEREABOUTS, IN_FRAME_MASK },
{ "icon", WHEREABOUTS, IN_ICON_MASK },
{ "lock", MODIFIER, LockMask },
{ "m", META, 0 },
{ "m1", MODIFIER, Mod1Mask },
{ "m2", MODIFIER, Mod2Mask },
{ "m3", MODIFIER, Mod3Mask },
{ "m4", MODIFIER, Mod4Mask },
{ "m5", MODIFIER, Mod5Mask },
{ "meta", META, 0 },
{ "mod1", MODIFIER, Mod1Mask },
{ "mod2", MODIFIER, Mod2Mask },
{ "mod3", MODIFIER, Mod3Mask },
{ "mod4", MODIFIER, Mod4Mask },
{ "mod5", MODIFIER, Mod5Mask },
{ "root", WHEREABOUTS, IN_ROOT_MASK },
{ "shift", MODIFIER, ShiftMask },
{ "window", WHEREABOUTS, IN_WINDOW_MASK },
};
#define N_KW (sizeof(kwtab)/sizeof(kwtab[0]))
int l=0, h=N_FUNC-1;
XmuCopyISOLatin1Lowered (str, str);
while(h>=l) {
int i=(h+l)>>1, c=strcmp(str, functab[i].name);
if(!c) {
val->function=functab[i].func;
return FUNCTION;
} else if(c>=0)
l=i+1;
else
h=i-1;
}
l=0; h=N_KW-1;
while(h>=l) {
int i=(h+l)>>1, c=strcmp(str, kwtab[i].name);
if(!c) {
val->num=kwtab[i].num;
return kwtab[i].token;
} else if(c>=0)
l=i+1;
else
h=i-1;
}
return ERRORTOKEN;
}
%}
%%
\#[^\n]*\n { ; }
\<[^\n\>]*\> { *((char*)strchr(yytext, '>'))=0;
yylval.keysym=XStringToKeysym(yytext+1);
if(yylval.keysym == 0) {
fprintf(stderr, "%s: ignoring unknown keysym: %s\n",
progname, yytext+1);
} else
return KEYSYM;
}
[a-zA-Z0-9]+ { int token = parse_keyword(yytext, &yylval);
if(token == ERRORTOKEN) {
fprintf(stderr, "%s: ignoring unknown keyword: %s\n",
progname, yytext);
} else
return token;
}
\: { return COLON; }
\| { return BAR; }
[\r\n\t ] { ; }
. { fprintf(stderr, "%s: illegal character \"%s\" ignored\n",
progname, yytext); }
%%
#ifndef yywrap
int yywrap() { return 1; }
#endif
#undef input
#define input() ((*inptr)?(*inptr++):0)
#undef unput
#define unput(c) (*--inptr=c)

1526
kbdmodule.c Normal file

File diff suppressed because it is too large Load Diff

94
kbdmodule.h Normal file
View File

@@ -0,0 +1,94 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
ERRORTOKEN = 258,
META = 259,
MODIFIER = 260,
WHEREABOUTS = 261,
COLON = 262,
BAR = 263,
KEYSYM = 264,
FUNCTION = 265
};
#endif
/* Tokens. */
#define ERRORTOKEN 258
#define META 259
#define MODIFIER 260
#define WHEREABOUTS 261
#define COLON 262
#define BAR 263
#define KEYSYM 264
#define FUNCTION 265
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
#line 14 "kbdmodule.y" /* yacc.c:1909 */
int num;
char *ptr;
KeySym keysym;
struct { unsigned int mods; int meta; } modifiers;
void (*function)(Window);
#line 82 "y.tab.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
extern YYSTYPE yylval;
int yyparse (void);
#endif /* !YY_YY_Y_TAB_H_INCLUDED */

77
kbdmodule.y Normal file
View File

@@ -0,0 +1,77 @@
%{
#include <stdio.h>
#include <string.h>
#include "libami.h"
void docmd(XEvent *e, void *callback)
{
((void (*)(Window))callback)(e->xany.window);
}
%}
%union
{
int num;
char *ptr;
KeySym keysym;
struct { unsigned int mods; int meta; } modifiers;
void (*function)(Window);
};
%token <num> ERRORTOKEN
%token <num> META MODIFIER WHEREABOUTS COLON BAR
%token <keysym> KEYSYM
%token <function> FUNCTION
%type <num> whereabouts
%type <modifiers> modifiers
%type <function> command
%left BAR
%start bindings
%%
bindings : bindings binding
|
;
binding : modifiers KEYSYM COLON whereabouts COLON command { cx_hotkey($2, $1.mods, $1.meta, $4, docmd, (void*)$6); }
;
modifiers : modifiers MODIFIER { $$.mods=$1.mods|$2; $$.meta=$1.meta; }
| modifiers META { $$.mods=$1.mods; $$.meta=1; }
| { $$.mods=$$.meta=0; }
;
whereabouts : whereabouts BAR whereabouts { $$=$1|$3; }
| WHEREABOUTS { $$=$1; }
;
command : FUNCTION { $$=$1; }
;
%%
char *progname;
int yyerror(s) char *s;
{
fprintf (stderr, "%s: error in input file: %s\n", progname, s ? s : "");
return 0;
}
int main(int argc, char *argv[])
{
char *arg=md_init(argc, argv);
progname=argv[0];
if(arg) {
extern unsigned char *inptr;
inptr=(unsigned char *)arg;
yyparse();
md_main_loop();
}
return 0;
}

249
launchermodule.c Normal file
View File

@@ -0,0 +1,249 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "libami.h"
#include "drawinfo.h"
char *progname;
Display *dpy;
XContext launchercontext;
struct DrawInfo dri;
Atom appiconmsg;
char *icondir;
struct launcher {
struct ColorStore colorstore1, colorstore2;
char cmdline[1];
};
#ifdef AMIGAOS
void spawn(const char *cmd)
{
char *line=malloc(strlen(cmd)+12);
if(line) {
sprintf(line, "RUN <>NIL: %s", cmd);
system(line);
free(line);
}
}
#else
void spawn(const char *cmd)
{
#ifdef HAVE_ALLOCA
char *line=alloca(strlen(cmd)+4);
#else
char *line=malloc(strlen(cmd)+4);
if(line) {
#endif
sprintf(line, "%s &", cmd);
#ifdef __ultrix
{
int pid, status;
if ((pid = fork ()) == 0) {
(void) setsid();
execl ("/bin/sh", "sh", "-c", line, 0);
} else
waitpid (pid, &status, 0);
}
#else
system(line);
#endif
#ifndef HAVE_ALLOCA
free(line);
}
#endif
}
#endif
static void broker_cb(XEvent *evt, unsigned long mask)
{
XPointer ret;
if(evt->type != ClientMessage || evt->xclient.message_type != appiconmsg)
return;
if(!XFindContext(dpy, evt->xclient.window, launchercontext, &ret)) {
struct launcher *l = (struct launcher*)ret;
spawn(l->cmdline);
}
}
static void create_broker()
{
cx_broker(0, broker_cb);
}
static void create_launcher(char *label, char *icon, char *cmdline)
{
struct DiskObject *icon_do = NULL;
Pixmap icon_icon1, icon_icon2;
Window win;
struct launcher *l = malloc(sizeof(struct launcher)+strlen(cmdline));
if (l == NULL) {
fprintf(stderr, "%s: out of memory!\n", progname);
exit(1);
}
memset(l, 0, sizeof(*l));
strcpy(l->cmdline, cmdline);
if (icon != NULL && *icon != 0) {
#ifdef AMIGAOS
char fn[256];
strncpy(fn, icondir, sizeof(fn)-1);
fn[sizeof(fn)-1]='\0';
AddPart(fn,icon,sizeof(fn));
#else
int rl=strlen(icon)+strlen(icondir)+2;
#ifdef HAVE_ALLOCA
char *fn=alloca(rl);
#else
char fn[1024];
#endif
sprintf(fn, "%s/%s", icondir, icon);
#endif
fn[strlen(fn)-5]=0;
icon_do = GetDiskObject(fn);
}
if(icon_do == NULL)
icon_do = GetDefDiskObject(3/*WBTOOL*/);
if(icon_do == NULL) {
md_errormsg(md_root, "Failed to load icon");
md_exit(0);
}
icon_icon1 =
md_image_to_pixmap(md_root, dri.dri_Pens[BACKGROUNDPEN],
(struct Image *)icon_do->do_Gadget.GadgetRender,
icon_do->do_Gadget.Width, icon_do->do_Gadget.Height,
&l->colorstore1);
icon_icon2 =
md_image_to_pixmap(md_root, dri.dri_Pens[BACKGROUNDPEN],
(struct Image *)icon_do->do_Gadget.SelectRender,
icon_do->do_Gadget.Width, icon_do->do_Gadget.Height,
&l->colorstore2);
FreeDiskObject(icon_do);
XSync(dpy, False);
win = md_create_appicon(md_root, 0x80000000, 0x80000000,
label, icon_icon1, icon_icon2, None);
XSaveContext(dpy, win, launchercontext, (XPointer)l);
}
static int skip_ws(char *arg, int len)
{
int n = 0;
while(len > 0 && isspace(*(unsigned char *)arg)) { n++; arg++; --len; }
return n;
}
static int get_string(char *arg, int len, int lineno)
{
int n;
if (len < 1 || *arg != '(') {
fprintf(stderr, "%s: missing '(' on line %d\n", progname, lineno);
return 0;
}
for (n=1; n<len; n++)
if (arg[n] == ')')
break;
if (n >= len) {
fprintf(stderr, "%s: missing ')' on line %d\n", progname, lineno);
return 0;
}
return n+1;
}
static char *create_string(char *arg, int l)
{
char *p = malloc(l+1);
if (!p) {
fprintf(stderr, "%s: out of memory!\n", progname);
exit(1);
}
if(l>0) memcpy(p, arg, l);
p[l] = 0;
return p;
}
static void create_appicons_line(char *arg, int len, int lineno)
{
int l;
char *label, *icon, *cmdline;
if (*arg == '#')
return;
l = skip_ws(arg, len);
arg += l; len -= l;
if (!len) return;
l = get_string(arg, len, lineno);
if (!l) return;
label = create_string(arg+1, l-2);
arg += l; len -= l;
l = skip_ws(arg, len);
arg += l; len -= l;
l = get_string(arg, len, lineno);
if (!l) { free(label); return; }
icon = create_string(arg+1, l-2);
arg += l; len -= l;
l = skip_ws(arg, len);
arg += l; len -= l;
l = get_string(arg, len, lineno);
if (!l) { free(icon); free(label); return; }
cmdline = create_string(arg+1, l-2);
arg += l; len -= l;
l = skip_ws(arg, len);
arg += l; len -= l;
if (len) fprintf(stderr, "%s: junk at end of line %d\n", progname, lineno);
create_launcher(label, icon, cmdline);
free(cmdline);
free(icon);
free(label);
}
static void create_appicons(char *arg)
{
char *p;
int l = 1;
while((p = strchr(arg, '\n'))) {
create_appicons_line(arg, p-arg, l++);
arg = p+1;
}
create_appicons_line(arg, strlen(arg), l);
}
static void setup()
{
XWindowAttributes attr;
launchercontext = XUniqueContext();
XGetWindowAttributes(dpy, md_root, &attr);
init_dri(&dri, dpy, md_root, attr.colormap, False);
appiconmsg = XInternAtom(dpy, "AMIWM_APPICONMSG", False);
icondir = get_current_icondir();
if(!icondir) icondir="";
}
int main(int argc, char *argv[])
{
char *arg=md_init(argc, argv);
progname=argv[0];
if(!(dpy = md_display())) {
fprintf(stderr, "%s: cannot connect to X server %s\n", progname,
XDisplayName(NULL));
exit(1);
}
if(arg) {
setup();
create_broker();
create_appicons(arg);
md_main_loop();
}
return 0;
}

1901
lex.c Normal file

File diff suppressed because it is too large Load Diff

69
lex.l Normal file
View File

@@ -0,0 +1,69 @@
%{
#include <stdio.h>
#include "gram.h"
extern char *progname;
extern int ParseError;
extern FILE *rcfile;
#undef yyin
#define yyin rcfile
#define yywrap() 1
extern int parse_keyword(char *);
void fixup_string(char *, char *);
#define YY_SKIP_YYWRAP
%}
%%
\#[^\n]*\n { ; }
\"([^"\n\\]|\\.|\\\n)*\" { fixup_string(yytext, yytext); yylval.ptr=yytext;
return STRING; }
[0-9]+ { yylval.num=atoi(yytext); return NUMBER; }
[a-zA-Z]+ { int token = parse_keyword(yytext);
if(token == ERRORTOKEN) {
fprintf(stderr, "%s: ignoring unknown keyword: %s\n",
progname, yytext);
ParseError=1;
} else
return token;
}
\{ { return LEFTBRACE; }
\} { return RIGHTBRACE; }
[\r\n\t ] { ; }
. { fprintf(stderr, "%s: illegal character \"%s\" ignored\n",
progname, yytext);
ParseError=1; }
%%
void fixup_string(char *src, char *dest)
{
src++;
while(*src!='"')
if((*dest++=*src++)=='\\')
switch((dest[-1]=*src++)) {
case 'n':
dest[-1]='\n';
break;
case 'r':
dest[-1]='\r';
break;
case 'a':
dest[-1]='\a';
break;
case 'b':
dest[-1]='\b';
break;
case 't':
dest[-1]='\t';
break;
case 'e':
dest[-1]='\033';
break;
}
*dest='\0';
}

45
libami/Makefile Normal file
View File

@@ -0,0 +1,45 @@
srcdir = .
SHELL = /bin/sh
CC = gcc
LEX = flex
YACC = bison -y
RANLIB = ranlib
CFLAGS = -g -O2
YFLAGS = -d
DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_TERMIO_H=1 -DHAVE_X11_EXTENSIONS_SHAPE_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DRETSIGTYPE=void -DHAVE_WAIT3=1 -DHAVE_SELECT=1 -DHAVE_STRDUP=1 -DHAVE_WAITPID=1 -DHAVE_XSHAPE=1 -DBSD_STYLE_GETTIMEOFDAY=1 -DHAVE_XCREATEFONTSET=1 -DHAVE_XMBTEXTESCAPEMENT=1 -DHAVE_XUTF8DRAWIMAGESTRING=1 -DUSE_FONTSETS=1 -DLAME_ENDIAN=1
ALL_CFLAGS = -I. -I.. $(DEFS) $(CFLAGS)
LIBS = -lSM -lICE -lXext -lXmu -lX11
prefix = /usr/local
exec_prefix = ${prefix}
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
INSTALL = /usr/bin/install -c
LN_S = ln -s
OBJS = drawinfo.o module.o broker.o eventdispatcher.o mdscreen.o \
mdicon.o mdwindow.o kbdsupport.o hotkey.o \
lists.o readargs.o iconlib.o iconutil.o error.o strutil.o \
iffparse.o
SRCS = drawinfo.c module.c broker.c eventdispatcher.c mdscreen.c \
mdicon.c mdwindow.c kbdsupport.c hotkey.c \
lists.c readargs.c iconlib.c iconutil.c error.c strutil.c \
iffparse.c
all : libami.a
libami.a : $(OBJS)
ar rc libami.a $(OBJS)
$(RANLIB) libami.a
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
depend: $(SRCS)
-@rm Makefile.bak
mv Makefile Makefile.bak
( sed '/^#--DO NOT REMOVE THIS LINE--$$/q' < Makefile.bak ; \
$(CC) -MM $(ALL_CFLAGS) $(SRCS) ) > Makefile
#--DO NOT REMOVE THIS LINE--

45
libami/Makefile.in Normal file
View File

@@ -0,0 +1,45 @@
srcdir = @srcdir@
VPATH = @srcdir@
SHELL = /bin/sh
CC = @CC@
LEX = @LEX@
YACC = @YACC@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@
YFLAGS = -d
DEFS = @DEFS@
ALL_CFLAGS = -I@srcdir@ -I@top_srcdir@ $(DEFS) $(CFLAGS) @X_CFLAGS@
LIBS = @X_LIBS@ @X_PRE_LIBS@ -lXext -lXmu -lX11 @X_EXTRA_LIBS@ @LIBS@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
INSTALL = @INSTALL@
LN_S = @LN_S@
OBJS = drawinfo.o module.o broker.o eventdispatcher.o mdscreen.o \
mdicon.o mdwindow.o kbdsupport.o hotkey.o \
lists.o readargs.o iconlib.o iconutil.o error.o strutil.o \
iffparse.o
SRCS = drawinfo.c module.c broker.c eventdispatcher.c mdscreen.c \
mdicon.c mdwindow.c kbdsupport.c hotkey.c \
lists.c readargs.c iconlib.c iconutil.c error.c strutil.c \
iffparse.c
all : libami.a
libami.a : $(OBJS)
ar rc libami.a $(OBJS)
$(RANLIB) libami.a
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
depend: $(SRCS)
-@rm Makefile.bak
mv Makefile Makefile.bak
( sed '/^#--DO NOT REMOVE THIS LINE--$$/q' < Makefile.bak ; \
$(CC) -MM $(ALL_CFLAGS) $(SRCS) ) > Makefile
#--DO NOT REMOVE THIS LINE--

21
libami/broker.c Normal file
View File

@@ -0,0 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
#include "libami.h"
#include "module.h"
extern void (*md_broker_func)(XEvent *, unsigned long);
int cx_broker(unsigned long mask, void (*callback)(XEvent *, unsigned long))
{
md_broker_func=callback;
return md_command0(md_root, MCMD_SET_BROKER, &mask, sizeof(mask));
}
int cx_send_event(unsigned long mask, XEvent *e)
{
struct mcmd_event me;
me.mask=mask;
me.event=*e;
return md_command0(md_root, MCMD_SEND_EVENT, &me, sizeof(me));
}

235
libami/drawinfo.c Normal file
View File

@@ -0,0 +1,235 @@
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "alloc.h"
#include "drawinfo.h"
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
#define TAG_DRI_VERSION 1
#define TAG_DRI_PENS 2
#define TAG_DRI_FONT 3
#define TAG_DRI_FONTSET 4
extern char *progname;
static char black[] = "#000000";
static char white[] = "#ffffff";
static char grey[] = "#aaaaaa";
static char blue[] = "#6688bb";
char *default_colors[NUMDRIPENS] = {
black, white, black, white, black, blue, black, grey, white,
black, white, black
};
char *default_screenfont =
"-b&h-lucida-medium-r-normal-sans-12-*-*-*-*-*-iso8859-1"
#ifdef USE_FONTSETS
",-b&h-lucida-medium-r-normal-sans-12-*-*-*-*-*-iso10646-1"
",-misc-fixed-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0"
#endif
;
static void setdriprop(Display *dpy, Atom atom, Atom typ, Window win,
struct DrawInfo *dri)
{
CARD32 prop[/* NUMDRIPENS+6 */ 100], *p=prop;
CARD16 i;
*p++=TAG_DRI_VERSION;
*p++=dri->dri_Version;
#ifdef USE_FONTSETS
*p++=TAG_DRI_FONTSET;
*p++=dri->dri_FontSetAtom;
#else
*p++=TAG_DRI_FONT;
*p++=dri->dri_Font->fid;
#endif
*p++=TAG_DRI_PENS;
*p++=dri->dri_NumPens;
for(i=0; i<dri->dri_NumPens; i++)
*p++=dri->dri_Pens[i];
XChangeProperty(dpy, win, atom, typ, 32, PropModeReplace,
(unsigned char *)prop, p-prop);
}
static void getdriprop(Display *dpy, Atom atom, Atom typ, Window win,
struct DrawInfo *dri)
{
Atom atyp;
int afmt;
unsigned long nitems, extra;
int i,j,n;
CARD32 *prop=NULL;
if(XGetWindowProperty(dpy, win, atom, 0l, NUMDRIPENS+6, False, typ,
&atyp, &afmt, &nitems, &extra,
(unsigned char **)&prop) == Success &&
atyp==typ && afmt==32) {
for(i=0; i<nitems; )
switch(prop[i++]) {
case TAG_DRI_VERSION:
if(i<nitems)
dri->dri_Version=prop[i++];
break;
#ifdef USE_FONTSETS
case TAG_DRI_FONTSET:
if(i<nitems)
dri->dri_FontSetAtom=prop[i++];
break;
#else
case TAG_DRI_FONT:
if(i<nitems)
dri->dri_Font=XQueryFont(dpy, prop[i++]);
break;
#endif
case TAG_DRI_PENS:
if(i<nitems) {
n=prop[i++];
if(n>nitems-i)
n=nitems-i;
if(n>0) {
dri->dri_NumPens=n;
if((dri->dri_Pens=calloc(sizeof(unsigned long), n)))
for(j=0; j<n; j++)
dri->dri_Pens[j]=prop[i++];
}
}
break;
}
}
if(prop)
XFree(prop);
}
Status myXAllocNamedColor(Display *dpy, Colormap cmap, char *color_name,
XColor *screen_def, XColor *exact_def)
{
Status s;
if((s=XAllocNamedColor(dpy, cmap, color_name, screen_def, exact_def)))
return s;
if((s=XLookupColor(dpy, cmap, color_name, screen_def, exact_def))||
(s=XParseColor(dpy, cmap, color_name, exact_def))) {
*screen_def = *exact_def;
screen_def->pixel = 0;
screen_def->flags = DoRed|DoGreen|DoBlue;
s=XAllocColor(dpy, cmap, screen_def);
}
return s;
}
unsigned long allocdripen(Display *dpy, int n, Colormap cm)
{
XColor screen, exact;
char *name;
if(!myXAllocNamedColor(dpy, cm, name = default_colors[n],
&screen, &exact)) {
fprintf(stderr, "%s: cannot allocate color %s\n", progname, name);
exit(1);
}
return screen.pixel;
}
void term_dri(struct DrawInfo *dri, Display *dpy, Colormap cm)
{
if(dri->dri_Pens) {
XFreeColors(dpy, cm, dri->dri_Pens, dri->dri_NumPens, 0);
free(dri->dri_Pens);
dri->dri_Pens = NULL;
}
#ifdef USE_FONTSETS
if(dri->dri_FontSet) {
XFreeFontSet(dpy, dri->dri_FontSet);
dri->dri_FontSet = NULL;
}
#else
if(dri->dri_Font) {
XFreeFont(dpy, dri->dri_Font);
dri->dri_Font = NULL;
}
#endif
}
void init_dri(struct DrawInfo *dri, Display *dpy, Window root, Colormap cm,
int override)
{
int i;
Atom driatom, dritypatom;
driatom=XInternAtom(dpy, "AMIWM_DRAWINFO", False);
dritypatom=XInternAtom(dpy, "DRAWINFO", False);
if(!override) {
memset(dri, 0, sizeof(*dri));
getdriprop(dpy, driatom, dritypatom, root, dri);
}
if(!dri->dri_Version)
dri->dri_Version = DRI_VERSION;
if(!dri->dri_Pens) {
if(!(dri->dri_Pens = calloc(sizeof(unsigned long), NUMDRIPENS))) {
fprintf(stderr, "%s: out of memory\n", progname);
exit(1);
}
for(i=0; i<NUMDRIPENS; i++)
dri->dri_Pens[i] = allocdripen(dpy, i, cm);
dri->dri_NumPens = NUMDRIPENS;
}
#ifdef USE_FONTSETS
if(!dri->dri_FontSet)
{
char *fn;
XFontStruct **fsl;
char **fnl;
char **missing_charsets = NULL;
int n_missing_charsets = 0;
if(dri->dri_FontSetAtom) {
fn = XGetAtomName(dpy, dri->dri_FontSetAtom);
} else {
dri->dri_FontSetAtom = XInternAtom(dpy, fn=default_screenfont, False);
}
dri->dri_FontSet = XCreateFontSet(dpy, fn,
&missing_charsets,
&n_missing_charsets, NULL);
if(missing_charsets)
XFreeStringList(missing_charsets);
if(!dri->dri_FontSet) {
fprintf(stderr, "%s: cannot open font %s\n", progname, fn);
exit(1);
}
if(XFontsOfFontSet(dri->dri_FontSet, &fsl, &fnl) < 1) {
fprintf(stderr, "%s: fontset %s is empty\n", progname, fn);
exit(1);
}
if(fn != default_screenfont)
XFree(fn);
#if 0
//dri->dri_Font = fsl[0];
dri->dri_Font = malloc(sizeof(XFontStruct));
memcpy(dri->dri_Font, fsl[0], sizeof(XFontStruct));
#else
dri->dri_Ascent = fsl[0]->ascent;
dri->dri_Descent = fsl[0]->descent;
dri->dri_MaxBoundsWidth = fsl[0]->max_bounds.width;
#endif
}
#else
if(!dri->dri_Font)
if(!(dri->dri_Font = XLoadQueryFont(dpy, default_screenfont))) {
fprintf(stderr, "%s: cannot open font %s\n", progname,
default_screenfont);
exit(1);
}
dri->dri_Ascent = dri->dri_Font->ascent;
dri->dri_Descent = dri->dri_Font->descent;
dri->dri_MaxBoundsWidth = dri->dri_Font->max_bounds.width;
#endif
if(override)
setdriprop(dpy, driatom, dritypatom, root, dri);
}

65
libami/drawinfo.h Normal file
View File

@@ -0,0 +1,65 @@
#ifndef DRAWINFO_H
#include <X11/Xlib.h>
#include <X11/Xmd.h>
#define DRI_VERSION (2)
struct DrawInfo
{
CARD16 dri_Version; /* will be DRI_VERSION */
CARD16 dri_NumPens; /* guaranteed to be >= 9 */
unsigned long *dri_Pens; /* pointer to pen array */
#ifdef USE_FONTSETS
XFontSet dri_FontSet; /* screen default font */
#else
XFontStruct *dri_Font; /* screen default font */
#endif
CARD16 dri_Depth; /* (initial) depth of screen bitmap */
struct { /* from DisplayInfo database for initial display mode */
CARD16 X;
CARD16 Y;
} dri_Resolution;
BITS32 dri_Flags; /* defined below */
/* New for V39: dri_CheckMark, dri_AmigaKey. */
Pixmap dri_CheckMark; /* pointer to scaled checkmark image
* Will be NULL if DRI_VERSION < 2
*/
Pixmap dri_AmigaKey; /* pointer to scaled Amiga-key image
* Will be NULL if DRI_VERSION < 2
*/
CARD32 dri_Ascent;
CARD32 dri_Descent;
CARD32 dri_MaxBoundsWidth;
#ifdef USE_FONTSETS
Atom dri_FontSetAtom;
CARD32 dri_Reserved; /* avoid recompilation ;^) */
#else
CARD32 dri_Reserved[2]; /* avoid recompilation ;^) */
#endif
};
#define DETAILPEN (0x0000) /* compatible Intuition rendering pens */
#define BLOCKPEN (0x0001) /* compatible Intuition rendering pens */
#define TEXTPEN (0x0002) /* text on background */
#define SHINEPEN (0x0003) /* bright edge on 3D objects */
#define SHADOWPEN (0x0004) /* dark edge on 3D objects */
#define FILLPEN (0x0005) /* active-window/selected-gadget fill */
#define FILLTEXTPEN (0x0006) /* text over FILLPEN */
#define BACKGROUNDPEN (0x0007) /* always color 0 */
#define HIGHLIGHTTEXTPEN (0x0008) /* special color text, on background */
/* New for V39, only present if DRI_VERSION >= 2: */
#define BARDETAILPEN (0x0009) /* text/detail in screen-bar/menus */
#define BARBLOCKPEN (0x000A) /* screen-bar/menus fill */
#define BARTRIMPEN (0x000B) /* trim under screen-bar */
#define NUMDRIPENS (0x000C)
#define DRAWINFO_H
extern void term_dri(struct DrawInfo *, Display *, Colormap);
extern void init_dri(struct DrawInfo *, Display *, Window, Colormap, int);
#endif

72
libami/error.c Normal file
View File

@@ -0,0 +1,72 @@
#include <stdio.h>
#include <string.h>
#include "libami.h"
#ifndef AMIGAOS
static int amiga_errno=0;
#define MIN_ERRNO 103
static const char *syserrmsg[] = {
"not enough memory available", /* 103 */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"bad template", /* 114 */
"bad number", /* 115 */
"required argument missing", /* 116 */
"value after keyword missing", /* 117 */
"wrong number of arguments", /* 118 */
NULL,
"argument line invalid or too long" /* 120 */
};
BOOL Fault(LONG code, UBYTE *header, UBYTE *buffer, LONG len)
{
amiga_errno=code;
if(header) {
int hdlen=strlen((char *)header);
if(hdlen+2>len)
return FALSE;
strcpy((char *)buffer, (char *)header);
buffer+=hdlen;
*buffer++=':';
*buffer++=' ';
len-=hdlen+2;
}
if(code>=MIN_ERRNO && code<MIN_ERRNO+sizeof(syserrmsg)/sizeof(syserrmsg[0])
&& syserrmsg[code-MIN_ERRNO]) {
if(len<strlen(syserrmsg[code-MIN_ERRNO])+1)
return FALSE;
strcpy((char *)buffer, syserrmsg[code-MIN_ERRNO]);
} else {
char number[6+4*sizeof(LONG)];
sprintf(number, "Error %ld", code);
if(len<strlen(number)+1)
return FALSE;
strcpy((char *)buffer, number);
}
return TRUE;
}
BOOL PrintFault(LONG code, UBYTE *header)
{
UBYTE buf[128];
if(Fault(code, header, buf, sizeof(buf))) {
fprintf(stderr, "%s\n", (char *)buf);
return TRUE;
} else return FALSE;
}
LONG IoErr()
{
return amiga_errno;
}
LONG SetIoErr(LONG code)
{
LONG old_errno=amiga_errno;
amiga_errno=code;
return old_errno;
}
#endif

21
libami/eventdispatcher.c Normal file
View File

@@ -0,0 +1,21 @@
#include "libami.h"
static int (*eventfunc[LASTEvent])(XEvent*);
static unsigned long eventmask=0;
static void eb_dispatch(XEvent *e, unsigned long mask)
{
if(e->type<0 || e->type>=LASTEvent || (!eventfunc[e->type]) ||
(!eventfunc[e->type](e)))
cx_send_event(mask, e);
}
void cx_event_broker(int type, unsigned long mask, int (*callback)(XEvent*))
{
if(type>=0 && type<LASTEvent) {
eventfunc[type]=callback;
cx_broker(eventmask|=mask, eb_dispatch);
}
}

152
libami/hotkey.c Normal file
View File

@@ -0,0 +1,152 @@
#include "libami.h"
#include <X11/keysym.h>
#include <stdlib.h>
#include <string.h>
static struct hotkey {
struct hotkey *next;
KeySym keysym;
unsigned int mod0;
int keycode;
unsigned int modifiers;
int meta, position;
int grab;
void (*callback)(XEvent *, void *);
void *client_data;
} *hotkeys = NULL;
static XModifierKeymap *modmap=NULL;
static KeySym *keymap=NULL;
static int kbd_mincode, kbd_maxcode, kbd_maxsym;
static unsigned int meta_mask, switch_mask;
static Display *dpy=NULL;
static void lookup_meta()
{
int i, j, k;
KeySym *kp;
unsigned int alt_mask = 0;
meta_mask = switch_mask = 0;
for(i=3; i<8; i++)
for(j=0; j<modmap->max_keypermod; j++)
for(kp=keymap+(modmap->modifiermap[i*modmap->max_keypermod+j]-
kbd_mincode)*kbd_maxsym, k=0; k<kbd_maxsym; k++)
switch(*kp++) {
case XK_Meta_L:
case XK_Meta_R:
meta_mask|=1<<i;
break;
case XK_Mode_switch:
switch_mask|=1<<i;
break;
case XK_Alt_L:
case XK_Alt_R:
alt_mask|=1<<i;
break;
}
if(meta_mask == 0)
meta_mask = (alt_mask? alt_mask :
(switch_mask? switch_mask : Mod1Mask));
}
static void lookup_hotkey(struct hotkey *hk)
{
if(!keymap) {
XDisplayKeycodes(dpy, &kbd_mincode, &kbd_maxcode);
keymap=XGetKeyboardMapping(dpy, kbd_mincode, kbd_maxcode-kbd_mincode+1,
&kbd_maxsym);
}
if(!modmap) {
modmap=XGetModifierMapping(dpy);
if(keymap)
lookup_meta();
}
hk->modifiers=hk->mod0|(hk->meta? meta_mask:0);
if(!(hk->keycode=XKeysymToKeycode(dpy, hk->keysym)))
if((hk->keysym&~0x20)>=XK_A && (hk->keysym&~0x20)<=XK_Z)
hk->keycode=XKeysymToKeycode(dpy, hk->keysym^0x20);
if(hk->keycode && keymap)
if(keymap[(hk->keycode-kbd_mincode)*kbd_maxsym])
;
else if(kbd_maxsym>1 && keymap[(hk->keycode-kbd_mincode)*kbd_maxsym+1])
hk->modifiers|=ShiftMask;
else if(kbd_maxsym>2 && keymap[(hk->keycode-kbd_mincode)*kbd_maxsym+2])
hk->modifiers|=switch_mask;
else if(kbd_maxsym>3 && keymap[(hk->keycode-kbd_mincode)*kbd_maxsym+3])
hk->modifiers|=ShiftMask|switch_mask;
}
static void rethink_keymap()
{
struct hotkey *hk;
if(keymap) {
XFree(keymap);
keymap=NULL;
}
if(modmap) {
XFreeModifiermap(modmap);
modmap=NULL;
}
for(hk=hotkeys; hk; hk=hk->next) {
int oldkc=hk->keycode;
unsigned oldmd=hk->modifiers;
lookup_hotkey(hk);
if(hk->grab>=0 && (hk->keycode!=oldkc || hk->modifiers!=oldmd)) {
md_ungrabkey(hk->grab);
hk->grab=-1;
}
if((hk->position & IN_WINDOW_MASK) && hk->grab<0)
hk->grab=md_grabkey(hk->keycode, hk->modifiers);
}
}
static int mappingfunc(XEvent *e)
{
if(e->xmapping.request==MappingKeyboard ||
e->xmapping.request==MappingModifier) {
e->xmapping.display=dpy;
XRefreshKeyboardMapping(&e->xmapping);
}
rethink_keymap();
return 0;
}
static int keypressfunc(XEvent *e)
{
struct hotkey *hk;
for(hk=hotkeys; hk; hk=hk->next)
if(hk->keycode==e->xkey.keycode &&
(hk->modifiers==e->xkey.state || (hk->modifiers & AnyModifier))) {
hk->callback(e, hk->client_data);
return 1;
}
return 0;
}
void cx_hotkey(KeySym ks, unsigned int mod, int m, int pos,
void (*cb)(XEvent *, void *), void *cd)
{
struct hotkey *hk=malloc(sizeof(struct hotkey));
if(hk) {
if(!dpy) {
dpy=md_display();
cx_event_broker(KeyPress, KeyPressMask, keypressfunc);
cx_event_broker(MappingNotify, 0, mappingfunc);
}
hk->next=hotkeys;
hk->keysym=ks;
hk->mod0=mod;
hk->meta=m;
hk->position=pos;
hk->callback=cb;
hk->client_data=cd;
lookup_hotkey(hk);
hk->grab=((pos&IN_WINDOW_MASK)? md_grabkey(hk->keycode, hk->modifiers):-1);
hotkeys=hk;
}
}

579
libami/iconlib.c Normal file
View File

@@ -0,0 +1,579 @@
#include "libami.h"
#include "alloc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifndef AMIGAOS
#define WBDISK 1
#define WBDRAWER 2
#define WBTOOL 3
#define WBPROJECT 4
#define WBGARBAGE 5
#define WBDEVICE 6
#define WBKICK 7
#define WBAPPICON 8
#define WB_DISKMAGIC 0xe310
char *BumpRevision(char *newbuf, char *oldname)
{
char tmpbuf[32];
int n;
if(!strncmp(oldname, "copy_of_", 8)) {
sprintf(newbuf, "copy_2_of_%.*s", 20, oldname);
} else if(2==sscanf(oldname, "copy_%d_of_%30s", &n, tmpbuf)) {
sprintf(newbuf, "copy_%d_of_", n+1);
tmpbuf[30-strlen(newbuf)]='\0';
strcat(newbuf, tmpbuf);
} else {
sprintf(newbuf, "copy_of_%.*s", 22, oldname);
}
return newbuf;
}
BOOL DeleteDiskObject(char *name)
{
int res;
#ifdef HAVE_ALLOCA
char *infoname=alloca(strlen(name)+8);
#else
char *infoname=malloc(strlen(name)+8);
if(infoname==NULL)
return FALSE;
#endif
sprintf(infoname, "%s.info", name);
res=unlink(infoname)>=0;
#ifndef HAVE_ALLOCA
free(infoname);
#endif
return res;
}
char *FindToolType(char **toolTypeArray, char *typeName)
{
char *p;
while((p=*toolTypeArray++)) {
char *p2=typeName;
while(*p2)
if(ToUpper(*p2)!=ToUpper(*p))
break;
else { p2++; p++; }
if(!*p2) {
if(!*p) return p;
if(*p=='=') return p+1;
}
}
return NULL;
}
void FreeDiskObject(struct DiskObject *diskobj)
{
if(diskobj->do_Gadget.GadgetRender) free(diskobj->do_Gadget.GadgetRender);
if(diskobj->do_Gadget.SelectRender) free(diskobj->do_Gadget.SelectRender);
if(diskobj->do_DefaultTool) free(diskobj->do_DefaultTool);
if(diskobj->do_ToolTypes) {
char *p, **pp=diskobj->do_ToolTypes;
while((p=*pp++)) free(p);
free(diskobj->do_ToolTypes);
}
if(diskobj->do_DrawerData) free(diskobj->do_DrawerData);
if(diskobj->do_ToolWindow) free(diskobj->do_ToolWindow);
free(diskobj);
}
static UWORD getu16(char **p)
{
union { UWORD n; char b[2]; } v;
#ifdef LAME_ENDIAN
v.b[1]=*(*p)++;
v.b[0]=*(*p)++;
#else
v.b[0]=*(*p)++;
v.b[1]=*(*p)++;
#endif
return v.n;
}
static WORD get16(char **p)
{
union { WORD n; char b[2]; } v;
#ifdef LAME_ENDIAN
v.b[1]=*(*p)++;
v.b[0]=*(*p)++;
#else
v.b[0]=*(*p)++;
v.b[1]=*(*p)++;
#endif
return v.n;
}
static ULONG getu32(char **p)
{
union { ULONG n; char b[4]; } v;
#ifdef LAME_ENDIAN
v.b[3]=*(*p)++;
v.b[2]=*(*p)++;
v.b[1]=*(*p)++;
v.b[0]=*(*p)++;
#else
v.b[0]=*(*p)++;
v.b[1]=*(*p)++;
v.b[2]=*(*p)++;
v.b[3]=*(*p)++;
#endif
return v.n;
}
static LONG get32(char **p)
{
union { LONG n; char b[4]; } v;
#ifdef LAME_ENDIAN
v.b[3]=*(*p)++;
v.b[2]=*(*p)++;
v.b[1]=*(*p)++;
v.b[0]=*(*p)++;
#else
v.b[0]=*(*p)++;
v.b[1]=*(*p)++;
v.b[2]=*(*p)++;
v.b[3]=*(*p)++;
#endif
return v.n;
}
#define SANITYMAXLEN (1<<20)
static char *loadstring(FILE *f)
{
ULONG l;
char buf[4], *p=buf;
if(1!=fread(buf, 4, 1, f) || (l=getu32(&p))>SANITYMAXLEN || !(p=malloc(l)))
return NULL;
fread(p, 1, l, f);
return p;
}
static char **loadtooltypes(FILE *f)
{
LONG i, n;
char **p, buf[4], *tp=buf;
if(1!=fread(buf, 4, 1, f) || (n=(getu32(&tp)>>2))>SANITYMAXLEN ||
!(p=calloc(n, sizeof(char *))))
return NULL;
--n;
for(i=0; i<n; i++)
if(!(p[i]=loadstring(f))) {
while(--i>=0)
free(p[i]);
free(p);
return NULL;
}
return p;
}
#define MAXICONSIZE 2000
static struct Image *loadimage(FILE *f)
{
char buf[20], *p=buf;
WORD le, te, w, h, d;
int imgsz;
struct Image *im;
if(1!=fread(buf, 20, 1, f))
return NULL;
le=get16(&p); te=get16(&p); w=get16(&p); h=get16(&p); d=get16(&p);
if(w<=0 || w>MAXICONSIZE || h<=0 || h>MAXICONSIZE || d<1 || d>8)
return NULL;
imgsz=2*((w+15)>>4)*h*d;
if(!(im=malloc(imgsz+sizeof(struct Image))))
return NULL;
im->LeftEdge=le; im->TopEdge=te; im->Width=w; im->Height=h;
im->Depth=d; im->ImageData=(UWORD*)getu32(&p);
im->PlanePick=*p++; im->PlaneOnOff=*p++;
im->NextImage=(struct Image *)getu32(&p);
if(im->ImageData) {
im->ImageData=(UWORD *)(im+1);
fread(im->ImageData, 1, imgsz, f);
}
return im;
}
static struct Image *backfillimage(struct Image *im)
{
return NULL;
}
#define GETBITS(v,n) do{if(bits<(n)){if(!srclen--)return dst-dst0;data=(data\
<<8)|*src++;bits+=8;};v=(data>>(bits-(n)))&((1<<(n))-1);bits-=(n);}while(0)
static LONG unpack_rle(unsigned char *src, LONG srclen, char *dst, LONG dstlen,
int bpp, int comp)
{
char *dst0 = dst;
unsigned char *srcn = src+srclen;
int bits=0, data=0;
if(!comp) {
if(srclen>dstlen)
srclen = dstlen;
memcpy(dst, src, srclen);
return srclen;
}
while(dstlen>0) {
int code;
GETBITS(code, 8);
if(code&0x80) {
char rpt;
GETBITS(rpt, bpp);
code -= 0x100;
if((dstlen-=(1-code))<0)
break;
do { *dst++ = rpt; } while(code++);
} else {
if((dstlen-=(code+1))<0)
break;
do GETBITS(*dst++, bpp); while(code--);
}
}
if(src != srcn)
fprintf(stderr, "Warning: Left %d bytes unused.\n", srcn-src);
return dst-dst0;
}
static void decode_IMAG(unsigned char *buf, LONG len, int width, int height,
APTR *im)
{
struct {
int transp, ncolors, flags, bodycomp, palcomp, bpp;
int bodybytes, palbytes;
} hdr;
char *dbuf;
struct Image *ii;
if(len<10)
return;
hdr.transp = *buf++;
hdr.ncolors = (*buf++)+1;
hdr.flags = *buf++;
hdr.bodycomp = *buf++;
hdr.palcomp = *buf++;
hdr.bpp = *buf++;
hdr.bodybytes = ((buf[0]<<8)|(buf[1]))+1;
hdr.palbytes = ((buf[2]<<8)|(buf[3]))+1;
buf+=4;
len -= 10;
if(!(hdr.flags&1))
hdr.transp = -1;
if(!(hdr.flags&2))
hdr.ncolors = 0;
if(hdr.bodybytes > len)
hdr.bodybytes = len;
if(hdr.palbytes+hdr.bodybytes > len)
hdr.palbytes = len-hdr.bodybytes;
if(hdr.bodycomp>1 || hdr.palcomp>1)
return;
if((dbuf = malloc(sizeof(struct Image)+width*height+3*hdr.ncolors+3))==NULL)
return;
/* body */
if(unpack_rle(buf, hdr.bodybytes, dbuf+sizeof(struct Image), width*height,
hdr.bpp, hdr.bodycomp) != width*height) {
free(dbuf);
return;
}
/* palette */
if(unpack_rle(buf+hdr.bodybytes, hdr.palbytes,
dbuf+sizeof(struct Image)+width*height+3, 3*hdr.ncolors,
8, hdr.palcomp) != 3*hdr.ncolors) {
free(dbuf);
return;
}
if(*im != NULL)
free(*im);
*im = (APTR) (ii = (struct Image *)dbuf);
dbuf += sizeof(struct Image);
ii->ImageData = (UWORD *)dbuf;
dbuf += width*height;
*dbuf++ = hdr.transp;
*dbuf++ = hdr.ncolors-1;
*dbuf++ = hdr.flags;
ii->LeftEdge = ii->TopEdge = 0;
ii->Width = width;
ii->Height = height;
ii->Depth = -1;
ii->PlanePick = ii->PlaneOnOff = 0;
ii->NextImage = NULL;
return;
}
static void decode_glowicon(struct DiskObject *diskobj, char *glow, LONG len)
{
int imgno=0, gotface=0;
struct { char width, height; UWORD dunno1, dunno2; } face;
while(len>=8) {
ULONG id = getu32(&glow);
LONG clen = get32(&glow);
char *chunk = glow;
len -= 8;
if(clen<0)
clen = len;
if(clen>len)
break;
switch(id) {
case 0x46414345: /* FACE */
if(clen>=6) {
face.width = 1+*chunk++;
face.height = 1+*chunk++;
face.dunno1 = getu16(&chunk);
face.dunno2 = getu16(&chunk);
gotface = 1;
diskobj->do_Gadget.Width = face.width;
diskobj->do_Gadget.Height = face.height;
break;
}
break;
case 0x494d4147: /* IMAG */
if(!gotface || imgno>1)
break;
decode_IMAG((unsigned char *)chunk, clen, face.width, face.height,
(imgno++? &diskobj->do_Gadget.SelectRender :
&diskobj->do_Gadget.GadgetRender));
break;
}
if(clen&1)
clen++;
len -= clen;
glow += clen;
}
}
static struct DiskObject *int_load_do(char *filename)
{
FILE *f;
struct DiskObject *diskobj;
char buf[78], *p=buf;
int error=0;
if((f=fopen(filename, "r"))) {
if(1==fread(buf, 78, 1, f) &&
(diskobj=calloc(1, sizeof(struct DiskObject)))) {
diskobj->do_Magic=getu16(&p); diskobj->do_Version=getu16(&p);
if(diskobj->do_Magic!=WB_DISKMAGIC) {
free(diskobj);
return NULL;
}
diskobj->do_Gadget.NextGadget=(struct Gadget *)getu32(&p);
diskobj->do_Gadget.LeftEdge=get16(&p);
diskobj->do_Gadget.TopEdge=get16(&p);
diskobj->do_Gadget.Width=get16(&p); diskobj->do_Gadget.Height=get16(&p);
diskobj->do_Gadget.Flags=getu16(&p);
diskobj->do_Gadget.Activation=getu16(&p);
diskobj->do_Gadget.GadgetType=getu16(&p);
diskobj->do_Gadget.GadgetRender=(APTR)getu32(&p);
diskobj->do_Gadget.SelectRender=(APTR)getu32(&p);
diskobj->do_Gadget.GadgetText=(struct IntuiText *)getu32(&p);
diskobj->do_Gadget.MutualExclude=get32(&p);
diskobj->do_Gadget.SpecialInfo=(APTR)getu32(&p);
diskobj->do_Gadget.GadgetID=getu16(&p);
diskobj->do_Gadget.UserData=(APTR)getu32(&p);
diskobj->do_Type=*p; p+=2;
diskobj->do_DefaultTool=(char *)getu32(&p);
diskobj->do_ToolTypes=(char **)getu32(&p);
diskobj->do_CurrentX=get32(&p);
diskobj->do_CurrentY=get32(&p);
diskobj->do_DrawerData=(struct DrawerData *)getu32(&p);
diskobj->do_ToolWindow=(char *)getu32(&p);
diskobj->do_StackSize=get32(&p);
if(diskobj->do_DrawerData) {
struct DrawerData *dd;
if(1==fread(buf, 56, 1, f) &&
(diskobj->do_DrawerData=dd=calloc(1, sizeof(struct DrawerData)))) {
p=buf;
dd->dd_NewWindow.LeftEdge=get16(&p);
dd->dd_NewWindow.TopEdge=get16(&p);
dd->dd_NewWindow.Width=get16(&p);
dd->dd_NewWindow.Height=get16(&p);
dd->dd_NewWindow.DetailPen=*p++;
dd->dd_NewWindow.BlockPen=*p++;
dd->dd_NewWindow.IDCMPFlags=getu32(&p);
dd->dd_NewWindow.Flags=getu32(&p);
dd->dd_NewWindow.FirstGadget=(struct Gadget *)getu32(&p);
dd->dd_NewWindow.CheckMark=(struct Image *)getu32(&p);
dd->dd_NewWindow.Title=(UBYTE *)getu32(&p);
dd->dd_NewWindow.Screen=(struct Screen *)getu32(&p);
dd->dd_NewWindow.BitMap=(struct BitMap *)getu32(&p);
dd->dd_NewWindow.MinWidth=get16(&p);
dd->dd_NewWindow.MinHeight=get16(&p);
dd->dd_NewWindow.MaxWidth=getu16(&p);
dd->dd_NewWindow.MaxHeight=getu16(&p);
dd->dd_NewWindow.Type=getu16(&p);
dd->dd_CurrentX=get32(&p);
dd->dd_CurrentY=get32(&p);
} else error++;
}
if(!(diskobj->do_Gadget.GadgetRender=loadimage(f)))
error++;
if(diskobj->do_Gadget.Flags&2)
if(!(diskobj->do_Gadget.SelectRender=loadimage(f)))
error++;
else ;
else if(diskobj->do_Gadget.Flags&1)
if(!(diskobj->do_Gadget.SelectRender=
backfillimage((struct Image *)diskobj->do_Gadget.GadgetRender)))
error++;
else ;
else diskobj->do_Gadget.SelectRender=NULL;
if(diskobj->do_DefaultTool)
if(!(diskobj->do_DefaultTool=loadstring(f)))
error++;
if(diskobj->do_ToolTypes)
if(!(diskobj->do_ToolTypes=loadtooltypes(f)))
error++;
if(diskobj->do_ToolWindow)
if(!(diskobj->do_ToolWindow=loadstring(f)))
error++;
if(diskobj->do_DrawerData && diskobj->do_Version) {
char buf[6], *p=buf;
if(1==fread(buf, 6, 1, f)) {
diskobj->do_DrawerData->dd_Flags=getu32(&p);
diskobj->do_DrawerData->dd_ViewModes=getu16(&p);
}
}
if(diskobj->do_Version) {
/* Check for GlowIcon */
char buf[8], *p = buf, *glowicon;
LONG len;
if(1==fread(buf, 4, 1, f) && !strncmp(buf, "FORM", 4) &&
1==fread(buf, 8, 1, f) && !strncmp(buf+4, "ICON", 4) &&
(len = get32(&p))>4 && (glowicon = malloc(len))!=NULL) {
if(1==fread(glowicon, len-4, 1, f))
decode_glowicon(diskobj, glowicon, len-4);
free(glowicon);
}
}
if(!error) {
fclose(f);
return diskobj;
}
FreeDiskObject(diskobj);
}
fclose(f);
}
return NULL;
}
struct DiskObject *GetDefDiskObject(LONG def_type)
{
static char *defnames[]= {
"disk", "drawer", "tool", "project",
"garbage", "device", "kick", "appicon"
};
static char *icondir=NULL;
static int l;
char *buf;
struct DiskObject *diskobj;
if(def_type<WBDISK || def_type>WBAPPICON)
return NULL;
if(!icondir)
if(!(icondir = get_current_icondir()))
return NULL;
else
l = strlen(icondir);
#ifdef HAVE_ALLOCA
buf = alloca(l+18);
#else
buf = malloc(l+18);
if(buf==NULL) return NULL;
#endif
sprintf(buf, "%s/def_%s.info", icondir, defnames[def_type-WBDISK]);
diskobj=int_load_do(buf);
#ifndef HAVE_ALLOCA
free(buf);
#endif
return diskobj;
}
struct DiskObject *GetDiskObject(char *name)
{
struct DiskObject *diskobj;
#ifdef HAVE_ALLOCA
char *buf = alloca(strlen(name)+6);
#else
char *buf = malloc(strlen(name)+6);
if(buf==NULL) return NULL;
#endif
sprintf(buf, "%s.info", name);
diskobj=int_load_do(buf);
#ifndef HAVE_ALLOCA
free(buf);
#endif
return diskobj;
}
struct DiskObject *GetDiskObjectNew(char *name)
{
struct DiskObject *d;
struct stat st;
if((d=GetDiskObject(name))) return d;
if(stat(name, &st)<0) return NULL;
if(S_ISREG(st.st_mode))
if(st.st_mode&0555)
return GetDefDiskObject(WBTOOL);
else
return GetDefDiskObject(WBPROJECT);
else if(S_ISDIR(st.st_mode))
return GetDefDiskObject(WBDRAWER);
else if(S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode))
return GetDefDiskObject(WBDEVICE);
else
return NULL;
}
#ifdef notdef
BOOL MatchToolValue(char *typeString, char *value)
{
}
BOOL PutDiskObject(char *name, struct DiskObject *diskobj)
{
}
#endif
#endif

126
libami/iconutil.c Normal file
View File

@@ -0,0 +1,126 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xmd.h>
#include "libami.h"
#include "alloc.h"
#include "drawinfo.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
Pixmap image_to_pixmap(Display *dpy, Window win, GC gc, unsigned long bg,
unsigned long *iconcolor, int iconcolormask,
struct Image *im, int width, int height,
struct ColorStore *cs)
{
int bpr, bitmap_pad, x, y;
XImage *ximg;
unsigned char *img;
Pixmap pm;
XWindowAttributes attr;
int fail=0;
if(!dpy || !win || !gc || !im || !(img=(unsigned char *)im->ImageData))
return None;
if(width<=0) width=im->Width;
if(height<=0) height=im->Height;
XGetWindowAttributes(dpy, win, &attr);
bpr=2*((im->Width+15)>>4);
if (attr.depth > 16)
bitmap_pad = 32;
else if (attr.depth > 8)
bitmap_pad = 16;
else
bitmap_pad = 8;
ximg=XCreateImage(dpy, attr.visual, attr.depth, ZPixmap, 0, NULL,
im->Width, im->Height, bitmap_pad, 0);
#ifndef HAVE_ALLOCA
if(!(ximg->data = malloc(ximg->bytes_per_line * im->Height))) {
XDestroyImage(ximg);
return None;
}
#else
ximg->data = alloca(ximg->bytes_per_line * im->Height);
#endif
if(im->Depth==-1) {
int transp, ncolors, flags;
unsigned char *pal = img + im->Width * im->Height;
unsigned long ic[256];
transp = *pal++;
ncolors = 1+*pal++;
flags = *pal++;
if(!(flags&1))
transp = -1;
if(!(flags&2))
ncolors = 0;
memset(ic, 0, sizeof(ic));
if(!ncolors) {
if(cs) cs->colors = NULL;
} else if(!cs || !(cs->colors = calloc(ncolors, sizeof(unsigned long)))) {
ncolors = 0;
fail = 1;
}
for(x=0; x<ncolors; x++) {
XColor color;
color.pixel = 0;
color.red = (*pal++)*0x101;
color.green = (*pal++)*0x101;
color.blue = (*pal++)*0x101;
color.flags = DoRed|DoGreen|DoBlue;
XAllocColor(dpy, attr.colormap, &color);
ic[x] = color.pixel;
}
if(cs) {
cs->cmap = attr.colormap;
cs->ncolors = ncolors;
if(ncolors) memcpy(cs->colors, ic, ncolors*sizeof(unsigned long));
}
for(y=0; y<im->Height; y++)
for(x=0; x<im->Width; x++)
XPutPixel(ximg, x, y, ic[*img++]);
} else
for(y=0; y<im->Height; y++)
for(x=0; x<im->Width; x++) {
unsigned char b=1, v=im->PlaneOnOff&~(im->PlanePick);
INT16 p=0;
while(p<im->Depth && b) {
if(b&im->PlanePick)
if(img[(p++*im->Height+y)*bpr+(x>>3)]&(128>>(x&7)))
v|=b;
b<<=1;
}
XPutPixel(ximg, x, y, iconcolor[v&iconcolormask]);
}
if((pm=(fail?None:XCreatePixmap(dpy, win, width, height, attr.depth)))) {
XSetForeground(dpy, gc, bg);
XFillRectangle(dpy, pm, gc, 0, 0, width, height);
XPutImage(dpy, pm, gc, ximg, 0, 0, im->LeftEdge, im->TopEdge,
im->Width, im->Height);
}
#ifndef HAVE_ALLOCA
free(ximg->data);
#endif
ximg->data=NULL;
XDestroyImage(ximg);
if(pm == None)
free_color_store(dpy, cs);
return pm;
}
void free_color_store(Display *dpy, struct ColorStore *cs)
{
if(cs && cs->colors) {
XFreeColors(dpy, cs->cmap, cs->colors, cs->ncolors, 0);
free(cs->colors);
cs->colors = NULL;
}
}

163
libami/iffparse.c Normal file
View File

@@ -0,0 +1,163 @@
#include "libami.h"
#include "alloc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifndef AMIGAOS
static LONG callIFFHook(struct IFFHandle *iff, LONG cmd, APTR buf, LONG nby)
{
struct IFFStreamCmd c;
c.sc_Command = cmd;
c.sc_Buf = buf;
c.sc_NBytes = nby;
if(iff->iff_Hook == NULL)
return IFFERR_NOHOOK;
else
return iff->iff_Hook->h_SubEntry(iff->iff_Hook, iff, &c);
}
LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
long numRecords );
LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
long numRecords );
LONG PushChunk( struct IFFHandle *iff, long type, long id, long size );
LONG PopChunk( struct IFFHandle *iff );
LONG EntryHandler( struct IFFHandle *iff, long type, long id, long position,
struct Hook *handler, APTR object );
LONG ExitHandler( struct IFFHandle *iff, long type, long id, long position,
struct Hook *handler, APTR object );
LONG PropChunk( struct IFFHandle *iff, long type, long id );
LONG PropChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
LONG StopChunk( struct IFFHandle *iff, long type, long id );
LONG StopChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
LONG CollectionChunk( struct IFFHandle *iff, long type, long id );
LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray,
long numPairs );
LONG StopOnExit( struct IFFHandle *iff, long type, long id );
struct StoredProperty *FindProp( struct IFFHandle *iff, long type, long id );
struct CollectionItem *FindCollection( struct IFFHandle *iff, long type,
long id );
struct ContextNode *FindPropContext( struct IFFHandle *iff );
struct ContextNode *CurrentChunk( struct IFFHandle *iff );
struct ContextNode *ParentChunk( struct ContextNode *contextNode );
struct LocalContextItem *AllocLocalItem( long type, long id, long ident,
long dataSize );
APTR LocalItemData( struct LocalContextItem *localItem );
void SetLocalItemPurge( struct LocalContextItem *localItem,
struct Hook *purgeHook );
void FreeLocalItem( struct LocalContextItem *localItem );
struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, long type,
long id, long ident );
LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem,
long position );
void StoreItemInContext( struct IFFHandle *iff,
struct LocalContextItem *localItem,
struct ContextNode *contextNode );
LONG GoodID( long id );
LONG GoodType( long type );
STRPTR IDtoStr( long id, STRPTR buf );
void InitIFF( struct IFFHandle *iff, long flags, struct Hook *streamHook )
{
iff->iff_Flags = flags;
iff->iff_Hook = streamHook;
}
struct IFFHandle *AllocIFF( void )
{
return (struct IFFHandle *)calloc(1, sizeof(struct IFFHandle));
}
LONG OpenIFF( struct IFFHandle *iff, long rwMode )
{
return callIFFHook(iff, IFFCMD_INIT, NULL, 0);
}
LONG ParseIFF( struct IFFHandle *iff, long control )
{
return IFFERR_NOHOOK;
}
void CloseIFF( struct IFFHandle *iff )
{
callIFFHook(iff, IFFCMD_CLEANUP, NULL, 0);
}
void FreeIFF( struct IFFHandle *iff )
{
free(iff);
}
#else
static ULONG __saveds __asm hllDispatch(register __a0 struct Hook *hook,
register __a2 APTR object,
register __a1 APTR message)
{
return ((ULONG (*)(struct Hook *, APTR, APTR))hook->h_SubEntry)
(hook, object, message);
}
#endif
static ULONG iffFileHook(struct Hook *hook, APTR object, APTR message)
{
struct IFFStreamCmd *cmd = (struct IFFStreamCmd *)message;
switch(cmd->sc_Command) {
case IFFCMD_INIT:
return 0;
case IFFCMD_CLEANUP:
close(((struct IFFHandle *)object)->iff_Stream);
return 0;
case IFFCMD_READ:
return IFFERR_READ;
case IFFCMD_WRITE:
return IFFERR_WRITE;
case IFFCMD_SEEK:
return IFFERR_SEEK;
}
return 0;
}
LONG OpenIFFasFile( struct IFFHandle *iff, char *fn, char *mode )
{
static struct Hook hook =
#ifdef AMIGAOS
{ { 0, 0 }, hllDispatch, iffFileHook, 0 };
#else
{ { 0, 0 }, 0, iffFileHook, 0 };
#endif
int m, fd;
LONG r;
if((fd = open(fn, (strchr(mode, 'w')==NULL? O_RDONLY :
(O_WRONLY|O_TRUNC|O_CREAT)), 0666))<0)
return IFFERR_READ;
iff->iff_Stream = fd;
InitIFF( iff, (strchr(mode, 'w')==NULL? (m=IFFF_READ|IFFF_RSEEK) :
(m=IFFF_WRITE|IFFF_RSEEK)), &hook );
if((r=OpenIFF( iff, m ))!=0) {
close(fd);
return r;
}
return 0;
}

23
libami/kbdsupport.c Normal file
View File

@@ -0,0 +1,23 @@
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <stdlib.h>
#include <string.h>
#include "libami.h"
#include "module.h"
int md_grabkey(int keycode, unsigned int modifiers)
{
int pkt[2], res=-1;
char *ptr=NULL;
pkt[0]=keycode; pkt[1]=modifiers;
if(md_command(None, MCMD_ADD_KEYGRAB, pkt, sizeof(pkt), &ptr)>=sizeof(int))
res=*((int*)ptr);
if(ptr) free(ptr);
return res;
}
int md_ungrabkey(int id)
{
return md_command0(None, MCMD_DEL_KEYGRAB, &id, sizeof(id));
}

BIN
libami/libami.a Normal file

Binary file not shown.

393
libami/libami.h Normal file
View File

@@ -0,0 +1,393 @@
#ifndef LIBAMI_H
#define LIBAMI_H
#include <X11/Xlib.h>
#include <X11/Xmd.h>
#ifdef AMIGAOS
#include <exec/types.h>
#include <exec/nodes.h>
#include <exec/lists.h>
#include <utility/hooks.h>
#include <dos/dos.h>
#include <dos/rdargs.h>
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/icon.h>
#include <proto/iffparse.h>
#include <proto/locale.h>
#else
#define GLOBAL extern
#define IMPORT extern
#define STATIC static
#define REGISTER register
#ifndef VOID
#define VOID void
#endif
#ifndef BYTE
#define BYTE Amiga_BYTE
#endif
#ifndef BOOL
#define BOOL Amiga_BOOL
#endif
typedef void *APTR;
typedef INT32 LONG;
typedef CARD32 ULONG;
typedef BITS32 LONGBITS;
typedef INT16 WORD;
typedef CARD16 UWORD;
typedef BITS16 WORDBITS;
typedef INT8 BYTE;
typedef CARD8 UBYTE;
typedef CARD8 BYTEBITS;
typedef CARD16 RPTR;
typedef unsigned char *STRPTR;
typedef INT16 BOOL;
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0L
#endif
#define WF_NOICONIFY 1
struct Node {
struct Node *ln_Succ;
struct Node *ln_Pred;
UBYTE ln_Type;
BYTE ln_Pri;
char *ln_Name;
};
struct MinNode {
struct MinNode *mln_Succ;
struct MinNode *mln_Pred;
};
struct List {
struct Node *lh_Head;
struct Node *lh_Tail;
struct Node *lh_TailPred;
UBYTE lh_Type;
UBYTE l_pad;
};
struct MinList {
struct MinNode *mlh_Head;
struct MinNode *mlh_Tail;
struct MinNode *mlh_TailPred;
};
extern void AddHead(struct List *, struct Node *);
extern void AddTail(struct List *, struct Node *);
extern void Enqueue(struct List *, struct Node *);
extern struct Node *FindName(struct List *, STRPTR);
extern void Insert(struct List *, struct Node *, struct Node *);
extern struct Node *RemHead(struct List *);
extern void Remove(struct Node *);
extern struct Node *RemTail(struct List *);
extern void NewList(struct List *);
struct CSource {
UBYTE *CS_Buffer;
LONG CS_Length;
LONG CS_CurChr;
};
struct RDArgs {
struct CSource RDA_Source;
void *RDA_DAList;
UBYTE *RDA_Buffer;
LONG RDA_BufSiz;
UBYTE *RDA_ExtHelp;
LONG RDA_Flags;
};
struct Image
{
WORD LeftEdge, TopEdge, Width, Height, Depth;
UWORD *ImageData;
UBYTE PlanePick, PlaneOnOff;
struct Image *NextImage;
};
struct Gadget
{
struct Gadget *NextGadget;
WORD LeftEdge, TopEdge, Width, Height;
UWORD Flags, Activation, GadgetType;
APTR GadgetRender, SelectRender;
struct IntuiText *GadgetText;
LONG MutualExclude;
APTR SpecialInfo;
UWORD GadgetID;
APTR UserData;
};
struct NewWindow
{
WORD LeftEdge, TopEdge, Width, Height;
UBYTE DetailPen, BlockPen;
ULONG IDCMPFlags, Flags;
struct Gadget *FirstGadget;
struct Image *CheckMark;
UBYTE *Title;
struct Screen *Screen;
struct BitMap *BitMap;
WORD MinWidth, MinHeight;
UWORD MaxWidth, MaxHeight;
UWORD Type;
};
struct DrawerData {
struct NewWindow dd_NewWindow;
LONG dd_CurrentX;
LONG dd_CurrentY;
ULONG dd_Flags;
UWORD dd_ViewModes;
};
struct DiskObject {
UWORD do_Magic;
UWORD do_Version;
struct Gadget do_Gadget;
UBYTE do_Type;
char *do_DefaultTool;
char **do_ToolTypes;
LONG do_CurrentX;
LONG do_CurrentY;
struct DrawerData *do_DrawerData;
char *do_ToolWindow;
LONG do_StackSize;
};
struct Hook
{
struct MinNode h_MinNode;
ULONG (*h_Entry)(); /* assembler entry point */
ULONG (*h_SubEntry)(); /* often HLL entry point */
APTR h_Data; /* owner specific */
};
struct IFFHandle
{
ULONG iff_Stream;
ULONG iff_Flags;
LONG iff_Depth; /* Depth of context stack */
/* private fields */
struct Hook *iff_Hook;
};
struct IFFStreamCmd
{
LONG sc_Command; /* Operation to be performed (IFFCMD_) */
APTR sc_Buf; /* Pointer to data buffer */
LONG sc_NBytes; /* Number of bytes to be affected */
};
#define RDAB_STDIN 0 /* Use "STDIN" rather than "COMMAND LINE" */
#define RDAF_STDIN 1
#define RDAB_NOALLOC 1 /* If set, do not allocate extra string space.*/
#define RDAF_NOALLOC 2
#define RDAB_NOPROMPT 2 /* Disable reprompting for string input. */
#define RDAF_NOPROMPT 4
#define ITEM_EQUAL -2 /* "=" Symbol */
#define ITEM_ERROR -1 /* error */
#define ITEM_NOTHING 0 /* *N, ;, endstreamch */
#define ITEM_UNQUOTED 1 /* unquoted item */
#define ITEM_QUOTED 2 /* quoted item */
#define MAX_TEMPLATE_ITEMS 100
#define MAX_MULTIARGS 128
#define ERROR_NO_FREE_STORE 103
#define ERROR_BAD_TEMPLATE 114
#define ERROR_BAD_NUMBER 115
#define ERROR_REQUIRED_ARG_MISSING 116
#define ERROR_KEY_NEEDS_ARG 117
#define ERROR_TOO_MANY_ARGS 118
#define ERROR_LINE_TOO_LONG 120
#define IFFERR_EOF -1L /* Reached logical end of file */
#define IFFERR_EOC -2L /* About to leave context */
#define IFFERR_NOSCOPE -3L /* No valid scope for property */
#define IFFERR_NOMEM -4L /* Internal memory alloc failed */
#define IFFERR_READ -5L /* Stream read error */
#define IFFERR_WRITE -6L /* Stream write error */
#define IFFERR_SEEK -7L /* Stream seek error */
#define IFFERR_MANGLED -8L /* Data in file is corrupt */
#define IFFERR_SYNTAX -9L /* IFF syntax error */
#define IFFERR_NOTIFF -10L /* Not an IFF file */
#define IFFERR_NOHOOK -11L /* No call-back hook provided */
#define IFF_RETURN2CLIENT -12L /* Client handler normal return */
#define IFFF_READ 0L /* read mode - default */
#define IFFF_WRITE 1L /* write mode */
#define IFFF_RWBITS (IFFF_READ | IFFF_WRITE) /* read/write bits */
#define IFFF_FSEEK (1L<<1) /* forward seek only */
#define IFFF_RSEEK (1L<<2) /* random seek */
#define IFFF_RESERVED 0xFFFF0000L /* Don't touch these bits */
#define IFFCMD_INIT 0 /* Prepare the stream for a session */
#define IFFCMD_CLEANUP 1 /* Terminate stream session */
#define IFFCMD_READ 2 /* Read bytes from stream */
#define IFFCMD_WRITE 3 /* Write bytes to stream */
#define IFFCMD_SEEK 4 /* Seek on stream */
#define IFFCMD_ENTRY 5 /* You just entered a new context */
#define IFFCMD_EXIT 6 /* You're about to leave a context */
#define IFFCMD_PURGELCI 7 /* Purge a LocalContextItem */
extern void FreeArgs(struct RDArgs *);
extern LONG ReadItem(STRPTR, LONG, struct CSource *);
extern LONG FindArg(STRPTR, STRPTR);
extern struct RDArgs * ReadArgs(STRPTR, LONG *, struct RDArgs *);
extern UBYTE ToUpper(UBYTE);
extern LONG StrToLong(STRPTR, LONG *);
extern LONG Stricmp(STRPTR, STRPTR);
extern char *BumpRevision(char *, char *);
extern BOOL DeleteDiskObject(char *);
extern void FreeDiskObject(struct DiskObject *);
extern struct DiskObject *GetDefDiskObject(LONG);
extern struct DiskObject *GetDiskObject(char *);
extern struct DiskObject *GetDiskObjectNew(char *);
extern BOOL MatchToolValue(char *, char *);
extern BOOL PutDiskObject(char *, struct DiskObject *);
extern BOOL Fault(LONG, UBYTE *, UBYTE *, LONG);
extern BOOL PrintFault(LONG, UBYTE *);
extern LONG IoErr();
extern LONG SetIoErr(LONG);
extern struct IFFHandle *AllocIFF( void );
extern LONG OpenIFF( struct IFFHandle *iff, long rwMode );
extern LONG ParseIFF( struct IFFHandle *iff, long control );
extern void CloseIFF( struct IFFHandle *iff );
extern void FreeIFF( struct IFFHandle *iff );
extern LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
extern LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
extern LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord, long numRecords );
extern LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord, long numRecords );
extern LONG PushChunk( struct IFFHandle *iff, long type, long id, long size );
extern LONG PopChunk( struct IFFHandle *iff );
extern LONG EntryHandler( struct IFFHandle *iff, long type, long id, long position, struct Hook *handler, APTR object );
extern LONG ExitHandler( struct IFFHandle *iff, long type, long id, long position, struct Hook *handler, APTR object );
extern LONG PropChunk( struct IFFHandle *iff, long type, long id );
extern LONG PropChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
extern LONG StopChunk( struct IFFHandle *iff, long type, long id );
extern LONG StopChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
extern LONG CollectionChunk( struct IFFHandle *iff, long type, long id );
extern LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
extern LONG StopOnExit( struct IFFHandle *iff, long type, long id );
extern struct StoredProperty *FindProp( struct IFFHandle *iff, long type, long id );
extern struct CollectionItem *FindCollection( struct IFFHandle *iff, long type, long id );
extern struct ContextNode *FindPropContext( struct IFFHandle *iff );
extern struct ContextNode *CurrentChunk( struct IFFHandle *iff );
extern struct ContextNode *ParentChunk( struct ContextNode *contextNode );
extern struct LocalContextItem *AllocLocalItem( long type, long id, long ident, long dataSize );
extern APTR LocalItemData( struct LocalContextItem *localItem );
extern void SetLocalItemPurge( struct LocalContextItem *localItem, struct Hook *purgeHook );
extern void FreeLocalItem( struct LocalContextItem *localItem );
extern struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, long type, long id, long ident );
extern LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem, long position );
extern void StoreItemInContext( struct IFFHandle *iff, struct LocalContextItem *localItem, struct ContextNode *contextNode );
extern void InitIFF( struct IFFHandle *iff, long flags, struct Hook *streamHook );
extern LONG GoodID( long id );
extern LONG GoodType( long type );
extern STRPTR IDtoStr( long id, STRPTR buf );
#endif
extern LONG OpenIFFasFile( struct IFFHandle *iff, char *fn, char *mode );
struct ColorStore { unsigned long *colors; int ncolors; Colormap cmap; };
extern Pixmap image_to_pixmap(Display *, Window, GC, unsigned long,
unsigned long *, int, struct Image *, int, int,
struct ColorStore *);
extern void free_color_store(Display *, struct ColorStore *);
typedef union { LONG num; APTR ptr; } Argtype;
extern void initargs(int, char **);
extern char *amiwm_version;
extern int md_fd;
extern Window md_root;
#define WINDOW_EVENT(e) ((e)->xany.display==(Display *)1)
#define FRAME_EVENT(e) ((e)->xany.display==(Display *)2)
#define ICON_EVENT(e) ((e)->xany.display==(Display *)3)
#define IN_ROOT_MASK 1
#define IN_WINDOW_MASK 2
#define IN_FRAME_MASK 4
#define IN_ICON_MASK 8
#define IN_ANYTHING_MASK (~0)
/* module.c */
extern void md_exit(int);
extern int md_handle_input(void);
extern void md_process_queued_events(void);
extern void md_main_loop(void);
extern int md_connection_number(void);
extern int md_command(XID, int, void *, int, char **);
extern int md_command0(XID, int, void *, int);
extern int md_command00(XID, int);
extern Display *md_display(void);
extern char *md_init(int, char *[]);
/* broker.c */
extern int cx_broker(unsigned long, void (*)(XEvent *, unsigned long));
extern int cx_send_event(unsigned long, XEvent *);
/* mdscreen.c */
extern int md_rotate_screen(Window);
extern int md_front(Window);
extern int md_back(Window);
extern int md_iconify(Window);
extern int md_errormsg(Window, char *);
/* eventdispatcher.c */
extern void cx_event_broker(int, unsigned long, int (*)(XEvent*));
/* kbdsupport.c */
extern int md_grabkey(int, unsigned int);
extern int md_ungrabkey(int);
/* hotkey.c */
extern void cx_hotkey(KeySym, unsigned int, int, int,
void (*)(XEvent*,void*), void*);
/* mdicon.c */
extern Window md_create_appicon(Window, int, int, char *,
Pixmap, Pixmap, Pixmap);
extern Pixmap md_image_to_pixmap(Window, unsigned long, struct Image *,
int, int, struct ColorStore *);
extern char *get_current_icondir(void);
/* mdwindow.c */
extern int md_set_appwindow(Window);
#endif

85
libami/lists.c Normal file
View File

@@ -0,0 +1,85 @@
#include "libami.h"
#ifndef AMIGAOS
void NewList(struct List *list)
{
list->lh_TailPred = (struct Node *)&list->lh_Head;
list->lh_Tail = NULL;
list->lh_Head = (struct Node *)&list->lh_Tail;
}
void AddHead(struct List *list, struct Node *node)
{
struct Node *oldhead = list->lh_Head;
list->lh_Head = node;
node->ln_Succ = oldhead;
node->ln_Pred = (struct Node *)&list->lh_Head;
oldhead->ln_Pred = node;
}
void AddTail(struct List *list, struct Node *node)
{
struct Node *oldtail = list->lh_TailPred;
list->lh_TailPred = node;
node->ln_Succ = (struct Node *)&list->lh_Tail;
node->ln_Pred = oldtail;
oldtail->ln_Succ = node;
}
struct Node *RemHead(struct List *list)
{
struct Node *node = list->lh_Head;
if(node->ln_Succ) {
list->lh_Head = node->ln_Succ;
node->ln_Succ->ln_Pred = (struct Node *)&list->lh_Head;
return node;
} else return NULL;
}
struct Node *RemTail(struct List *list)
{
struct Node *node = list->lh_TailPred;
if(node->ln_Pred) {
list->lh_TailPred = node->ln_Pred;
node->ln_Pred->ln_Succ = (struct Node *)&list->lh_Tail;
return node;
} else return NULL;
}
void Insert(struct List *list, struct Node *node, struct Node *after)
{
if(!after) after = (struct Node *)&list->lh_Head;
node->ln_Succ = after->ln_Succ;
node->ln_Pred = after;
after->ln_Succ->ln_Pred = node;
after->ln_Succ = node;
}
void Remove(struct Node *node)
{
node->ln_Pred->ln_Succ = node->ln_Succ;
node->ln_Succ->ln_Pred = node->ln_Pred;
}
void Enqueue(struct List *list, struct Node *node)
{
struct Node *before = list->lh_Head;
while(before->ln_Succ && before->ln_Pri >= node->ln_Pri)
before = before->ln_Succ;
node->ln_Succ = before;
node->ln_Pred = before->ln_Pred;
before->ln_Pred->ln_Succ = node;
before->ln_Pred = node;
}
struct Node *FindName(struct List *list, STRPTR name)
{
struct Node *node;
for(node = list->lh_Head; node->ln_Succ; node = node->ln_Succ)
if(!strcmp((char *)name, node->ln_Name))
return node;
return NULL;
}
#endif

71
libami/mdicon.c Normal file
View File

@@ -0,0 +1,71 @@
#include <stdlib.h>
#include <string.h>
#include "libami.h"
#include "module.h"
#include "alloc.h"
Window md_create_appicon(Window p, int x, int y, char *name,
Pixmap pm1, Pixmap pm2, Pixmap pmm)
{
char *data;
Window w;
int res, l=strlen(name);
#ifdef HAVE_ALLOCA
struct NewAppIcon *nai=alloca(sizeof(struct NewAppIcon)+l);
#else
struct NewAppIcon *nai=malloc(sizeof(struct NewAppIcon)+l);
if(nai==NULL) return None;
#endif
nai->x=x; nai->y=y;
nai->pm1=pm1; nai->pm2=pm2; nai->pmm=pmm;
strcpy(nai->name, name);
res=md_command(p, MCMD_CREATEAPPICON, nai, sizeof(struct NewAppIcon)+l,
&data);
if(res<sizeof(w)) {
if(data) free(data);
#ifndef HAVE_ALLOCA
free(nai);
#endif
return None;
}
memcpy(&w, data, sizeof(w));
free(data);
#ifndef HAVE_ALLOCA
free(nai);
#endif
return w;
}
Pixmap md_image_to_pixmap(Window w, unsigned long bgcolor, struct Image *i,
int width, int height, struct ColorStore *cs)
{
Display *dpy = md_display();
static GC gc = None;
Pixmap pm;
static int iconcolormask;
static unsigned long *iconcolor = NULL;
if(gc == None && w != None)
gc = XCreateGC(dpy, w, 0, NULL);
if(iconcolor == NULL) {
char *p;
int res = md_command(w, MCMD_GETICONPALETTE, NULL, 0, &p);
if(res<0)
return None;
iconcolor = (unsigned long *)(void *)p;
iconcolormask = (res/sizeof(unsigned long))-1;
}
pm = image_to_pixmap(md_display(), w, gc, bgcolor, iconcolor, iconcolormask,
i, width, height, cs);
return pm;
}
char *get_current_icondir()
{
char *p;
if(md_command(None, MCMD_GETICONDIR, NULL, 0, &p)>=0 && p)
return p;
if(p) free(p);
return NULL;
}

35
libami/mdscreen.c Normal file
View File

@@ -0,0 +1,35 @@
#include "libami.h"
#include "module.h"
#include <string.h>
int md_rotate_screen(XID id)
{
return md_command00(id, MCMD_ROTATE_SCREEN);
}
int md_front(XID id)
{
return md_command00(id, MCMD_FRONT);
}
int md_back(XID id)
{
return md_command00(id, MCMD_BACK);
}
int md_iconify(XID id)
{
return md_command00(id, MCMD_ICONIFY);
}
int md_errormsg(Window id, char *str)
{
return md_command0(id, MCMD_ERRORMSG, str, strlen(str));
}
int md_managemenu(Window id, int menu, int item, int subitem)
{
int data[3];
data[0]=menu; data[1]=item; data[2]=subitem;
return md_command0(id, MCMD_MANAGEMENU, data, sizeof(data));
}

7
libami/mdwindow.c Normal file
View File

@@ -0,0 +1,7 @@
#include "libami.h"
#include "module.h"
int md_set_appwindow(Window w)
{
return md_command00(w, MCMD_SETAPPWINDOW);
}

236
libami/module.c Normal file
View File

@@ -0,0 +1,236 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <signal.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "libami.h"
#include "module.h"
#include "alloc.h"
static int md_in_fd=-1, md_out_fd=-1;
static char *md_name = "";
char *amiwm_version;
Window md_root = None;
static int md_int_len=0;
static char *md_int_buf=NULL;
void (*md_broker_func)(XEvent *, unsigned long);
void md_exit(int signal)
{
if(md_in_fd>=0)
close(md_in_fd);
if(md_out_fd>=0)
close(md_out_fd);
exit(0);
}
static int md_write(void *ptr, int len)
{
char *p=ptr;
int r, tot=0;
while(len>0) {
if((r=write(md_out_fd, p, len))<0)
if(errno==EINTR)
continue;
else
return r;
if(!r)
return tot;
tot+=r;
p+=r;
len-=r;
}
return tot;
}
static int md_read(void *ptr, int len)
{
char *p=ptr;
int r, tot=0;
while(len>0) {
if((r=read(md_in_fd, p, len))<0)
if(errno==EINTR)
continue;
else
return r;
if(!r)
if(tot)
return tot;
else
md_exit(0);
tot+=r;
p+=r;
len-=r;
}
return tot;
}
static int md_int_load(int len)
{
if(len>=md_int_len)
if(md_int_buf!=NULL)
md_int_buf=realloc(md_int_buf, md_int_len=len+1);
else
md_int_buf=malloc(md_int_len=len+1);
md_int_buf[len]='\0';
return md_read(md_int_buf, len);
}
static struct md_queued_event {
struct md_queued_event *next;
struct mcmd_event e;
} *event_head=NULL, *event_tail=NULL;
void md_process_queued_events()
{
struct md_queued_event *e;
while((e=event_head)) {
event_head=e->next;
md_broker_func(&e->e.event, e->e.mask);
free(e);
}
}
static void md_enqueue(struct mcmd_event *e)
{
struct md_queued_event *qe=malloc(sizeof(struct md_queued_event));
if(qe) {
qe->e=*e;
qe->next=NULL;
if(event_head) {
event_tail->next=qe;
event_tail=qe;
} else {
event_head=event_tail=qe;
}
}
}
static int md_get_async(int len)
{
if(md_int_load(len)!=len)
return -1;
if(md_broker_func)
md_enqueue((struct mcmd_event *)md_int_buf);
return 1;
}
int md_handle_input()
{
int res;
if(md_read(&res, sizeof(res))!=sizeof(res))
return -1;
if(res>=0) {
if(!res)
return 0;
md_int_load(res);
return 0;
} else {
res=~res;
if(!res)
return 0;
return md_get_async(res);
}
}
int md_command(XID id, int cmd, void *data, int data_len, char **buffer)
{
int res;
struct mcmd_header mcmd;
*buffer=NULL;
mcmd.id = id;
mcmd.cmd = cmd;
mcmd.len = data_len;
if(md_write(&mcmd, sizeof(mcmd))!=sizeof(mcmd) ||
md_write(data, data_len)!=data_len ||
md_read(&res, sizeof(res))!=sizeof(res))
return -1;
while(res<-1) {
md_get_async(~res);
if(md_read(&res, sizeof(res))!=sizeof(res))
return -1;
}
if(res>0) {
*buffer=malloc(res);
if(md_read(*buffer, res)!=res)
return -1;
}
return res;
}
int md_command0(XID id, int cmd, void *data, int data_len)
{
char *ptr=NULL;
int res=md_command(id, cmd, data, data_len, &ptr);
if(ptr) free(ptr);
return res;
}
int md_command00(XID id, int cmd)
{
return md_command0(id, cmd, NULL, 0);
}
static void md_fail()
{
fprintf(stderr, "%s: cannot establish connection to amiwm\n", md_name);
exit(1);
}
Display *md_display()
{
static Display *dpy=NULL;
if(!dpy)
dpy=XOpenDisplay(NULL);
return dpy;
}
char *md_init(int argc, char *argv[])
{
if(argc>0)
md_name=argv[0];
if(argc>2) {
md_in_fd=strtol(argv[1], NULL, 0);
md_out_fd=strtol(argv[2], NULL, 0);
} else
md_fail();
signal(SIGHUP, md_exit);
signal(SIGPIPE, md_exit);
if(argc>3)
md_root=strtol(argv[3], NULL, 0);
else
md_root=None;
if(md_command(None, MCMD_GET_VERSION, NULL, 0, &amiwm_version)<=0)
md_fail();
return (argc>4? argv[4]:NULL);
}
void md_main_loop()
{
do md_process_queued_events(); while(md_handle_input()>=0);
}
int md_connection_number()
{
return md_in_fd;
}

537
libami/readargs.c Normal file
View File

@@ -0,0 +1,537 @@
#include "libami.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef AMIGAOS
void initargs(int argc, char **argv)
{
}
#else
static char *cmdline=NULL;
int cmdline_allocated=0, cmdline_used=0;
static void addachar(char c)
{
if(cmdline_used>=cmdline_allocated) {
if(!cmdline_allocated) cmdline_allocated=128;
while(cmdline_allocated<=cmdline_used)
cmdline_allocated<<=1;
if(cmdline!=NULL)
cmdline=realloc(cmdline, cmdline_allocated);
else
cmdline=malloc(cmdline_allocated);
}
cmdline[cmdline_used++]=c;
}
static void addquoted(const char *arg)
{
char ch;
addachar(' '); addachar('"');
while((ch=*arg++)) switch(ch) {
case '\n': addachar('*'); addachar('N'); break;
case '\"': addachar('*'); addachar('\"'); break;
case '*': addachar(ch);
default: addachar(ch);
}
addachar('"');
}
static void addunquoted(const char *arg, int cnt)
{
if(cnt) {
addachar(' ');
while(cnt--)
addachar(*arg++);
}
}
static void addarg(const char *arg)
{
if(*arg!='\"') {
int plain=strcspn(arg, "\t\n ;=");
if(!arg[plain]) {
addunquoted(arg, plain);
return;
} else if(arg[plain]=='=') {
addunquoted(arg, plain);
addunquoted("=", 1);
arg+=plain+1;
if(!*arg)
return;
}
}
addquoted(arg);
}
void initargs(int argc, char **argv)
{
while(--argc) addarg(*++argv);
addachar('\n');
addachar('\0');
}
#endif
#ifndef AMIGAOS
#define RDAF_PRIVATE1 0x40000000
#define RDAF_PRIVATE2 0x20000000
void FreeArgs(struct RDArgs *rdargs)
{
if(rdargs) {
APTR daelt, nextda = (APTR)rdargs->RDA_DAList;
rdargs->RDA_Buffer = NULL;
rdargs->RDA_Flags &= (RDAF_PRIVATE1 | RDAF_PRIVATE2);
rdargs->RDA_DAList = NULL;
while((daelt = nextda)) {
nextda = ((Argtype *)daelt)->ptr;
free(daelt);
}
}
}
static UBYTE * ra_alloc(struct RDArgs *rdargs, ULONG size)
{
UBYTE *ptr=NULL;
if((!(rdargs->RDA_Flags & RDAF_NOALLOC)) &&
(ptr=malloc(size+sizeof(Argtype)))) {
memset(ptr, 0, size+sizeof(Argtype));
((Argtype *)ptr)->ptr=rdargs->RDA_DAList;
rdargs->RDA_DAList=ptr;
ptr+=sizeof(Argtype);
}
return ptr;
}
static UBYTE * ra_realloc(struct RDArgs *rdargs, UBYTE **start, UBYTE **end)
{
UBYTE *oldstart=*start;
ULONG newlength=((*end-oldstart+144)&~0x7f)-8;
UBYTE *newstart=ra_alloc(rdargs, newlength+4);
if(!newstart)
return NULL;
*start=newstart;
*end=newstart+newlength;
return oldstart;
}
static LONG CS_ReadChar(struct CSource *cSource)
{
if(!cSource || ((LONG)cSource)==-1 || !cSource->CS_Buffer) {
if(cmdline && *cmdline) {
return (unsigned char)(*cmdline++);
} else
return getchar();
}
if(cSource->CS_CurChr >= cSource->CS_Length)
return -1;
return cSource->CS_Buffer[cSource->CS_CurChr++];
}
static void CS_UnReadChar(struct CSource *cSource, UBYTE ch)
{
if(!cSource || ((LONG)cSource)==-1 || !cSource->CS_Buffer) {
if(cmdline && *cmdline)
--cmdline;
else
ungetc(ch, stdin);
} else if(cSource->CS_CurChr > 0)
--cSource->CS_CurChr;
}
static LONG intreaditem(STRPTR buffer, LONG maxchars, struct CSource *input,
int mode, UBYTE **start, UBYTE **end)
{
int itemlen=0;
int ch, quote='\0';
buffer[0]='\0';
do ch=CS_ReadChar(input); while(ch==' ' || ch=='\t');
if(ch=='"') { quote=ch; ch=CS_ReadChar(input); }
while(ch!='\n' && ch>=0) {
if(quote) {
if(ch==quote)
return ITEM_QUOTED;
if(ch=='*') {
ch=CS_ReadChar(input);
if(ch<0 || ch=='\n') break;
if(ch=='e' || ch=='E') ch='\033';
if(ch=='n' || ch=='N') ch='\n';
}
} else {
if(ch==';')
break;
if(ch==' ' || ch=='\t' || (ch=='=' && itemlen)) {
if(mode<0)
CS_UnReadChar(input, ch);
return ITEM_UNQUOTED;
}
if(ch=='=')
return ITEM_EQUAL;
}
if(++itemlen>=maxchars) {
UBYTE *bufswap;
if(mode<=0 || !(bufswap=ra_realloc((struct RDArgs *)input, start, end)))
return ITEM_ERROR;
memcpy(*start, bufswap, itemlen-1);
buffer=*start+itemlen-1;
maxchars=*end-*start;
}
if(mode<0) {
buffer[itemlen]=ch;
buffer[itemlen+1]='\0';
buffer[0]=itemlen;
} else {
*buffer++=ch;
*buffer='\0';
}
ch=CS_ReadChar(input);
}
CS_UnReadChar(input, ch);
return (quote? ITEM_ERROR : (itemlen? ITEM_UNQUOTED : ITEM_NOTHING));
}
LONG ReadItem(STRPTR buffer, LONG maxchars, struct CSource *input)
{
return intreaditem(buffer, maxchars, input, 0, NULL, NULL);
}
LONG FindArg(STRPTR template, STRPTR keyword)
{
int kwlen=strlen((char *)keyword);
int kwindex, argindex=0;
char ch;
for(;;) {
kwindex=0;
do {
ch=*template++;
if(!ch)
return (kwindex == kwlen? argindex : -1);
if(ch == ',' || ch == '=' || ch == '/')
if(kwindex == kwlen)
return argindex;
else
break;
} while(ToUpper(ch) == ToUpper(keyword[kwindex++]));
while(ch != '=') {
if(ch == ',') {
argindex++;
break;
}
ch=*template++;
if(!ch)
return -1;
}
}
}
#define RA_ALWAYS 1
#define RA_KEYWORD 2
#define RA_SWITCH 4
#define RA_NUMERIC 8
#define RA_FORCE 16
#define RA_TOGGLE 32
#define RA_MULTI 64
#define RA_FOUND 128
static LONG parseswitches(STRPTR template, LONG len, UBYTE *flags, int *numargs)
{
static struct ra_switch { UBYTE flag, ch; } switches[] = {
{ RA_ALWAYS, 'A' },
{ RA_KEYWORD, 'K' },
{ RA_SWITCH, 'S' },
{ RA_NUMERIC, 'N' },
{ RA_FORCE, 'F' },
{ RA_TOGGLE, 'T' },
{ RA_MULTI, '.' },
{ RA_MULTI, 'M' },
{ 0, 0 }
};
struct ra_switch *sw;
int m_used=0;
UBYTE ch;
*numargs=0;
while(++*numargs<=MAX_TEMPLATE_ITEMS) {
*flags++=0;
do {
if(--len<0)
return 0;
if((ch=*template++)=='/') {
ch=ToUpper(*template++);
--len;
for(sw=switches; sw->ch; sw++)
if(sw->ch == ch) {
flags[-1]|=sw->flag;
if((sw->flag&RA_MULTI) && m_used++)
return ERROR_BAD_TEMPLATE;
}
}
} while(ch != ',');
}
return ERROR_LINE_TOO_LONG;
}
static LONG rareaditem(struct RDArgs *rdargs, UBYTE **start, UBYTE **end)
{
while(*end-*start-1<0)
if(!rdargs || !ra_realloc(rdargs, start, end))
return ITEM_ERROR;
return (rdargs?
intreaditem(*start, *end-*start-1, &rdargs->RDA_Source, 1, start, end):
intreaditem(*start, *end-*start-2, (struct CSource *)-1, -1, start, end));
}
struct RDArgs * ReadArgs(STRPTR template, LONG *array, struct RDArgs *rdargs)
{
LONG itemtype;
UBYTE *multiargs[MAX_MULTIARGS+1];
UBYTE switches[MAX_TEMPLATE_ITEMS];
UBYTE *start, *end, sw, *swptr;
Argtype *lastmarg=NULL;
int multinum=0;
int argnum;
LONG ch, error=0;
int numargs;
int munched;
if(rdargs) {
rdargs->RDA_DAList=NULL;
if(!rdargs->RDA_Buffer) {
if(!(rdargs->RDA_Buffer=ra_alloc(rdargs, 128+4)))
goto nomemfail;
rdargs->RDA_BufSiz=128;
}
} else {
rdargs=malloc(128+4+sizeof(struct RDArgs)+sizeof(Argtype));
if(!rdargs)
goto nomemfail;
memset(rdargs, 0, 128+4+sizeof(struct RDArgs)+sizeof(Argtype));
rdargs=(struct RDArgs *)(((char *)rdargs)+sizeof(Argtype));
rdargs->RDA_Buffer=((UBYTE*)rdargs)+sizeof(struct RDArgs);
rdargs->RDA_DAList=(((char *)rdargs)-sizeof(Argtype));
rdargs->RDA_BufSiz=128;
}
start=rdargs->RDA_Buffer;
end=rdargs->RDA_Buffer+rdargs->RDA_BufSiz;
if((error=parseswitches(template, strlen((char *)template),
switches, &numargs)))
goto fail;
for(;;) {
argnum=-1;
switch(itemtype=rareaditem(rdargs, &start, &end)) {
case ITEM_NOTHING:
swptr=switches;
while(numargs-->0) {
int isnumeric=0;
if((*swptr)&RA_MULTI)
if(multinum) {
((Argtype *)array)->ptr=ra_alloc(rdargs,
sizeof(Argtype)*(multinum+1));
if(!((Argtype *)array)->ptr)
goto nomemfail;
memcpy(((Argtype *)array)->ptr, multiargs, sizeof(Argtype)*multinum);
lastmarg=((Argtype *)(((Argtype *)array)->ptr))+multinum-1;
lastmarg[1].ptr=NULL;
isnumeric=((*swptr)&RA_NUMERIC)!=0;
}
else ((Argtype *)array)->ptr=NULL;
array=(LONG*)(((Argtype *)array)+1);
if(!((sw=*swptr++)&RA_FOUND) && (sw&RA_ALWAYS)) {
if((!lastmarg) || (sw&RA_KEYWORD) || multinum<2 ||
isnumeric!=((sw&RA_NUMERIC)!=0)) {
error=ERROR_REQUIRED_ARG_MISSING;
goto fail;
}
((Argtype *)array)[-1].ptr=lastmarg->ptr;
(lastmarg--)->ptr=NULL;
--multinum;
}
}
CS_ReadChar(&rdargs->RDA_Source);
return rdargs;
case ITEM_UNQUOTED:
argnum=FindArg(template, start);
if(argnum<0)
goto not_namedarg;
sw=switches[argnum];
if(sw&RA_SWITCH) {
((Argtype *)array)[argnum].num=-1;
break;
}
if(!(sw&RA_FORCE)) {
LONG argt;
if((argt=rareaditem(rdargs, &start, &end))==ITEM_EQUAL)
argt=rareaditem(rdargs, &start, &end);
if(argt==ITEM_NOTHING) {
error=ERROR_KEY_NEEDS_ARG;
goto fail;
} else if(argt<0) {
error=ERROR_LINE_TOO_LONG;
goto fail;
} else
goto quoted;
}
munched=0;
force:
if(end-start<=munched) {
UBYTE *old;
if(!(old=ra_realloc(rdargs, &start, &end)))
goto nomemfail;
memcpy(start, old, munched);
}
if((ch=CS_ReadChar(&rdargs->RDA_Source))>=0 && ch!='\n') {
start[munched++]=ch;
goto force;
}
if(itemtype!=ITEM_QUOTED)
while((start[munched-1]==' ' || start[munched-1]=='\t') && --munched>0);
start[munched]='\0';
goto quoted2;
not_namedarg:
ch=CS_ReadChar(&rdargs->RDA_Source);
if(ch<0)
goto quoted;
if(ch=='\n' && start[0]=='?' && start[1]=='\0' &&
!(rdargs->RDA_Flags & RDAF_NOPROMPT)) {
UBYTE *helptext = template;
if(!(rdargs->RDA_Flags & RDAF_PRIVATE1)) {
rdargs->RDA_Flags |= RDAF_PRIVATE1;
if(rdargs->RDA_ExtHelp)
helptext=rdargs->RDA_ExtHelp;
}
fprintf(stderr, "%s: ", (char *)helptext);
fflush(stderr);
break;
}
quoted2:
CS_UnReadChar((struct CSource *)rdargs, ch);
quoted:
case ITEM_QUOTED:
if(argnum<0) {
swptr=switches;
error=ERROR_TOO_MANY_ARGS;
for(;;) {
if(++argnum>=numargs)
goto fail;
if((*swptr)&RA_MULTI)
break;
if((sw=*swptr++)&RA_FOUND)
continue;
if(sw&RA_FORCE) {
munched=strlen((char *)start);
if(itemtype!=ITEM_QUOTED)
start[munched++]=' ';
goto force;
}
if(!(sw&RA_KEYWORD))
if(!(sw&=(RA_TOGGLE|RA_SWITCH)))
break;
}
}
sw=switches[argnum];
switches[argnum]|=RA_FOUND;
if(!rdargs) {
((Argtype *)array)[argnum].num=((LONG)start)>>2;
start+=((*start)&~3)+4;
continue;
}
if(sw&RA_MULTI) {
if(multinum>=MAX_MULTIARGS-1) {
error=ERROR_LINE_TOO_LONG;
goto fail;
} if(sw&RA_NUMERIC)
goto numeric;
multiargs[multinum++]=start;
} else if((sw&RA_FOUND)&&!(sw&RA_SWITCH)) {
error=ERROR_TOO_MANY_ARGS;
goto fail;
} else if(sw&RA_TOGGLE) {
if(Stricmp(start, (STRPTR)"yes"))
((Argtype*)array)[argnum].num=-1;
else if(Stricmp(start, (STRPTR)"no"))
((Argtype*)array)[argnum].num=0;
else if(Stricmp(start, (STRPTR)"on"))
((Argtype*)array)[argnum].num=-1;
else if(Stricmp(start, (STRPTR)"off"))
((Argtype*)array)[argnum].num=0;
else {
error=ERROR_KEY_NEEDS_ARG;
goto fail;
}
} else if(sw&RA_NUMERIC) {
LONG n; int len;
numeric:
if((len=StrToLong(start, &n))<=0 || len!=strlen((char *)start)) {
error=ERROR_BAD_NUMBER;
goto fail;
}
start+=sizeof(Argtype)-1;
start-=((LONG)start)&(sizeof(Argtype)-1);
if(end-start<sizeof(LONG))
if(!ra_realloc(rdargs, &start, &end))
goto nomemfail;
*(LONG *)start=n;
if(sw&RA_MULTI)
multiargs[multinum++]=start;
else
((Argtype*)array)[argnum].ptr=start;
start+=sizeof(LONG);
continue;
} else
((Argtype*)array)[argnum].ptr=start;
start+=strlen((char *)start)+1;
break;
default:
error=ERROR_LINE_TOO_LONG;
goto fail;
}
}
nomemfail:
error=ERROR_NO_FREE_STORE;
fail:
do
ch=CS_ReadChar(&rdargs->RDA_Source);
while(ch!='\n' && ch!=';' && ch>=0);
if(rdargs)
FreeArgs(rdargs);
SetIoErr(error);
return NULL;
}
#endif

36
libami/strutil.c Normal file
View File

@@ -0,0 +1,36 @@
#include "libami.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <ctype.h>
#ifndef AMIGAOS
UBYTE ToUpper(UBYTE ch)
{
static int firstcall=1;
if(firstcall) {
setlocale(LC_CTYPE, "");
firstcall=0;
}
return toupper(ch);
}
LONG StrToLong(STRPTR str, LONG *n)
{
STRPTR end;
*n=strtol((char *)str, (char **)&end, 0);
return end-str;
}
LONG Stricmp(STRPTR a, STRPTR b)
{
while(*a && *b)
if(ToUpper(*a++)!=ToUpper(*b++))
return FALSE;
return !(*a || *b);
}
#endif

3
magicwb.map Normal file
View File

@@ -0,0 +1,3 @@
P3 4 2 255
170 170 170 0 0 0 255 255 255 102 136 187
153 153 153 187 187 187 187 170 153 255 187 170

1582
main.c Normal file

File diff suppressed because it is too large Load Diff

949
menu.c Normal file
View File

@@ -0,0 +1,949 @@
#include <X11/Xlib.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "alloc.h"
#include "drawinfo.h"
#include "prefs.h"
#include "screen.h"
#include "client.h"
#include "icon.h"
#include "version.h"
#define ABOUT_STRING(LF) \
" " LF "version "VERSION LF "by Marcus Comstedt" LF \
"<marcus@lysator.liu.se>" LF " " LF \
"Contributions by Scott Lawrence" LF "<amiwm10@umlautllama.com>" LF \
"and Nicolas Sipieter " LF "<freeeaks@gmail.com>" LF " " LF
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
#ifdef AMIGAOS
#define BIN_PREFIX AMIWM_HOME
#else
#define BIN_PREFIX AMIWM_HOME"/"
#endif
#define CHECKIT 1
#define CHECKED 2
#define DISABLED 4
extern Display *dpy;
extern Cursor wm_curs;
extern XContext screen_context, client_context;
extern Client *activeclient;
extern void select_all_icons(Scrn *i);
extern void mod_menuselect(struct module *, int, int, int);
extern void setfocus(Window);
extern void flushmodules();
Scrn *mbdclick=NULL, *mbdscr=NULL;
static struct ToolItem {
struct ToolItem *next;
const char *name, *cmd;
char hotkey;
int level;
struct Menu *submenu;
} *firsttoolitem=NULL, *lasttoolitem=NULL;
static struct Item {
struct Item *next;
Window win;
const char *text;
int textlen;
char hotkey, flags;
struct Menu *menu, *sub;
struct module *owner;
struct Item *mod_chain;
} *activeitem=NULL, *activesubitem=NULL;
static struct Menu {
struct Menu *next;
struct Item *item;
Window win, parent;
const char *title;
int titlelen;
int width, height;
char flags;
struct Item *firstitem, *lastitem;
} *activemenu=NULL, *activesubmenu=NULL;
#ifdef AMIGAOS
void spawn(const char *cmd)
{
char *line=malloc(strlen(cmd)+12);
if(line) {
sprintf(line, "RUN <>NIL: %s", cmd);
system(line);
free(line);
}
}
#else
void spawn(const char *cmd)
{
extern char *x_server;
#ifdef HAVE_ALLOCA
char *line=alloca(strlen(x_server)+strlen(cmd)+28);
#else
char *line=malloc(strlen(x_server)+strlen(cmd)+28);
if(line) {
#endif
char *dot;
sprintf(line, "DISPLAY='%s", x_server);
if(!(dot=strrchr(line, '.')) || strchr(dot, ':'))
dot=line+strlen(line);
sprintf(dot, ".%d' %s &", scr->number, cmd);
#ifdef __ultrix
{
int pid, status;
if ((pid = fork ()) == 0) {
(void) setsid();
execl ("/bin/sh", "sh", "-c", line, 0);
} else
waitpid (pid, &status, 0);
}
#else
system(line);
#endif
#ifndef HAVE_ALLOCA
free(line);
}
#endif
}
#endif
void add_toolitem(const char *n, const char *c, const char *k, int l)
{
struct ToolItem *ti;
if((ti=malloc(sizeof(struct ToolItem)))) {
ti->name=n;
ti->cmd=c;
if(k)
ti->hotkey=k[0];
else
ti->hotkey=0;
ti->level=l;
ti->next=NULL;
if(lasttoolitem)
lasttoolitem->next=ti;
else
firsttoolitem=ti;
lasttoolitem=ti;
}
}
static void menu_layout(struct Menu *menu)
{
XSetWindowAttributes attr;
XWindowAttributes attr2;
int w, x, y;
struct Item *item;
if(menu->win) {
XGetWindowAttributes(dpy, menu->win, &attr2);
x=attr2.x; y=scr->bh-2;
} else {
XGetWindowAttributes(dpy, menu->item->win, &attr2);
x=attr2.x+attr2.width-scr->hotkeyspace+9; y=attr2.y-2;
XGetWindowAttributes(dpy, menu->item->menu->parent, &attr2);
x+=attr2.x; y+=attr2.y;
}
menu->width=menu->height=0;
for(item=menu->firstitem; item; item=item->next) {
if(item->text)
menu->height+=scr->dri.dri_Ascent+scr->dri.dri_Descent+1;
else
menu->height+=6;
#ifdef USE_FONTSETS
w=XmbTextEscapement(scr->dri.dri_FontSet, item->text, item->textlen)+2;
#else
w=XTextWidth(scr->dri.dri_Font, item->text, item->textlen)+2;
#endif
if(item->hotkey)
w+=scr->hotkeyspace;
if(item->flags&CHECKIT)
w+=scr->checkmarkspace;
if(item->sub)
w+=scr->subspace;
if(w>menu->width)
menu->width=w;
}
menu->width+=6;
menu->height+=2;
attr.override_redirect=True;
attr.background_pixel=scr->dri.dri_Pens[BARBLOCKPEN];
attr.border_pixel=scr->dri.dri_Pens[BARDETAILPEN];
menu->parent=XCreateWindow(dpy, scr->back, x, y,
menu->width, menu->height, 1,
CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel|CWBorderPixel,
&attr);
XSaveContext(dpy, menu->parent, screen_context, (XPointer)scr);
XSelectInput(dpy, menu->parent, ExposureMask);
w=1;
for(item=menu->firstitem; item; item=item->next) {
int h=(item->text? scr->dri.dri_Ascent+scr->dri.dri_Descent+1:6);
item->win=XCreateWindow(dpy, menu->parent, 3, w, menu->width-6, h, 0,
CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel, &attr);
XSaveContext(dpy, item->win, screen_context, (XPointer)scr);
w+=h;
XSelectInput(dpy, item->win, ExposureMask|ButtonReleaseMask|
EnterWindowMask|LeaveWindowMask);
}
XMapSubwindows(dpy, menu->parent);
}
static struct Menu *add_menu(const char *name, char flags)
{
struct Menu *menu=calloc(1, sizeof(struct Menu));
XSetWindowAttributes attr;
int w;
if(menu) {
attr.override_redirect=True;
attr.background_pixel=scr->dri.dri_Pens[BARBLOCKPEN];
#ifdef USE_FONTSETS
w=XmbTextEscapement(scr->dri.dri_FontSet, name, menu->titlelen=strlen(name))+8;
#else
w=XTextWidth(scr->dri.dri_Font, name, menu->titlelen=strlen(name))+8;
#endif
menu->win=XCreateWindow(dpy, scr->menubarparent, scr->menuleft, 0, w, scr->bh-1, 0,
CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel, &attr);
XSaveContext(dpy, menu->win, screen_context, (XPointer)scr);
XMapWindow(dpy, menu->win);
XSelectInput(dpy, menu->win, ExposureMask|EnterWindowMask|LeaveWindowMask);
scr->menuleft+=w+6;
menu->flags=flags;
menu->title=name;
menu->item=NULL;
menu->firstitem=menu->lastitem=NULL;
menu->next=scr->firstmenu;
scr->firstmenu=menu;
}
return menu;
}
static struct Item *add_item(struct Menu *m, const char *name, char key,
char flags)
{
struct Item *item=calloc(1, sizeof(struct Item));
if(item) {
if(name) {
item->text=name;
item->textlen=strlen(name);
} else item->text=NULL;
item->hotkey=key;
item->flags=flags;
item->menu=m;
item->sub=NULL;
item->next=NULL;
if(m->lastitem)
m->lastitem->next=item;
else
m->firstitem=item;
m->lastitem=item;
}
return item;
}
static struct Menu *sub_menu(struct Item *i, char flags)
{
struct Menu *menu=calloc(1, sizeof(struct Menu));
if(menu) {
menu->flags=flags;
menu->title=NULL;
menu->firstitem=menu->lastitem=NULL;
menu->next=NULL;
menu->item=i;
i->sub=menu;
}
return menu;
}
void redraw_menu(struct Menu *m, Window w)
{
int active=(m==activemenu && !(m->flags & DISABLED));
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[active?BARBLOCKPEN:
BARDETAILPEN]);
XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[active?BARDETAILPEN:
BARBLOCKPEN]);
#ifdef USE_FONTSETS
XmbDrawImageString(dpy, w, scr->dri.dri_FontSet,
scr->menubargc, 4, 1+scr->dri.dri_Ascent,
m->title, m->titlelen);
#else
XDrawImageString(dpy, w, scr->menubargc, 4, 1+scr->dri.dri_Ascent,
m->title, m->titlelen);
#endif
}
void redraw_item(struct Item *i, Window w)
{
struct Menu *m=i->menu;
int s=scr->dri.dri_Ascent>>1;
if((i==activeitem || i==activesubitem) && !(i->flags&DISABLED)) {
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]);
XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[BARDETAILPEN]);
} else {
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARDETAILPEN]);
XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]);
}
if(i->text)
#ifdef USE_FONTSETS
XmbDrawImageString(dpy, w, scr->dri.dri_FontSet,
scr->menubargc, (i->flags&CHECKIT)?1+scr->checkmarkspace:1,
scr->dri.dri_Ascent+1, i->text, i->textlen);
#else
XDrawImageString(dpy, w, scr->menubargc, (i->flags&CHECKIT)?1+scr->checkmarkspace:1,
scr->dri.dri_Ascent+1, i->text, i->textlen);
#endif
else
XFillRectangle(dpy, w, scr->menubargc, 2, 2, m->width-10, 2);
if(i->sub) {
int x=m->width-6-scr->hotkeyspace-1+8;
#ifdef USE_FONTSETS
#ifdef HAVE_XUTF8DRAWIMAGESTRING
Xutf8DrawImageString(dpy, w, scr->dri.dri_FontSet,
scr->menubargc, x+scr->dri.dri_Ascent+1,
1+scr->dri.dri_Ascent, "\302\273", 2);
#else
XmbDrawImageString(dpy, w, scr->dri.dri_FontSet,
scr->menubargc, x+scr->dri.dri_Ascent+1,
1+scr->dri.dri_Ascent, "»", 1);
#endif
#else
XDrawImageString(dpy, w, scr->menubargc, x+scr->dri.dri_Ascent+1,
1+scr->dri.dri_Ascent, "»", 1);
#endif
} else if(i->hotkey) {
int x=m->width-6-scr->hotkeyspace-1+8;
XDrawLine(dpy, w, scr->menubargc, x, 1+s, x+s, 1);
XDrawLine(dpy, w, scr->menubargc, x+s, 1, x+s+s, 1+s);
XDrawLine(dpy, w, scr->menubargc, x+s+s, 1+s, x+s, 1+s+s);
XDrawLine(dpy, w, scr->menubargc, x+s, 1+s+s, x, 1+s);
#ifdef USE_FONTSETS
XmbDrawImageString(dpy, w, scr->dri.dri_FontSet,
scr->menubargc, x+scr->dri.dri_Ascent+1,
1+scr->dri.dri_Ascent, &i->hotkey, 1);
#else
XDrawImageString(dpy, w, scr->menubargc, x+scr->dri.dri_Ascent+1,
1+scr->dri.dri_Ascent, &i->hotkey, 1);
#endif
}
if(i->flags&CHECKED) {
XDrawLine(dpy, w, scr->menubargc, 0, s, s, scr->dri.dri_Ascent);
XDrawLine(dpy, w, scr->menubargc, s, scr->dri.dri_Ascent, s+s, 0);
}
if(i->flags&DISABLED) {
XSetStipple(dpy, scr->menubargc, scr->disabled_stipple);
XSetFillStyle(dpy, scr->menubargc, FillStippled);
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]);
XFillRectangle(dpy, w, scr->menubargc, 0, 0,
m->width-6, scr->dri.dri_Ascent+scr->dri.dri_Descent+1);
XSetFillStyle(dpy, scr->menubargc, FillSolid);
}
}
void createmenubar()
{
XSetWindowAttributes attr;
struct Menu *m, *sm1, *sm2, *sm3;
struct ToolItem *ti;
GC gc;
scr->firstmenu = NULL;
attr.override_redirect=True;
attr.background_pixel=scr->dri.dri_Pens[BARBLOCKPEN];
scr->menubar=XCreateWindow(dpy, scr->back, 0, 0, scr->width, scr->bh, 0,
CopyFromParent,
InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel,
&attr);
XSaveContext(dpy, scr->menubar, screen_context, (XPointer)scr);
scr->menubarparent=XCreateWindow(dpy, scr->menubar, 0, 0, scr->width,
scr->bh-1, 0,
CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel, &attr);
XSaveContext(dpy, scr->menubarparent, screen_context, (XPointer)scr);
attr.background_pixel=scr->dri.dri_Pens[BACKGROUNDPEN];
scr->menubardepth=XCreateWindow(dpy, scr->menubar, scr->width-23,
0, 23, scr->bh, 0,
CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect|CWBackPixel, &attr);
XSaveContext(dpy, scr->menubardepth, screen_context, (XPointer)scr);
scr->disabled_stipple=XCreatePixmap(dpy, scr->back, 6, 2, 1);
gc=XCreateGC(dpy, scr->disabled_stipple, 0, NULL);
XSetForeground(dpy, gc, 0);
XFillRectangle(dpy, scr->disabled_stipple, gc, 0, 0, 6, 2);
XSetForeground(dpy, gc, 1);
XDrawPoint(dpy, scr->disabled_stipple, gc, 0, 0);
XDrawPoint(dpy, scr->disabled_stipple, gc, 3, 1);
XFreeGC(dpy, gc);
scr->menubargc=XCreateGC(dpy, scr->menubar, 0, NULL);
#ifndef USE_FONTSETS
XSetFont(dpy, scr->menubargc, scr->dri.dri_Font->fid);
#endif
XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]);
XSelectInput(dpy, scr->menubar, ExposureMask|ButtonPressMask|ButtonReleaseMask);
XSelectInput(dpy, scr->menubardepth, ExposureMask|ButtonPressMask|
ButtonReleaseMask|EnterWindowMask|LeaveWindowMask);
XMapWindow(dpy, scr->menubardepth);
XMapWindow(dpy, scr->menubar);
scr->hotkeyspace=8+1+scr->dri.dri_MaxBoundsWidth+
scr->dri.dri_Ascent;
scr->checkmarkspace=4+scr->dri.dri_Ascent;
scr->subspace=scr->hotkeyspace-scr->dri.dri_Ascent;
scr->menuleft=4;
m=add_menu("Workbench", 0);
add_item(m,"Backdrop",'B',CHECKIT|CHECKED|DISABLED);
add_item(m,"Execute Command...",'E',0);
add_item(m,"Redraw All",0,0);
add_item(m,"Update All",0,DISABLED);
add_item(m,"Last Message",0,DISABLED);
add_item(m,"About...",'?',0);
add_item(m,"Quit...",'Q',0);
menu_layout(m);
m=add_menu("Window", 0);
add_item(m,"New Drawer",'N',DISABLED);
add_item(m,"Open Parent",0,DISABLED);
add_item(m,"Close",'K',DISABLED);
add_item(m,"Update",0,DISABLED);
add_item(m,"Select Contents",'A',0);
add_item(m,"Clean Up",'.',0);
sm1=sub_menu(add_item(m,"Snapshot",0,DISABLED),0);
add_item(sm1, "Window",0,DISABLED);
add_item(sm1, "All",0,DISABLED);
sm2=sub_menu(add_item(m,"Show",0,DISABLED),0);
add_item(sm2, "Only Icons",0,CHECKIT|CHECKED|DISABLED);
add_item(sm2, "All Files",'V',CHECKIT|DISABLED);
sm3=sub_menu(add_item(m,"View By",0,DISABLED),0);
add_item(sm3, "Icon",0,CHECKIT|CHECKED|DISABLED);
add_item(sm3, "Name",0,CHECKIT|DISABLED);
add_item(sm3, "Date",0,CHECKIT|DISABLED);
add_item(sm3, "Size",0,CHECKIT|DISABLED);
menu_layout(m);
menu_layout(sm1);
menu_layout(sm2);
menu_layout(sm3);
m=add_menu("Icons", DISABLED);
add_item(m,"Open",'O',DISABLED);
add_item(m,"Copy",'C',DISABLED);
add_item(m,"Rename...",'R',DISABLED);
add_item(m,"Information...",'I',DISABLED);
add_item(m,"Snapshot",'S',DISABLED);
add_item(m,"UnSnapshot",'U',DISABLED);
add_item(m,"Leave Out",'L',DISABLED);
add_item(m,"Put Away",'P',DISABLED);
add_item(m,NULL,0,DISABLED);
add_item(m,"Delete...",'D',DISABLED);
add_item(m,"Format Disk...",0,DISABLED);
add_item(m,"Empty Trash",0,DISABLED);
menu_layout(m);
m=add_menu("Tools", 0);
#ifdef AMIGAOS
add_item(m,"ResetWB",0,DISABLED);
#else
add_item(m,"ResetWB",0,0);
#endif
for(ti=firsttoolitem; ti; ti=ti->next)
if(ti->level<0)
ti->submenu=sm1=sub_menu(add_item(m,ti->name,ti->hotkey,0),0);
else {
ti->submenu=NULL;
add_item((ti->level? sm1:m), ti->name,ti->hotkey,(ti->cmd? 0:DISABLED));
}
menu_layout(m);
for(ti=firsttoolitem; ti; ti=ti->next)
if(ti->submenu) {
menu_layout(ti->submenu);
ti->submenu=NULL;
}
if(prefs.screenmenu) {
m=add_menu("Screens",0);
add_item(m,"New Screen",0,0);
add_item(m,"Delete Screen",0,0);
menu_layout(m);
}
}
void redrawmenubar(Window w)
{
static const char defaultTimeFormat[] = "%c";
struct Menu *m;
struct Item *item;
if(!w)
return;
if(w==scr->menubar) {
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARDETAILPEN]);
XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]);
#ifdef USE_FONTSETS
XmbDrawImageString(dpy, w, scr->dri.dri_FontSet,
scr->menubargc, 4, 1+scr->dri.dri_Ascent,
scr->title, strlen(scr->title));
#else
XDrawImageString(dpy, w, scr->menubargc, 4, 1+scr->dri.dri_Ascent,
scr->title, strlen(scr->title));
#endif
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARTRIMPEN]);
XDrawLine(dpy, w, scr->menubargc, 0, scr->bh-1, scr->width-1, scr->bh-1);
if( prefs.titlebarclock )
{
char clockbuf[512];
const char * fmt = defaultTimeFormat;
time_t the_time;
int l;
if( prefs.titleclockformat ) fmt = prefs.titleclockformat;
time( &the_time );
strftime( clockbuf, 512, fmt, localtime( &the_time ) );
#ifdef USE_FONTSETS
l = XmbTextEscapement(scr->dri.dri_FontSet, clockbuf, strlen(clockbuf));
XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, scr->menubargc,
(scr->width-30-l), 1+scr->dri.dri_Ascent,
clockbuf, strlen(clockbuf));
#else
l = XTextWidth(scr->dri.dri_Font, clockbuf, strlen(clockbuf));
XDrawImageString( dpy, w, scr->menubargc,(scr->width-30-l),
1+scr->dri.dri_Ascent, clockbuf, strlen(clockbuf));
#endif
}
} else if(w==scr->menubardepth) {
if(!mbdclick) {
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->menubargc, 4, scr->h2, 10, scr->h6-scr->h2);
}
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[SHINEPEN]);
XFillRectangle(dpy, w, scr->menubargc, 8, scr->h4, 10, scr->h8-scr->h4);
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[SHADOWPEN]);
XDrawRectangle(dpy, w, scr->menubargc, 8, scr->h4, 10, scr->h8-scr->h4);
if(mbdclick)
XDrawRectangle(dpy, w, scr->menubargc, 4, scr->h2, 10, scr->h6-scr->h2);
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[mbdclick?SHADOWPEN:SHINEPEN]);
XDrawLine(dpy, w, scr->menubargc, 0, 0, 22, 0);
XDrawLine(dpy, w, scr->menubargc, 0, 0, 0, scr->bh-2);
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[mbdclick?SHINEPEN:SHADOWPEN]);
XDrawLine(dpy, w, scr->menubargc, 0, scr->bh-1, 22, scr->bh-1);
XDrawLine(dpy, w, scr->menubargc, 22, 0, 22, scr->bh-1);
} else {
for(m=scr->firstmenu; m; m=m->next)
if(m->win==w)
redraw_menu(m, w);
if(activemenu) {
for(item=activemenu->firstitem; item; item=item->next)
if(item->win==w)
redraw_item(item, w);
if(w==activemenu->parent) {
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARDETAILPEN]);
XDrawLine(dpy, w, scr->menubargc, 0, 0, 0, activemenu->height-1);
XDrawLine(dpy, w, scr->menubargc, activemenu->width-1, 0,
activemenu->width-1, activemenu->height-1);
}
}
if(activesubmenu) {
for(item=activesubmenu->firstitem; item; item=item->next)
if(item->win==w)
redraw_item(item, w);
if(w==activesubmenu->parent) {
XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARDETAILPEN]);
XDrawLine(dpy, w, scr->menubargc, 0, 0, 0, activesubmenu->height-1);
XDrawLine(dpy, w, scr->menubargc, activesubmenu->width-1, 0,
activesubmenu->width-1, activesubmenu->height-1);
}
}
}
}
static void leave_item(struct Item *i, Window w)
{
if(i==activesubitem)
activesubitem=NULL;
if(i==activeitem)
if(activesubmenu && i->sub==activesubmenu)
return;
else
activeitem=NULL;
XSetWindowBackground(dpy, i->win, scr->dri.dri_Pens[BARBLOCKPEN]);
XClearWindow(dpy, i->win);
redraw_item(i, i->win);
}
static void enter_item(struct Item *i, Window w)
{
if(activesubitem)
leave_item(activesubitem, activesubitem->win);
if(activesubmenu!=i->sub && i->menu!=activesubmenu) {
if(activesubmenu)
XUnmapWindow(dpy, activesubmenu->parent);
if(i->sub)
XMapRaised(dpy, i->sub->parent);
activesubmenu=i->sub;
}
if(activeitem && !(activeitem->sub && i->menu==activeitem->sub))
leave_item(activeitem, activeitem->win);
if(!(i->flags&DISABLED)) {
if(activeitem)
activesubitem=i;
else
activeitem=i;
XSetWindowBackground(dpy, i->win, scr->dri.dri_Pens[BARDETAILPEN]);
XClearWindow(dpy, i->win);
redraw_item(i, i->win);
}
}
static void enter_menu(struct Menu *m, Window w)
{
if(m!=activemenu) {
struct Menu *oa=activemenu;
if(activesubitem)
leave_item(activeitem, activesubitem->win);
if(activesubmenu) {
XUnmapWindow(dpy, activesubmenu->parent);
activesubmenu=NULL;
}
if(activeitem)
leave_item(activeitem, activeitem->win);
if(!(m->flags & DISABLED))
XSetWindowBackground(dpy, w, scr->dri.dri_Pens[BARDETAILPEN]);
XClearWindow(dpy, w);
redraw_menu(activemenu=m, w);
if(m->parent)
XMapRaised(dpy, m->parent);
if(oa) {
if(oa->parent)
XUnmapWindow(dpy, oa->parent);
XSetWindowBackground(dpy, oa->win, scr->dri.dri_Pens[BARBLOCKPEN]);
XClearWindow(dpy, oa->win);
redraw_menu(oa, oa->win);
}
}
}
void menubar_enter(Window w)
{
struct Menu *m;
struct Item *i;
for(m=scr->firstmenu; m; m=m->next)
if(m->win==w) {
enter_menu(m, w);
return;
}
if((m=activemenu))
for(i=m->firstitem; i; i=i->next)
if(w==i->win) {
enter_item(i, w);
return;
}
if((m=activesubmenu))
for(i=m->firstitem; i; i=i->next)
if(w==i->win) {
enter_item(i, w);
return;
}
}
void menubar_leave(Window w)
{
if(activesubitem && activesubitem->win==w)
leave_item(activesubitem, w);
if(activeitem && activeitem->win==w)
leave_item(activeitem, w);
}
void menu_on()
{
Window r, c;
int rx, ry, x, y;
unsigned int m;
if(scr->menubarparent) {
XMapRaised(dpy, scr->menubarparent);
XRaiseWindow(dpy, scr->menubar);
XGrabPointer(dpy, scr->back, True, ButtonPressMask|ButtonReleaseMask|
EnterWindowMask|LeaveWindowMask, GrabModeAsync, GrabModeAsync,
scr->back, wm_curs, CurrentTime);
XSetInputFocus(dpy, scr->menubar, RevertToParent, CurrentTime);
if(XQueryPointer(dpy, scr->menubarparent, &r, &c, &rx, &ry, &x, &y, &m))
menubar_enter(c);
}
}
void menuaction(struct Item *i, struct Item *si)
{
extern void restart_amiwm(void);
extern int screen_has_clients(void);
struct Menu *m;
struct Item *mi;
struct ToolItem *ti;
int menu=0, item=0, sub=0;
for(m=i->menu->next; m; m=m->next) menu++;
for(mi=i->menu->firstitem; mi&&mi!=i; mi=mi->next) item++;
if(i->sub) {
for(mi=i->sub->firstitem; mi&&mi!=si; mi=mi->next) sub++;
if(!mi)
sub=-1;
} else
--sub;
mi=(sub>=0? si:i);
if(mi->flags & DISABLED)
return;
if(mi->owner) {
mod_menuselect(mi->owner, menu, item, sub);
return;
}
switch(menu) {
case 0: /* Workbench */
switch(item) {
case 1:
spawn(BIN_PREFIX"executecmd");
break;
case 2:
{
XSetWindowAttributes xswa;
unsigned long mask;
Window win;
xswa.background_pixmap = None;
xswa.override_redirect = True;
xswa.backing_store = NotUseful;
xswa.save_under = False;
mask = CWBackPixmap|CWOverrideRedirect|CWBackingStore|CWSaveUnder;
win = XCreateWindow(dpy, scr->back, 0, 0, scr->width, scr->height,
0, scr->depth, InputOutput,
scr->visual, mask, &xswa);
XMapWindow(dpy, win);
XDestroyWindow(dpy, win);
}
break;
case 5:
#ifdef AMIGAOS
spawn(BIN_PREFIX"requestchoice >NIL: amiwm \""
ABOUT_STRING("*N") "\" Ok");
#else
spawn(BIN_PREFIX"requestchoice >/dev/null amiwm '"
ABOUT_STRING("\n") "' Ok");
#endif
break;
case 6:
#ifndef AMIGAOS
if(prefs.fastquit) {
#endif
exit(0);
#ifndef AMIGAOS
} else {
#ifdef HAVE_ALLOCA
char *buf=alloca(256);
#else
char buf[256];
#endif
sprintf(buf, "; export DISPLAY; ( if [ `"BIN_PREFIX"requestchoice "
"Workbench 'Do you really want\nto quit workbench?' Ok Cancel`"
" = 1 ]; then kill %d; fi; )", (int)getpid());
spawn(buf);
}
#endif
break;
}
break;
case 1: /* Window */
switch(item) {
case 4:
select_all_icons(scr);
break;
case 5:
cleanupicons();
break;
}
break;
case 2: /* Icons */
break;
case 3: /* Tools */
#ifndef AMIGAOS
if(item==0)
restart_amiwm();
#endif
if(item>0) {
int it=0, si=-1;
for(ti=firsttoolitem; ti; ti=ti->next) {
if(ti->level>0)
si++;
else {
it++;
si=-1;
}
if(it==item && si==sub) break;
}
if(ti && ti->cmd) spawn(ti->cmd);
}
break;
case 4: /* Screens */
if(item==0) {
openscreen("New Screen", DefaultRootWindow(dpy));
realizescreens();
scr=front->upfront;
screentoback();
}
if(item==1) {
if(scr->behind == scr)
wberror(scr,"Cannot close last Screen");
else if(screen_has_clients())
wberror(scr,"Can't close a screen with running programs on it");
else
closescreen();
}
break;
}
}
void menu_off()
{
struct Menu *oa;
struct Item *oi, *osi;
if(scr->menubarparent) {
Window r,p,*children;
unsigned int nchildren;
XUngrabPointer(dpy, CurrentTime);
setfocus((activeclient && activeclient->state==NormalState?
activeclient->window:None));
XUnmapWindow(dpy, scr->menubarparent);
if(XQueryTree(dpy, scr->back, &r, &p, &children, &nchildren)) {
int n;
Client *c2;
for(n=0; n<nchildren; n++)
if((!XFindContext(dpy, children[n], client_context, (XPointer*)&c2)) &&
children[n]==c2->parent)
break;
if(n<nchildren) {
Window ws[2];
ws[0]=children[n];
ws[1]=scr->menubar;
XRestackWindows(dpy, ws, 2);
}
if(children) XFree(children);
}
}
if((osi=activesubitem))
leave_item(osi, osi->win);
if((oi=activeitem))
leave_item(oi, oi->win);
if((oa=activesubmenu)) {
activesubmenu=NULL;
if(oa->parent)
XUnmapWindow(dpy, oa->parent);
}
if((oa=activemenu)) {
activemenu=NULL;
if(oa->parent)
XUnmapWindow(dpy, oa->parent);
XSetWindowBackground(dpy, oa->win, scr->dri.dri_Pens[BARBLOCKPEN]);
XClearWindow(dpy, oa->win);
redraw_menu(oa, oa->win);
}
if(oi) {
XSync(dpy, False);
menuaction(oi, osi);
}
}
struct Item *getitembyhotkey(KeySym key)
{
struct Menu *m;
struct Item *i;
if(key) {
if(key>='a' && key<='z')
key-=0x20;
for(m=scr->firstmenu; m; m=m->next)
for(i=m->firstitem; i; i=i->next)
if(i->hotkey==key)
return i;
}
return NULL;
}
static struct Item *own_item(struct module *m, struct Item *i, struct Item *c)
{
if(i->owner)
return NULL;
i->owner = m;
i->mod_chain = c;
i->flags &= ~DISABLED;
redraw_item(i, i->win);
return i;
}
void disown_item_chain(struct module *m, struct Item *i)
{
while(i)
if(i->owner == m) {
struct Item *c = i->mod_chain;
i->owner = NULL;
i->mod_chain = NULL;
i->flags |= DISABLED;
redraw_item(i, i->win);
i = c;
} else
i=i->mod_chain;
}
struct Item *own_items(struct module *m, Scrn *s,
int menu, int item, int sub, struct Item *c)
{
struct Item *cl, *chain = NULL, *endlink = NULL;
int m0, m1, mn;
struct Menu *mm;
if(!s) return NULL;
if(menu<0) {
m0 = 0; m1 = 65535;
} else m0 = m1 = menu;
for(mn=0, mm=s->firstmenu; mm && mn <= m1; mm=mm->next, mn++)
if(mn>=m0) {
int i0, i1, in;
struct Item *ii;
if(item<0) {
i0 = 0; i1 = 65535;
} else i0 = i1 = item;
for(in=0, ii=mm->firstitem; ii && in <= i1; ii=ii->next, in++)
if(in>=i0) {
int s0, s1, sn;
struct Item *ss;
if(!(cl=own_item(m, ii, chain))) {
disown_item_chain(m, chain);
return NULL;
} else chain=cl;
if(!endlink) endlink=chain;
if(ii->sub) {
if(sub<0) {
s0 = 0; s1 = 65535;
} else s0 = s1 = sub;
for(sn=0, ss=ii->sub->firstitem; ss && sn <= i1; ss=ss->next, sn++)
if(sn>=s0) {
if(!(cl=own_item(m, ss, chain))) {
disown_item_chain(m, chain);
return NULL;
} else chain=cl;
}
}
}
}
if(endlink)
endlink->next = c;
return chain;
}

573
module.c Normal file
View File

@@ -0,0 +1,573 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#include <X11/Xlib.h>
#include "alloc.h"
#include "drawinfo.h"
#include "screen.h"
#include "prefs.h"
#include "module.h"
#include "client.h"
#include "icon.h"
#include "version.h"
extern XContext client_context, icon_context, screen_context;
extern FILE *rcfile;
extern Display *dpy;
extern void add_fd_to_set(int);
extern void remove_fd_from_set(int);
extern void screentoback();
extern void raiselowerclient(Client *, int);
extern void wberror(Scrn *, char *);
extern Icon *createappicon(struct module *, Window, char *,
Pixmap, Pixmap, Pixmap, int, int);
extern struct Item *own_items(struct module *, Scrn *,
int, int, int, struct Item *);
extern void disown_item_chain(struct module *, struct Item *);
struct module *modules = NULL;
struct mcmd_keygrab *keygrabs = NULL;
static struct mcmd_keygrab *find_keygrab(int keycode, unsigned int modifiers)
{
struct mcmd_keygrab *kg=keygrabs;
while(kg)
if(kg->keycode == keycode && kg->modifiers == modifiers)
return kg;
else kg=kg->next;
return NULL;
}
int create_keygrab(struct module *m, int keycode, unsigned int modifiers)
{
static int id=1;
struct mcmd_keygrab *kg=malloc(sizeof(struct mcmd_keygrab));
Client *c;
if(kg) {
kg->next = keygrabs;
kg->id=id++;
kg->owner=m;
kg->keycode=keycode;
kg->modifiers=modifiers;
keygrabs=kg;
for(c=clients; c; c=c->next)
if(c->parent && c->parent!=c->scr->root)
XGrabKey(dpy, keycode, modifiers, c->window, False,
GrabModeAsync, GrabModeAsync);
return kg->id;
} else return -1;
}
void delete_keygrab(struct module *m, int id)
{
struct mcmd_keygrab *kg=keygrabs, *last=NULL;
Client *c;
while(kg) {
if(kg->owner==m && (id<0 || kg->id==id)) {
if(last)
last->next=kg->next;
else
keygrabs=kg->next;
if(!find_keygrab(kg->keycode, kg->modifiers))
for(c=clients; c; c=c->next)
if(c->parent && c->parent!=c->scr->root)
XUngrabKey(dpy, kg->keycode, kg->modifiers, c->window);
} else last=kg;
kg=kg->next;
}
}
static void destroy_module(struct module *m)
{
Scrn *s=front;
delete_keygrab(m, -1);
do {
Icon *i, *ni;
for(i=scr->icons; i; i=ni) {
ni=i->next;
if(i->module==m)
rmicon(i);
}
s=s->behind;
} while(s!=front);
disown_item_chain(m, m->menuitems);
if(m->in_fd>=0) { remove_fd_from_set(m->in_fd); close(m->in_fd); }
if(m->out_fd>=0) { close(m->out_fd); }
free(m);
}
static void sieve_modules()
{
struct module *m, **p;
for(p=&modules; (m=*p); )
if(!m->pid) {
*p=m->next;
destroy_module(m);
} else p=&(m->next);
}
void reap_children(int sig)
{
pid_t pid;
int stat;
#ifdef HAVE_WAITPID
while((pid=waitpid(-1, &stat, WNOHANG))>0)
#else
#ifdef HAVE_WAIT3
while((pid=wait3(&stat, WNOHANG, NULL))>0)
#else
if((pid=wait(&stat))>0)
#endif
#endif
#ifdef WIFSTOPPED
if(!WIFSTOPPED(stat)) {
#else
{
#endif
struct module *m;
for(m=modules; m; m=m->next)
if(m->pid==pid) {
m->pid=0;
break;
}
}
if(pid<0 && errno!=ECHILD && errno!=EINTR)
perror("wait");
if(sig>0)
signal(sig, reap_children);
}
void init_modules()
{
modules = NULL;
#ifdef SIGCHLD
signal(SIGCHLD, reap_children);
#else
#ifdef SIGCLD
signal(SIGCLD, reap_children);
#endif
#endif
}
void create_module(Scrn *screen, char *module_name, char *module_arg)
{
pid_t pid;
int fds1[2], fds2[2];
char fd1num[16], fd2num[16], scrnum[16], destpath[1024], *pathelt=NULL;
struct module *m;
char *temppath;
#ifdef HAVE_WAITPID
reap_children(0);
#else
#ifdef HAVE_WAIT3
reap_children(0);
#endif
#endif
sieve_modules();
#ifdef HAVE_ALLOCA
temppath = alloca(strlen(prefs.module_path)+2);
{
#else
if((temppath = malloc(strlen(prefs.module_path)+2))) {
#endif
strcpy(temppath, prefs.module_path);
for(pathelt=strtok(temppath, ":"); pathelt;
pathelt=strtok(NULL, ":")) {
sprintf(destpath, "%s/%s", pathelt, module_name);
if(access(destpath, X_OK)>=0)
break;
}
#ifndef HAVE_ALLOCA
free(temppath);
#endif
}
if(!pathelt) {
fprintf(stderr, "%s: no such module\n", module_name);
return;
}
if(pipe(fds1)>=0) {
if(pipe(fds2)>=0) {
if((pid=fork())) {
close(fds1[0]);
close(fds2[1]);
if(pid<0)
perror("fork");
else {
m=calloc(sizeof(struct module),1);
m->pid=pid;
m->in_fd=fds2[0];
m->out_fd=fds1[1];
m->in_buf=malloc(m->in_buf_size=64);
m->in_phase=0;
m->in_ptr=(char *)&m->mcmd;
m->in_left=sizeof(m->mcmd);
m->next=modules;
modules=m;
add_fd_to_set(m->in_fd);
}
} else {
if(rcfile)
close(fileno(rcfile));
for(m=modules; m; m=m->next) {
if(m->in_fd>=0) close(m->in_fd);
if(m->out_fd>=0) close(m->out_fd);
}
close(fds1[1]);
close(fds2[0]);
sprintf(fd1num, "%d", fds1[0]);
sprintf(fd2num, "%d", fds2[1]);
sprintf(scrnum, "0x%08lx", (screen? (screen->back):None));
execl(destpath, module_name, fd1num, fd2num, scrnum, module_arg, NULL);
perror(destpath);
_exit(1);
}
} else {
perror("pipe");
close(fds1[0]);
close(fds1[1]);
}
} else perror("pipe");
}
static int m_write(int fd, char *ptr, int len)
{
char *p=ptr;
int r, tot=0;
while(len>0) {
if((r=write(fd, p, len))<0)
if(errno==EINTR)
continue;
else
return r;
if(!r)
return tot;
tot+=r;
p+=r;
len-=r;
}
return tot;
}
static void reply_module(struct module *m, char *data, int len)
{
m_write(m->out_fd, (char *)&len, sizeof(len));
if(len<0) len=~len;
if(len>0)
m_write(m->out_fd, data, len);
}
int dispatch_event_to_broker(XEvent *e, unsigned long mask, struct module *m)
{
Client *c;
Icon *i;
e->xany.display=(Display *)0;
if(!XFindContext(dpy, e->xany.window, client_context, (XPointer *)&c))
if(e->xany.window==c->window)
e->xany.display=(Display *)1;
else
e->xany.display=(Display *)2;
else if(!XFindContext(dpy, e->xany.window, icon_context, (XPointer *)&i))
if(e->xany.window==i->window)
e->xany.display=(Display *)3;
while(m) {
if(m->out_fd>=0 && ((m->broker.mask & mask)||(m->broker.exists && !mask))) {
struct mcmd_event me;
me.mask=mask;
me.event=*e;
reply_module(m, (char *)&me, ~sizeof(me));
return 1;
}
m=m->next;
}
return 0;
}
static void incoming_event(struct module *m, struct mcmd_event *me)
{
extern void internal_broker(XEvent *);
if(!dispatch_event_to_broker(&me->event, me->mask, m->next))
internal_broker(&me->event);
}
void mod_menuselect(struct module *m, int menu, int item, int subitem)
{
fprintf(stderr, "Nu valde någon minsann menyitem %d:%d:%d.\n"
"Man kanske skulle berätta detta för modul %d\n?",
menu, item, subitem, (int)m->pid);
}
static void handle_module_cmd(struct module *m, char *data, int data_len)
{
extern Scrn *getscreen(Window);
extern int iconcolormask;
XID id=m->mcmd.id;
Client *c;
switch(m->mcmd.cmd) {
case MCMD_NOP:
reply_module(m, NULL, 0);
break;
case MCMD_GET_VERSION:
reply_module(m, "amiwm "VERSION, sizeof("amiwm "VERSION));
break;
case MCMD_SEND_EVENT:
if(data_len>=sizeof(struct mcmd_event)) {
incoming_event(m, (struct mcmd_event *)data);
reply_module(m, NULL, 0);
} else
reply_module(m, NULL, -1);
break;
case MCMD_SET_BROKER:
if(data_len>=sizeof(m->broker.mask)) {
m->broker.mask=*(unsigned long *)data;
m->broker.exists=1;
reply_module(m, NULL, 0);
} else
reply_module(m, NULL, -1);
break;
case MCMD_ROTATE_SCREEN:
scr=getscreen(id);
screentoback();
reply_module(m, NULL, 0);
break;
case MCMD_ADD_KEYGRAB:
if(data_len>=sizeof(int[2])) {
int res=create_keygrab(m, ((int*)data)[0], ((int*)data)[1]);
reply_module(m, (char *)&res, sizeof(res));
} else reply_module(m, NULL, -1);
break;
case MCMD_DEL_KEYGRAB:
if(data_len>=sizeof(int)) {
delete_keygrab(m, ((int*)data)[0]);
reply_module(m, NULL, 0);
} else reply_module(m, NULL, -1);
break;
case MCMD_FRONT:
if(!XFindContext(dpy, id, client_context, (XPointer*)&c)) {
raiselowerclient(c, PlaceOnTop);
reply_module(m, NULL, 0);
} else
reply_module(m, NULL, -1);
break;
case MCMD_BACK:
if(!XFindContext(dpy, id, client_context, (XPointer*)&c)) {
raiselowerclient(c, PlaceOnBottom);
reply_module(m, NULL, 0);
} else
reply_module(m, NULL, -1);
break;
case MCMD_ICONIFY:
if(!XFindContext(dpy, id, client_context, (XPointer*)&c)) {
if(!(c->icon))
createicon(c);
XUnmapWindow(dpy, c->parent);
/* XUnmapWindow(dpy, c->window); */
adjusticon(c->icon);
XMapWindow(dpy, c->icon->window);
if(c->icon->labelwidth)
XMapWindow(dpy, c->icon->labelwin);
c->icon->mapped=1;
setclientstate(c, IconicState);
reply_module(m, NULL, 0);
} else
reply_module(m, NULL, -1);
break;
case MCMD_CREATEAPPICON:
if(data_len>=sizeof(struct NewAppIcon)) {
struct NewAppIcon *nai=(struct NewAppIcon *)data;
Window w=None;
Icon *i=createappicon(m, id, nai->name,
nai->pm1, nai->pm2, nai->pmm, nai->x, nai->y);
if(i!=NULL) w=i->window;
reply_module(m, (char *)&w, sizeof(w));
} else
reply_module(m, NULL, -1);
break;
case MCMD_ERRORMSG:
if(data_len>0) {
extern char *free_screentitle;
if(free_screentitle) free(free_screentitle);
free_screentitle=malloc(data_len+1);
if(free_screentitle==NULL)
reply_module(m, NULL, -1);
else {
scr=getscreen(id);
memcpy(free_screentitle, data, data_len);
free_screentitle[data_len]='\0';
wberror(scr, free_screentitle);
reply_module(m, NULL, 0);
}
} else
reply_module(m, NULL, -1);
break;
case MCMD_SETAPPWINDOW:
if(!XFindContext(dpy, id, client_context, (XPointer*)&c)) {
c->module=m;
reply_module(m, NULL, 0);
} else
reply_module(m, NULL, -1);
break;
case MCMD_GETICONDIR:
reply_module(m, prefs.icondir, strlen(prefs.icondir)+1);
break;
case MCMD_GETICONPALETTE:
if(!XFindContext(dpy, id, client_context, (XPointer*)&c)) {
scr=c->scr;
} else
if(XFindContext(dpy, id, screen_context, (XPointer*)&scr)) {
reply_module(m, NULL, -1);
break;
}
reply_module(m, (void *)scr->iconcolor,
(iconcolormask+1)*sizeof(unsigned long));
break;
case MCMD_MANAGEMENU:
if(data_len>=sizeof(int[3])) {
struct Item *i;
scr=getscreen(id);
if((i=own_items(m, scr, ((int*)data)[0], ((int*)data)[1],
((int*)data)[3], m->menuitems))) {
m->menuitems = i;
reply_module(m, NULL, 0);
} else
reply_module(m, NULL, -1);
} else
reply_module(m, NULL, -1);
break;
default:
reply_module(m, NULL, -1);
}
}
static void module_input_callback(struct module *m)
{
unsigned char buffer[8192], *p=buffer;
int r;
if(!(m->pid)) {
sieve_modules();
return;
}
r=read(m->in_fd, buffer, sizeof(buffer));
if(r==0 || (r<0 && errno!=EINTR)) {
if(r<0)
perror("module");
else
fprintf(stderr, "module %d exited!?\n", (int)m->pid);
remove_fd_from_set(m->in_fd);
close(m->in_fd);
close(m->out_fd);
m->in_fd=m->out_fd=-1;
#ifdef HAVE_WAITPID
reap_children(0);
#else
#ifdef HAVE_WAIT3
reap_children(0);
#endif
#endif
sieve_modules();
return;
}
while(r>0) {
int t=(r>m->in_left? m->in_left:r);
memcpy(m->in_ptr, p, t);
m->in_ptr+=t;
if(!(m->in_left-=t))
if(m->in_phase || ((!m->mcmd.len)&&(m->in_ptr=m->in_buf))) {
*m->in_ptr=0;
handle_module_cmd(m, m->in_buf, m->mcmd.len);
m->in_ptr=(char *)&m->mcmd;
m->in_left=sizeof(m->mcmd);
m->in_phase=0;
} else {
if(m->mcmd.len>=m->in_buf_size) {
if((m->in_buf_size<<=1)<=m->mcmd.len)
m->in_buf_size=m->mcmd.len+1; {
m->in_buf=realloc(m->in_buf, m->in_buf_size);
}
}
m->in_ptr=m->in_buf;
m->in_left=m->mcmd.len;
m->in_phase++;
}
p+=t;
r-=t;
}
}
void handle_module_input(fd_set *r)
{
struct module *m;
for(m=modules; m; m=m->next)
if(m->in_fd>=0 && FD_ISSET(m->in_fd, r)) {
module_input_callback(m);
break;
}
}
void flushmodules()
{
struct module *n, *m=modules;
int i;
extern char *progname;
while(m) {
n=m->next;
if(m->in_fd>=0) {
close(m->in_fd);
remove_fd_from_set(m->in_fd);
m->in_fd=-1;
}
if(m->out_fd>=0) {
close(m->out_fd);
m->out_fd=-1;
}
if(m->pid>0)
kill(m->pid, SIGHUP);
m=n;
}
for(i=5; i>0; --i) {
sieve_modules();
if(!modules)
break;
sleep(1);
}
sieve_modules();
if(modules)
fprintf(stderr, "%s: giving up waiting for modules to die!\n", progname);
}

58
module.h Normal file
View File

@@ -0,0 +1,58 @@
#define MCMD_NOP 1
#define MCMD_GET_VERSION 2
#define MCMD_SEND_EVENT 4
#define MCMD_SET_BROKER 5
#define MCMD_ROTATE_SCREEN 6
#define MCMD_ADD_KEYGRAB 7
#define MCMD_DEL_KEYGRAB 8
#define MCMD_FRONT 9
#define MCMD_BACK 10
#define MCMD_ICONIFY 11
#define MCMD_CREATEAPPICON 12
#define MCMD_ERRORMSG 14
#define MCMD_SETAPPWINDOW 15
#define MCMD_GETICONDIR 16
#define MCMD_GETICONPALETTE 17
#define MCMD_MANAGEMENU 18
struct mcmd_header {
XID id;
int cmd;
int len;
};
struct mcmd_event {
unsigned long mask;
XEvent event;
};
struct mcmd_keygrab {
struct mcmd_keygrab *next;
int id;
struct module *owner;
int keycode;
unsigned int modifiers;
};
struct NewAppIcon {
int x, y;
Pixmap pm1, pm2, pmm;
char name[1];
};
extern struct module {
struct module *next;
int in_fd, out_fd;
pid_t pid;
struct mcmd_header mcmd;
char *in_ptr;
int in_left;
int in_phase;
char *in_buf;
int in_buf_size;
struct {
int exists;
unsigned long mask;
} broker;
struct Item *menuitems;
} *modules;

18
module_cmds Normal file
View File

@@ -0,0 +1,18 @@
%{
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <X11/Xlib.h>
#include "module.h"
%}
struct module_cmd ;
%%
NOP, MCMD_NOP
GET_VERSION, MCMD_GET_VERSION
LIST_SCREENS, MCMD_LIST_SCREENS
SEND_EVENT, MCMD_SEND_EVENT
SET_BROKER, MCMD_SET_BROKER
%%

526
ppmtoinfo.c Normal file
View File

@@ -0,0 +1,526 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#define WB_DISKMAGIC 0xe310
#define WB_DISKVERSION 1
#define WB_DISKREVISION 1
#define WB_DISKREVISIONMASK 255
#define NO_ICON_POSITION (0x80000000)
#define WBDISK 1
#define WBDRAWER 2
#define WBTOOL 3
#define WBPROJECT 4
#define WBGARBAGE 5
#define WBDEVICE 6
#define WBKICK 7
#define WBAPPICON 8
#define NONNULL 0x123456
struct { char *name; int minl, code; } icontype[] = {
{ "appicon", 1, WBAPPICON },
{ "device", 2, WBDEVICE },
{ "disk", 2, WBDISK },
{ "drawer", 2, WBDRAWER },
{ "garbage", 1, WBGARBAGE },
{ "kick", 1, WBKICK },
{ "project", 1, WBPROJECT },
{ "tool", 1, WBTOOL },
};
#define NUM_ICONTYPES (sizeof(icontype)/sizeof(icontype[0]))
typedef unsigned short pixval;
typedef struct {
pixval r, g, b;
} pixel;
void usage()
{
fprintf(stderr, "usage: ppmtoinfo [-type icontype][-floyd|-fs] [-map mapfile] [ppmfile] [ppmfile]\n");
exit(1);
}
void w16(FILE *file, int v)
{
putc((v>>8)&0xff, file);
putc(v&0xff, file);
}
void w32(FILE *file, int v)
{
w16(file, v>>16);
w16(file, v);
}
char *myalloc(int size)
{
char *p=malloc(size);
if(!p) {
fprintf(stderr, "out of memory!\n");
exit(1);
}
return p;
}
pixel **readppm(FILE *file, int *colsP, int *rowsP, pixval *maxvalP)
{
pixel** pixels;
int row, col;
int format, mv;
if(4!=fscanf(file, "P%d %d %d %d", &format, colsP, rowsP, &mv) ||
(format!=3 && format!=6)) {
fprintf(stderr, "bad magic number - not a ppm file\n");
exit(1);
}
if(format==6)
getc(file);
*maxvalP=mv;
pixels = (pixel **)myalloc(*rowsP * sizeof(pixel*));
pixels[0] = (pixel *)myalloc(*rowsP * *colsP * sizeof(pixel));
for(row=1; row<*rowsP; row++)
pixels[row] = &(pixels[0][row * *colsP]);
for ( row = 0; row < *rowsP; ++row )
if(format==3)
for( col = 0; col < *colsP; ++col) {
int r, g, b;
fscanf(file, "%d %d %d", &r, &g, &b);
pixels[row][col].r=r;
pixels[row][col].g=g;
pixels[row][col].b=b;
}
else
for( col = 0; col < *colsP; ++col) {
pixels[row][col].r=getc(file);
pixels[row][col].g=getc(file);
pixels[row][col].b=getc(file);
}
return pixels;
}
char *makelibfilename(char *oldname)
{
char *newname;
if(*oldname=='/') return oldname;
newname=myalloc(strlen(oldname)+strlen(AMIWM_HOME)+2);
sprintf(newname, AMIWM_HOME"/%s", oldname);
return newname;
}
#define HSTYLE_COMPL 0
#define HSTYLE_BACKFILL 1
#define HSTYLE_IMAGE 2
void writeiconheader(FILE *file, int type, int hstyle, int cols, int rows,
char *deftool, char **tooltypes, char *toolwin,
int stksize)
{
int drw=0;
if(type==1 || type==2 || type==5 || type==6)
drw=1;
w16(file, WB_DISKMAGIC); w16(file, WB_DISKVERSION);
w32(file, 0);
w16(file, 0); w16(file, 0); w16(file, cols); w16(file, rows);
w16(file, 4|hstyle); w16(file, 3); w16(file, 1);
w32(file, NONNULL); w32(file, (hstyle==HSTYLE_IMAGE? NONNULL:0));
w32(file, 0); w32(file, 0); w32(file, 0);
w16(file, 0); w32(file, WB_DISKREVISION);
putc(type, file); putc(0, file);
w32(file, (deftool!=NULL? NONNULL:0));
w32(file, (tooltypes!=NULL? NONNULL:0));
w32(file, NO_ICON_POSITION); w32(file, NO_ICON_POSITION);
w32(file, (drw? NONNULL:0)); w32(file, (toolwin? NONNULL:0));
w32(file, stksize);
if(drw) {
w16(file, 50); w16(file, 50); w16(file, 400); w16(file, 100);
w16(file, ~0); w32(file, 0); w32(file, 0x0240027f);
w32(file, 0); w32(file, 0); w32(file, NONNULL);
w32(file, 0); w32(file, 0);
w16(file, 90); w16(file, 40); w16(file, ~0); w16(file, ~0);
w16(file, 1);
w32(file, 0); w32(file, 0);
}
}
void writeiconinit(FILE *file, int cols, int rows, int planes)
{
w16(file, 0); w16(file, 0);
w16(file, cols); w16(file, rows); w16(file, planes);
w32(file, NONNULL);
putc((1<<planes)-1, file); putc(0, file);
w32(file, 0);
}
void writeiconimage(FILE *file, unsigned char *pixels,
int cols, int rows, int planes)
{
register int i, j, k, l;
register unsigned char pat;
for(i=0; i<planes; i++)
for(j=0; j<rows; j++)
for(k=0; k<cols; k+=8) {
pat=0;
for(l=0; l<8; l++)
if(pixels[j*cols+k+l]&(1<<i))
pat|=0x80>>l;
putc(pat, file);
}
}
void writeiconstr(FILE *file, char *str)
{
int l=strlen(str)+1;
w32(file, l);
fwrite(str, 1, l, file);
}
void writeiconend(FILE *file, int type,
char *deftool, char **tooltypes, char *toolwin)
{
if(deftool) writeiconstr(file, deftool);
if(tooltypes) {
int n;
for(n=0; tooltypes[n]!=NULL; n++);
w32(file, 4*(n+1));
for(n=0; tooltypes[n]!=NULL; n++)
writeiconstr(file, tooltypes[n]);
}
if(toolwin) writeiconstr(file, toolwin);
if(type==1 || type==2 || type==5 || type==6) {
w32(file, 0); w16(file, 0);
}
}
#define mx(a,b) ((a)>(b)?(a):(b))
unsigned char *processicon(FILE *ifp, int floyd, pixel **mappixels,
int maprows, int mapcols, pixval *mapmaxval,
int *rowsP, int *colsP, int *planesP)
{
int rows, cols, planes, bpr, imgsz;
pixval maxval;
pixel **pixels, *colormap;
unsigned char *outimg, *oip;
register int row, col, limitcol;
register pixel *pP;
int newcolors;
register int ind;
long* thisrerr;
long* nextrerr;
long* thisgerr;
long* nextgerr;
long* thisberr;
long* nextberr;
long* temperr;
register long sr, sg, sb, err;
int fs_direction, dscale;
pixels = readppm( ifp, &cols, &rows, &maxval );
if(ifp != stdin)
fclose( ifp );
if ( *mapmaxval != maxval ) {
if ( *mapmaxval > maxval )
fprintf(stderr, "rescaling colormap colors\n");
for ( row = 0; row < maprows; ++row )
for ( col = 0, pP = mappixels[row]; col < mapcols; ++col, ++pP ) {
pP->r=((int)pP->r*maxval+*mapmaxval/2)/ *mapmaxval;
pP->g=((int)pP->g*maxval+*mapmaxval/2)/ *mapmaxval;
pP->b=((int)pP->b*maxval+*mapmaxval/2)/ *mapmaxval;
}
*mapmaxval = maxval;
}
newcolors=mapcols*maprows;
colormap=mappixels[0];
if(newcolors>256) newcolors=256;
for(planes=1; (1<<planes)<newcolors; planes++);
bpr=2*((cols+15)>>4);
imgsz=rows*bpr*8*sizeof(unsigned char);
outimg = (unsigned char *)myalloc(imgsz);
memset(outimg, 0, imgsz);
oip = outimg;
dscale = 0;
if(maxval>=16384)
while(maxval>=(16384<<dscale))
dscale++;
if ( floyd ) {
/* Initialize Floyd-Steinberg error vectors. */
thisrerr = (long*) myalloc( (cols + 2) * sizeof(long) );
nextrerr = (long*) myalloc( (cols + 2) * sizeof(long) );
thisgerr = (long*) myalloc( (cols + 2) * sizeof(long) );
nextgerr = (long*) myalloc( (cols + 2) * sizeof(long) );
thisberr = (long*) myalloc( (cols + 2) * sizeof(long) );
nextberr = (long*) myalloc( (cols + 2) * sizeof(long) );
srand( (int) ( time( 0 ) ^ getpid( ) ) );
for ( col = 0; col < cols + 2; ++col ) {
thisrerr[col] = rand( ) % ( 1024 * 2 ) - 1024;
thisgerr[col] = rand( ) % ( 1024 * 2 ) - 1024;
thisberr[col] = rand( ) % ( 1024 * 2 ) - 1024;
/* (random errors in [-1 .. 1]) */
}
fs_direction = 1;
}
for ( row = 0; row < rows; ++row ) {
if ( floyd )
for ( col = 0; col < cols + 2; ++col )
nextrerr[col] = nextgerr[col] = nextberr[col] = 0;
if ( ( ! floyd ) || fs_direction ) {
col = 0;
limitcol = cols;
pP = pixels[row];
} else {
col = cols - 1;
limitcol = -1;
pP = &(pixels[row][col]);
}
do {
register int i, r2, g2, b2;
register long dist, newdist;
if ( floyd ) {
/* Use Floyd-Steinberg errors to adjust actual color. */
sr = pP->r + thisrerr[col + 1] / 1024;
sg = pP->g + thisgerr[col + 1] / 1024;
sb = pP->b + thisberr[col + 1] / 1024;
if ( sr < 0 ) sr = 0;
else if ( sr > maxval ) sr = maxval;
if ( sg < 0 ) sg = 0;
else if ( sg > maxval ) sg = maxval;
if ( sb < 0 ) sb = 0;
else if ( sb > maxval ) sb = maxval;
} else {
sr = pP->r;
sg = pP->g;
sb = pP->b;
}
for ( i = 0; i < newcolors; ++i ) {
r2 = sr - colormap[i].r;
g2 = sg - colormap[i].g;
b2 = sb - colormap[i].b;
if (dscale) {
r2 >>= dscale;
g2 >>= dscale;
b2 >>= dscale;
}
newdist = r2 * r2 + g2 * g2 + b2 * b2;
if ( i==0 || newdist < dist ) {
ind = i;
dist = newdist;
}
}
if ( floyd ) {
/* Propagate Floyd-Steinberg error terms. */
if ( fs_direction ) {
err = ( sr - (long) colormap[ind].r ) * 1024;
thisrerr[col + 2] += ( err * 7 ) / 16;
nextrerr[col ] += ( err * 3 ) / 16;
nextrerr[col + 1] += ( err * 5 ) / 16;
nextrerr[col + 2] += ( err ) / 16;
err = ( sg - (long) colormap[ind].g ) * 1024;
thisgerr[col + 2] += ( err * 7 ) / 16;
nextgerr[col ] += ( err * 3 ) / 16;
nextgerr[col + 1] += ( err * 5 ) / 16;
nextgerr[col + 2] += ( err ) / 16;
err = ( sb - (long) colormap[ind].b ) * 1024;
thisberr[col + 2] += ( err * 7 ) / 16;
nextberr[col ] += ( err * 3 ) / 16;
nextberr[col + 1] += ( err * 5 ) / 16;
nextberr[col + 2] += ( err ) / 16;
} else {
err = ( sr - (long) colormap[ind].r ) * 1024;
thisrerr[col ] += ( err * 7 ) / 16;
nextrerr[col + 2] += ( err * 3 ) / 16;
nextrerr[col + 1] += ( err * 5 ) / 16;
nextrerr[col ] += ( err ) / 16;
err = ( sg - (long) colormap[ind].g ) * 1024;
thisgerr[col ] += ( err * 7 ) / 16;
nextgerr[col + 2] += ( err * 3 ) / 16;
nextgerr[col + 1] += ( err * 5 ) / 16;
nextgerr[col ] += ( err ) / 16;
err = ( sb - (long) colormap[ind].b ) * 1024;
thisberr[col ] += ( err * 7 ) / 16;
nextberr[col + 2] += ( err * 3 ) / 16;
nextberr[col + 1] += ( err * 5 ) / 16;
nextberr[col ] += ( err ) / 16;
}
}
oip[col] = ind;
if ( ( ! floyd ) || fs_direction ) {
++col;
++pP;
} else {
--col;
--pP;
}
}
while ( col != limitcol );
oip += bpr*8;
if ( floyd ) {
temperr = thisrerr;
thisrerr = nextrerr;
nextrerr = temperr;
temperr = thisgerr;
thisgerr = nextgerr;
nextgerr = temperr;
temperr = thisberr;
thisberr = nextberr;
nextberr = temperr;
fs_direction = ! fs_direction;
}
}
if(floyd) {
free(thisrerr); free(nextrerr);
free(thisgerr); free(nextgerr);
free(thisberr); free(nextberr);
}
free(pixels[0]); free(pixels);
*rowsP=rows; *colsP=cols; *planesP=planes;
return outimg;
}
int main(int argc, char *argv[])
{
char *mapname = "system.map";
int argn, maprows, mapcols;
int floyd;
pixel **mappixels;
pixval mapmaxval;
FILE* ifp;
FILE *ifp2=NULL;
unsigned char *outimg;
int planes, rows, cols;
char *deftool=NULL, **tooltypes=NULL, *toolwin=NULL;
int stksize=0;
int type=WBPROJECT;
argn = 1;
floyd = 0;
while ( argn < argc && argv[argn][0] == '-' && argv[argn][1] != '\0' ) {
int l=strlen(argv[argn]);
if ( !strncmp( argv[argn], "-fs", mx(l, 2) ) ||
!strncmp( argv[argn], "-floyd", mx(l, 2) ) )
floyd = 1;
else if ( !strncmp( argv[argn], "-nofs", mx(l, 2) ) ||
!strncmp( argv[argn], "-nofloyd", mx(l, 2) ) )
floyd = 0;
else if ( !strncmp( argv[argn], "-map", mx(l, 2) ) ) {
++argn;
if ( argn == argc )
usage();
mapname = argv[argn];
}
else if ( !strncmp( argv[argn], "-type", mx(l, 2) ) ) {
int i;
++argn;
if ( argn == argc )
usage();
l=strlen(argv[argn]);
for(i=0; i<NUM_ICONTYPES; i++)
if( !strncmp( argv[argn], icontype[i].name, mx(l, icontype[i].minl))) {
type = icontype[i].code;
break;
}
if(i>=NUM_ICONTYPES) {
fprintf(stderr, "Unknown icon type. Supported types:\n");
for(i=0; i<NUM_ICONTYPES; i++)
fprintf(stderr, " %s\n", icontype[i].name);
exit(1);
}
} else
usage();
++argn;
}
if(!strcmp(mapname, "-"))
ifp = stdin;
else
if((ifp = fopen(mapname, "r"))==NULL)
ifp = fopen(makelibfilename(mapname), "r");
if(!ifp) {
perror(mapname);
exit(1);
}
mappixels = readppm( ifp, &mapcols, &maprows, &mapmaxval );
if(ifp != stdin)
fclose( ifp );
if ( mapcols == 0 || maprows == 0 ) {
fprintf(stderr, "null colormap??\n");
exit(1);
}
if ( argn != argc ) {
if(!strcmp(argv[argn], "-"))
ifp = stdin;
else
ifp = fopen(argv[argn], "r");
if(!ifp) {
perror(argv[argn]);
exit(1);
}
++argn;
}
else
ifp = stdin;
if ( argn != argc ) {
if(!strcmp(argv[argn], "-"))
ifp2 = stdin;
else
ifp2 = fopen(argv[argn], "r");
if(!ifp) {
perror(argv[argn]);
exit(1);
}
++argn;
}
if ( argn != argc )
usage();
outimg = processicon(ifp, floyd, mappixels, maprows, mapcols, &mapmaxval,
&rows, &cols, &planes);
writeiconheader(stdout, type,
(ifp2==NULL? HSTYLE_BACKFILL:HSTYLE_IMAGE),
cols, rows, deftool, tooltypes, toolwin, stksize);
writeiconinit(stdout, cols, rows, planes);
writeiconimage(stdout, outimg, 16*((cols+15)>>4), rows, planes);
free(outimg);
if(ifp2) {
outimg = processicon(ifp2, floyd, mappixels, maprows, mapcols, &mapmaxval,
&rows, &cols, &planes);
writeiconinit(stdout, cols, rows, planes);
writeiconimage(stdout, outimg, 16*((cols+15)>>4), rows, planes);
free(outimg);
}
writeiconend(stdout, type, deftool, tooltypes, toolwin);
return 0;
}

30
prefs.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef PREFS_H
#define PREFS_H
extern struct prefs_struct {
int fastquit;
int sizeborder;
int forcemove;
int borderwidth;
int autoraise;
int opaquemove;
int opaqueresize;
int customiconsonly;
int shortlabelicons;
char *icondir, *module_path, *defaulticon;
int focus, manage_all, screenmenu;
int titlebarclock; /* display titlebar clock? */
char *titleclockformat; /* format to use for the clock */
int titleclockinterval; /* how often do we update the clock?*/
struct _Style *firststyle, *laststyle;
} prefs;
#define FM_MANUAL 0
#define FM_ALWAYS 1
#define FM_AUTO 2
#define FOC_FOLLOWMOUSE 0
#define FOC_CLICKTOTYPE 1
#define FOC_SLOPPY 2
#endif

191
rc.c Normal file
View File

@@ -0,0 +1,191 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xmu/CharSet.h>
#include "alloc.h"
#include "prefs.h"
#include "drawinfo.h"
#include "screen.h"
#include "gram.h"
#include "icc.h"
#include "style.h"
#ifdef AMIGAOS
#include <pragmas/xmu1_pragmas.h>
extern struct Library *Xmu1Base;
#endif
extern void set_sys_palette(void);
extern int yyparse (void);
struct prefs_struct prefs;
#ifndef RC_FILENAME
#define RC_FILENAME ".amiwmrc"
#endif
FILE *rcfile;
int ParseError=0;
void read_rc_file(char *filename, int manage_all)
{
char *home, *fn;
memset(&prefs, 0, sizeof(prefs));
prefs.manage_all = manage_all;
prefs.sizeborder=Psizeright;
prefs.icondir=AMIWM_HOME;
prefs.module_path=AMIWM_HOME;
prefs.defaulticon="def_tool.info";
prefs.borderwidth=1;
prefs.titleclockinterval=1;
prefs.opaquemove=False;
prefs.opaqueresize=False;
prefs.screenmenu=False;
prefs.firststyle=NULL;
prefs.laststyle=NULL;
set_sys_palette();
if(filename!=NULL && (rcfile=fopen(filename, "r"))) {
yyparse();
fclose(rcfile);
rcfile=NULL;
return;
}
home=getenv("HOME");
#ifdef AMIGAOS
{
char fn[256];
strncpy(fn, home, sizeof(fn)-1);
fn[sizeof(fn)-1]='\0';
AddPart(fn, RC_FILENAME, sizeof(fn));
if((rcfile=fopen(fn, "r"))) {
yyparse();
fclose(rcfile);
rcfile=NULL;
return;
}
}
#else
#ifdef HAVE_ALLOCA
if((fn=alloca(strlen(home)+strlen(RC_FILENAME)+4))) {
#else
if((fn=malloc(strlen(home)+strlen(RC_FILENAME)+4))) {
#endif
sprintf(fn, "%s/"RC_FILENAME, home);
if((rcfile=fopen(fn, "r"))) {
yyparse();
fclose(rcfile);
#ifndef HAVE_ALLOCA
free(fn);
#endif
return;
}
#ifndef HAVE_ALLOCA
free(fn);
#endif
}
#endif
if((rcfile=fopen(AMIWM_HOME"/system"RC_FILENAME, "r"))) {
yyparse();
fclose(rcfile);
}
}
struct keyword { char *name; int token; } keywords[] = {
{ "always", ALWAYS },
{ "auto", AUTO },
{ "autoraise", AUTORAISE },
{ "backgroundpen", T_BACKGROUNDPEN },
{ "barblockpen", T_BARBLOCKPEN },
{ "bardetailpen", T_BARDETAILPEN },
{ "bartrimpen", T_BARTRIMPEN },
{ "blockpen", T_BLOCKPEN },
{ "both", BOTH },
{ "bottom", BOTTOM },
{ "class", CLASS },
{ "clicktotype", CLICKTOTYPE },
{ "customiconsonly", CUSTOMICONSONLY },
{ "defaulticon", DEFAULTICON },
{ "detailpen", T_DETAILPEN },
{ "false", NO },
{ "fastquit", FASTQUIT },
{ "fillpen", T_FILLPEN },
{ "filltextpen", T_FILLTEXTPEN },
{ "focus", FOCUS },
{ "followmouse", FOLLOWMOUSE },
{ "forcemove", FORCEMOVE },
{ "highlighttextpen", T_HIGHLIGHTTEXTPEN },
{ "icon", ICON },
{ "icondir", ICONDIR },
{ "iconfont", ICONFONT },
{ "iconpalette", ICONPALETTE },
{ "icontitle", ICONTITLE },
{ "interscreengap", INTERSCREENGAP },
{ "magicwb", MAGICWB },
{ "manual", MANUAL },
{ "module", MODULE },
{ "modulepath", MODULEPATH },
{ "no", NO },
{ "none", NONE },
{ "off", NO },
{ "on", YES },
{ "opaquemove", OPAQUEMOVE },
{ "opaqueresize", OPAQUERESIZE },
{ "right", RIGHT },
{ "schwartz", SCHWARTZ },
{ "screen", SCREEN },
{ "screenfont", SCREENFONT },
{ "screenmenu", SCREENMENU },
{ "separator", SEPARATOR },
{ "shadowpen", T_SHADOWPEN },
{ "shinepen", T_SHINEPEN },
{ "shortlabelicons", SHORTLABELICONS },
{ "sizeborder", SIZEBORDER },
{ "sloppy", SLOPPY },
{ "style", STYLE },
{ "system", SYSTEM },
{ "textpen", T_TEXTPEN },
{ "title", TITLE },
{ "titlebarclock", TITLEBARCLOCK },
{ "titleclockformat", TITLECLOCKFORMAT },
{ "toolitem", TOOLITEM },
{ "true", YES },
{ "yes", YES }
};
#define N_KW (sizeof(keywords)/sizeof(keywords[0]))
int parse_keyword(char *str)
{
int l=0, h=N_KW-1;
XmuCopyISOLatin1Lowered (str, str);
while(h>=l) {
int i=(h+l)>>1, c=strcmp(str, keywords[i].name);
if(!c)
return keywords[i].token;
else if(c>=0)
l=i+1;
else
h=i-1;
}
return ERRORTOKEN;
}
void free_prefs()
{
Style *s;
while((s = prefs.firststyle)) {
prefs.firststyle = s->next;
if(s->style_class) free(s->style_class);
if(s->style_title) free(s->style_title);
if(s->style_icon_title) free(s->style_icon_title);
if(s->icon_name) free(s->icon_name);
free_icon_pms(&s->icon_pms);
free(s);
}
prefs.laststyle = NULL;
}

335
requestchoice.c Normal file
View File

@@ -0,0 +1,335 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "drawinfo.h"
#include "libami.h"
#ifdef AMIGAOS
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
#define BUT_BUTSPACE (2*(2+5))
#define BUT_INTSPACE 12
#define BUT_EXTSPACE 4
#define BUT_VSPACE 6
#define TXT_HSPACE 48
#define TXT_TOPSPACE 4
#define TXT_MIDSPACE 3
#define TXT_BOTSPACE 4
struct choice {
struct choice *next;
const char *text;
int l, w;
Window win;
} *firstchoice=NULL, *lastchoice=NULL;
struct line {
struct line *next;
const char *text;
int l, w, h;
} *firstline=NULL, *lastline=NULL;
Display *dpy;
Window root, mainwin, textwin;
char *progname;
GC gc;
Pixmap stipple;
int totw=0, maxw=0, toth=0, nchoices=0;
int depressed=0;
struct choice *selected=NULL;
struct DrawInfo dri;
struct RDArgs *ra=NULL;
void selection(int n)
{
printf("%d\n", n);
XDestroyWindow(dpy, mainwin);
XCloseDisplay(dpy);
FreeArgs(ra);
exit(0);
}
void *myalloc(size_t s)
{
void *p=calloc(s,1);
if(p)
return p;
fprintf(stderr, "%s: out of memory!\n", progname);
FreeArgs(ra);
exit(1);
}
void addchoice(const char *txt)
{
struct choice *c=myalloc(sizeof(struct choice));
if(lastchoice)
lastchoice->next=c;
else
firstchoice=c;
lastchoice=c;
c->l=strlen(c->text=txt);
#ifdef USE_FONTSETS
totw+=(c->w=XmbTextEscapement(dri.dri_FontSet, c->text, c->l))+BUT_BUTSPACE;
#else
totw+=(c->w=XTextWidth(dri.dri_Font, c->text, c->l))+BUT_BUTSPACE;
#endif
nchoices++;
}
void addline(const char *txt)
{
struct line *l=myalloc(sizeof(struct line));
if(lastline)
lastline->next=l;
else
firstline=l;
lastline=l;
l->l=strlen(l->text=txt);
#ifdef USE_FONTSETS
l->w=XmbTextEscapement(dri.dri_FontSet, l->text, l->l);
#else
l->w=XTextWidth(dri.dri_Font, l->text, l->l);
#endif
toth+=l->h=dri.dri_Ascent+dri.dri_Descent;
if(l->w>maxw)
maxw=l->w;
}
void refresh_text()
{
int w=totw-BUT_EXTSPACE-BUT_EXTSPACE;
int h=toth-TXT_TOPSPACE-TXT_MIDSPACE-TXT_BOTSPACE-BUT_VSPACE-
(dri.dri_Ascent+dri.dri_Descent);
int x=(totw-maxw+TXT_HSPACE)>>1;
int y=((dri.dri_Ascent+dri.dri_Descent)>>1)+dri.dri_Ascent;
struct line *l;
XSetForeground(dpy, gc, dri.dri_Pens[SHADOWPEN]);
XDrawLine(dpy, textwin, gc, 0, 0, w-2, 0);
XDrawLine(dpy, textwin, gc, 0, 0, 0, h-2);
XSetForeground(dpy, gc, dri.dri_Pens[SHINEPEN]);
XDrawLine(dpy, textwin, gc, 0, h-1, w-1, h-1);
XDrawLine(dpy, textwin, gc, w-1, 0, w-1, h-1);
XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]);
for(l=firstline; l; l=l->next) {
#ifdef USE_FONTSETS
XmbDrawString(dpy, textwin, dri.dri_FontSet, gc, x, y, l->text, l->l);
#else
XDrawString(dpy, textwin, gc, x, y, l->text, l->l);
#endif
y+=dri.dri_Ascent+dri.dri_Descent;
}
}
void refresh_choice(struct choice *c)
{
int w=c->w+BUT_BUTSPACE;
int h=dri.dri_Ascent+dri.dri_Descent+BUT_VSPACE;
XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]);
#ifdef USE_FONTSETS
XmbDrawString(dpy, c->win, dri.dri_FontSet, gc, BUT_BUTSPACE/2,
dri.dri_Ascent+BUT_VSPACE/2, c->text, c->l);
#else
XDrawString(dpy, c->win, gc, BUT_BUTSPACE/2,
dri.dri_Ascent+BUT_VSPACE/2, c->text, c->l);
#endif
XSetForeground(dpy, gc, dri.dri_Pens[(c==selected && depressed)?
SHADOWPEN:SHINEPEN]);
XDrawLine(dpy, c->win, gc, 0, 0, w-2, 0);
XDrawLine(dpy, c->win, gc, 0, 0, 0, h-2);
XSetForeground(dpy, gc, dri.dri_Pens[(c==selected && depressed)?
SHINEPEN:SHADOWPEN]);
XDrawLine(dpy, c->win, gc, 1, h-1, w-1, h-1);
XDrawLine(dpy, c->win, gc, w-1, 1, w-1, h-1);
XSetForeground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]);
XDrawPoint(dpy, c->win, gc, w-1, 0);
XDrawPoint(dpy, c->win, gc, 0, h-1);
}
void split(char *str, const char *delim, void (*func)(const char *))
{
char *p;
if((p=strtok(str, delim)))
do {
(*func)(p);
} while((p=strtok(NULL, delim)));
}
struct choice *getchoice(Window w)
{
struct choice *c;
for(c=firstchoice; c; c=c->next)
if(w == c->win)
return c;
return NULL;
}
void toggle(struct choice *c)
{
XSetWindowBackground(dpy, c->win, dri.dri_Pens[(depressed&&c==selected)?
FILLPEN:BACKGROUNDPEN]);
XClearWindow(dpy, c->win);
refresh_choice(c);
}
void abortchoice()
{
if(depressed) {
depressed=0;
toggle(selected);
}
selected=NULL;
}
void endchoice()
{
struct choice *c=selected, *c2=firstchoice;
int n;
abortchoice();
if(c==lastchoice)
selection(0);
for(n=1; c2; n++, c2=c2->next)
if(c2==c)
selection(n);
selection(0);
}
int main(int argc, char *argv[])
{
XWindowAttributes attr;
static XSizeHints size_hints;
static XTextProperty txtprop1, txtprop2;
int x, y, extra=0, n=0;
struct choice *c;
Argtype array[3], *atp;
progname=argv[0];
initargs(argc, argv);
if(!(ra=ReadArgs((STRPTR)"TITLE/A,BODY/A,GADGETS/M", (LONG *)array, NULL))) {
PrintFault(IoErr(), (UBYTE *)progname);
exit(1);
}
if(!(dpy = XOpenDisplay(NULL))) {
fprintf(stderr, "%s: cannot connect to X server %s\n", progname,
XDisplayName(NULL));
FreeArgs(ra);
exit(1);
}
root = RootWindow(dpy, DefaultScreen(dpy));
XGetWindowAttributes(dpy, root, &attr);
init_dri(&dri, dpy, root, attr.colormap, False);
split(array[1].ptr, "\n", addline);
if((atp=array[2].ptr) != NULL)
for(; atp->ptr; atp++)
split(atp->ptr, "|\n", addchoice);
totw+=BUT_EXTSPACE+BUT_EXTSPACE+BUT_INTSPACE*(nchoices-1);
toth+=2*(dri.dri_Ascent+dri.dri_Descent)+TXT_TOPSPACE+
TXT_MIDSPACE+TXT_BOTSPACE+BUT_VSPACE;
maxw+=TXT_HSPACE+BUT_EXTSPACE+BUT_EXTSPACE;
if(maxw>totw) {
extra=maxw-totw;
totw=maxw;
}
mainwin=XCreateSimpleWindow(dpy, root, 0, 0, totw, toth, 1,
dri.dri_Pens[SHADOWPEN],
dri.dri_Pens[BACKGROUNDPEN]);
gc=XCreateGC(dpy, mainwin, 0, NULL);
XSetBackground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]);
#ifndef USE_FONTSETS
XSetFont(dpy, gc, dri.dri_Font->fid);
#endif
stipple=XCreatePixmap(dpy, mainwin, 2, 2, attr.depth);
XSetForeground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]);
XFillRectangle(dpy, stipple, gc, 0, 0, 2, 2);
XSetForeground(dpy, gc, dri.dri_Pens[SHINEPEN]);
XDrawPoint(dpy, stipple, gc, 0, 1);
XDrawPoint(dpy, stipple, gc, 1, 0);
XSetWindowBackgroundPixmap(dpy, mainwin, stipple);
textwin=XCreateSimpleWindow(dpy, mainwin, BUT_EXTSPACE, TXT_TOPSPACE, totw-
BUT_EXTSPACE-BUT_EXTSPACE, toth-TXT_TOPSPACE-
TXT_MIDSPACE-TXT_BOTSPACE-BUT_VSPACE-
(dri.dri_Ascent+dri.dri_Descent),
0, dri.dri_Pens[SHADOWPEN],
dri.dri_Pens[BACKGROUNDPEN]);
XSelectInput(dpy, textwin, ExposureMask);
x=BUT_EXTSPACE;
y=toth-TXT_BOTSPACE-(dri.dri_Ascent+dri.dri_Descent)-BUT_VSPACE;
for(c=firstchoice; c; c=c->next) {
c->win=XCreateSimpleWindow(dpy, mainwin,
x+(nchoices==1? (extra>>1):
n++*extra/(nchoices-1)),
y, c->w+BUT_BUTSPACE,
dri.dri_Ascent+dri.dri_Descent+
BUT_VSPACE, 0,
dri.dri_Pens[SHADOWPEN],
dri.dri_Pens[BACKGROUNDPEN]);
XSelectInput(dpy, c->win, ExposureMask|ButtonPressMask|ButtonReleaseMask|
EnterWindowMask|LeaveWindowMask);
x+=c->w+BUT_BUTSPACE+BUT_INTSPACE;
}
size_hints.flags = PResizeInc;
txtprop1.value=(unsigned char *)array[0].ptr;
txtprop2.value=(unsigned char *)"RequestChoice";
txtprop2.encoding=txtprop1.encoding=XA_STRING;
txtprop2.format=txtprop1.format=8;
txtprop1.nitems=strlen((char *)txtprop1.value);
txtprop2.nitems=strlen((char *)txtprop2.value);
XSetWMProperties(dpy, mainwin, &txtprop1, &txtprop2, argv, argc,
&size_hints, NULL, NULL);
XMapSubwindows(dpy, mainwin);
XMapRaised(dpy, mainwin);
for(;;) {
XEvent event;
XNextEvent(dpy, &event);
switch(event.type) {
case Expose:
if(!event.xexpose.count)
if(event.xexpose.window == textwin)
refresh_text();
else if((c=getchoice(event.xexpose.window)))
refresh_choice(c);
break;
case LeaveNotify:
if(depressed && event.xcrossing.window==selected->win) {
depressed=0;
toggle(selected);
}
break;
case EnterNotify:
if((!depressed) && selected && event.xcrossing.window==selected->win) {
depressed=1;
toggle(selected);
}
break;
case ButtonPress:
if(event.xbutton.button==Button1 &&
(c=getchoice(event.xbutton.window))) {
abortchoice();
depressed=1;
toggle(selected=c);
}
break;
case ButtonRelease:
if(event.xbutton.button==Button1 && selected)
if(depressed)
endchoice();
else
abortchoice();
break;
}
}
FreeArgs(ra);
}

5
schwartz.map Normal file
View File

@@ -0,0 +1,5 @@
P3 4 4 255
170 160 170 0 0 0 255 255 255 91 120 245
153 144 153 187 176 187 187 170 153 255 187 170
217 34 241 145 90 70 62 62 65 110 105 115
255 25 25 255 255 0 114 125 146 0 200 0

13
scoptions Normal file
View File

@@ -0,0 +1,13 @@
DATA=FAR
NOSTACKCHECK
OPTIMIZE
STRIPDEBUG
NOICONS
INCLUDEDIR=x11:sasc/include
INCLUDEDIR=include:netinclude
DEFINE AMIGAOS
LIBRARY=x11:sasc/lib/x11.lib
IGNORE=161
IGNORE=93
IGNORE=100
IDentifierLENgth=63

386
screen.c Normal file
View File

@@ -0,0 +1,386 @@
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
#include "drawinfo.h"
#include "screen.h"
#include "icon.h"
#include "client.h"
#include "prefs.h"
#include "icc.h"
extern Display *dpy;
extern Cursor wm_curs;
#ifdef USE_FONTSETS
extern XFontSet labelfontset;
extern int labelfont_ascent;
#else
extern XFontStruct *labelfont;
#endif
extern char *progname;
extern XContext screen_context, client_context, vroot_context;
extern void createmenubar();
extern void reparent(Client *);
Scrn *front = NULL, *scr = NULL;
static Scrn *getvroot(Window root)
{
Scrn *s;
if(!XFindContext(dpy, root, vroot_context, (XPointer *)&s))
return s;
return NULL;
}
static void setvroot(Window root, Scrn *s)
{
XSaveContext(dpy, root, vroot_context, (XPointer)s);
}
void setvirtualroot(Scrn *s)
{
if(s) {
Scrn *old_vroot = getvroot(s->root);
if(s==old_vroot) return;
if(old_vroot)
XDeleteProperty(dpy, old_vroot->back, swm_vroot);
setvroot(s->root, s);
XChangeProperty(dpy, s->back, swm_vroot, XA_WINDOW, 32, PropModeReplace,
(unsigned char *)&(s->back), 1);
}
}
Scrn *getscreenbyroot(Window w);
void screentoback(void)
{
Scrn *f;
if((!scr)||(scr->back==scr->root)) return;
if(scr==front) {
XLowerWindow(dpy, scr->back);
front=scr->behind;
} else if(scr==getscreenbyroot(scr->root)) {
XLowerWindow(dpy, scr->back);
scr->upfront->behind=scr->behind;
scr->behind->upfront=scr->upfront;
scr->upfront=front->upfront;
scr->behind=front;
front->upfront->behind=scr;
front->upfront=scr;
} else if(scr->behind==front) {
XRaiseWindow(dpy, scr->back);
front=scr;
} else {
XRaiseWindow(dpy, scr->back);
scr->upfront->behind=scr->behind;
scr->behind->upfront=scr->upfront;
scr->upfront=front->upfront;
scr->behind=front;
front->upfront->behind=scr;
front->upfront=scr;
front=scr;
}
if((f = getscreenbyroot(scr->root))) {
init_dri(&f->dri, dpy, f->root, f->cmap, True);
setvirtualroot(f);
}
}
void assimilate(Window w, int x, int y)
{
#ifdef ASSIMILATE_WINDOWS
XSetWindowAttributes xsa;
XAddToSaveSet(dpy, w);
XReparentWindow(dpy, w, scr->back, x, (y<scr->y? 0:y-scr->y));
XSaveContext(dpy, w, screen_context, (XPointer)scr);
xsa.override_redirect = False;
XChangeWindowAttributes(dpy, w, CWOverrideRedirect, &xsa);
#endif
}
static void scanwins()
{
unsigned int i, nwins;
Client *c;
Window dw1, dw2, *wins;
XWindowAttributes *pattr=NULL;
XPointer dummy;
Scrn *s=scr;
XQueryTree(dpy, scr->root, &dw1, &dw2, &wins, &nwins);
if(nwins && (pattr=calloc(nwins, sizeof(XWindowAttributes)))) {
for (i = 0; i < nwins; i++)
XGetWindowAttributes(dpy, wins[i], pattr+i);
for (i = 0; i < nwins; i++) {
if (!XFindContext(dpy, wins[i], client_context, &dummy))
continue;
if (pattr[i].override_redirect) {
if(scr->back!=scr->root && XFindContext(dpy, wins[i], screen_context, &dummy))
assimilate(wins[i], pattr[i].x, pattr[i].y);
continue;
}
c = createclient(wins[i]);
if (c != 0 && c->window == wins[i]) {
if (pattr[i].map_state == IsViewable) {
c->state=NormalState;
getstate(c);
reparent(c);
if(c->state==IconicState) {
createicon(c);
adjusticon(c->icon);
XMapWindow(dpy, c->icon->window);
if(c->icon->labelwidth)
XMapWindow(dpy, c->icon->labelwin);
c->icon->mapped=1;
} else if(c->state==NormalState)
XMapRaised(dpy, c->parent);
else
XRaiseWindow(dpy, c->parent);
c->reparenting=1;
scr=s;
}
}
}
free(pattr);
}
XFree((void *) wins);
cleanupicons();
}
void closescreen(void)
{
Scrn *dummy;
if(scr->behind == scr)
scr->behind = NULL;
else {
scr->upfront->behind=scr->behind;
scr->behind->upfront=scr->upfront;
}
XDeleteContext(dpy,scr->menubardepth,screen_context);
XDestroyWindow(dpy,scr->menubardepth);
XDeleteContext(dpy,scr->menubarparent,screen_context);
XDestroyWindow(dpy,scr->menubarparent);
XDeleteContext(dpy,scr->menubar,screen_context);
XDestroyWindow(dpy,scr->menubar);
if(scr->inputbox != None) {
XDeleteContext(dpy,scr->inputbox,screen_context);
XDestroyWindow(dpy,scr->inputbox);
}
XFreeGC(dpy,scr->rubbergc);
XFreeGC(dpy,scr->icongc);
XFreeGC(dpy,scr->gc);
XDeleteContext(dpy,scr->back,screen_context);
XDestroyWindow(dpy,scr->back);
free_icon_pms(&scr->default_tool_pms);
term_dri(&scr->dri, dpy, scr->cmap);
if(scr->iconcolorsallocated)
XFreeColors(dpy, scr->cmap, scr->iconcolor, scr->iconcolorsallocated, 0);
if(front==scr)
front=scr->behind;
dummy=scr->behind;
free(scr);
scr=dummy;
}
Scrn *openscreen(char *deftitle, Window root)
{
Scrn *s;
XWindowAttributes attr;
XSetWindowAttributes swa;
XGCValues gcv;
extern char *label_font_name;
if(!root)
root = DefaultRootWindow(dpy);
XGetWindowAttributes(dpy, root, &attr);
s = (Scrn *)calloc(1, sizeof(Scrn));
s->root = root;
s->cmap = attr.colormap;
s->depth = attr.depth;
s->visual = attr.visual;
s->number = XScreenNumberOfScreen(attr.screen);
s->inputbox = None;
init_dri(&s->dri, dpy, s->root, s->cmap, True);
swa.background_pixel = s->dri.dri_Pens[BACKGROUNDPEN];
swa.override_redirect = True;
swa.colormap = attr.colormap;
swa.cursor = wm_curs;
swa.border_pixel = BlackPixel(dpy, DefaultScreen(dpy));
s->back = XCreateWindow(dpy, root,
-prefs.borderwidth, (s->y=0)-prefs.borderwidth,
s->width = attr.width, s->height = attr.height,
s->bw=prefs.borderwidth, CopyFromParent,
InputOutput, CopyFromParent,
CWBackPixel|CWOverrideRedirect|CWColormap|CWCursor|
CWBorderPixel,
&swa);
XSaveContext(dpy, s->back, screen_context, (XPointer)s);
gcv.background = s->dri.dri_Pens[BACKGROUNDPEN];
#ifdef USE_FONTSETS
s->gc = XCreateGC(dpy, s->back, GCBackground, &gcv);
if(!labelfontset) {
char **missing_charsets = NULL;
int n_missing_charsets = 0;
labelfontset = XCreateFontSet(dpy, label_font_name,
&missing_charsets,
&n_missing_charsets, NULL);
if(missing_charsets)
XFreeStringList(missing_charsets);
if(!labelfontset) {
fprintf(stderr, "%s: cannot open font %s\n", progname, label_font_name);
labelfontset = s->dri.dri_FontSet;
}
}
{
XFontStruct **fsl;
char **fnl;
if(XFontsOfFontSet(labelfontset, &fsl, &fnl) < 1) {
fprintf(stderr, "%s: fontset %s is empty\n", progname,
label_font_name);
exit(1);
}
labelfont_ascent = fsl[0]->ascent;
s->lh = fsl[0]->ascent+fsl[0]->descent;
}
gcv.foreground = s->dri.dri_Pens[TEXTPEN];
s->icongc = XCreateGC(dpy, s->back, GCForeground|GCBackground, &gcv);
#else
gcv.font = s->dri.dri_Font->fid;
s->gc = XCreateGC(dpy, s->back, GCBackground|GCFont, &gcv);
if(!labelfont)
if(!(labelfont = XLoadQueryFont(dpy, label_font_name))) {
fprintf(stderr, "%s: cannot open font %s\n", progname, label_font_name);
labelfont = s->dri.dri_Font;
}
s->lh = labelfont->ascent+labelfont->descent;
gcv.font = labelfont->fid;
gcv.foreground = s->dri.dri_Pens[TEXTPEN];
s->icongc = XCreateGC(dpy, s->back, GCForeground|GCBackground|GCFont, &gcv);
#endif
gcv.function = GXinvert;
gcv.subwindow_mode = IncludeInferiors;
s->rubbergc = XCreateGC(dpy, s->back, GCFunction|GCSubwindowMode, &gcv);
s->title = s->deftitle = deftitle;
s->default_tool_pms.pm = None;
s->default_tool_pms.pm2 = None;
s->default_tool_pms.cs.colors = NULL;
s->default_tool_pms.cs2.colors = NULL;
s->default_tool_pm_w=0;
s->default_tool_pm_h=0;
if(front) {
s->behind=front;
s->upfront=front->upfront;
front->upfront->behind=s;
front->upfront=s;
} else {
s->behind = s->upfront = s;
front = s;
}
scr=s;
return s;
}
void realizescreens(void)
{
scr = front;
do {
if(!scr->realized) {
scr->fh = scr->dri.dri_Ascent+scr->dri.dri_Descent;
scr->bh=scr->fh+3;
scr->h2=(2*scr->bh)/10; scr->h3=(3*scr->bh)/10;
scr->h4=(4*scr->bh)/10; scr->h5=(5*scr->bh)/10;
scr->h6=(6*scr->bh)/10; scr->h7=(7*scr->bh)/10;
scr->h8=(8*scr->bh)/10;
createmenubar();
createdefaulticons();
if (scr->inputbox == None && prefs.focus == FOC_CLICKTOTYPE) {
scr->inputbox = XCreateWindow(dpy, scr->back, 0, 0,
scr->width, scr->height, 0, 0,
InputOnly, CopyFromParent, 0, NULL);
XSaveContext(dpy, scr->inputbox, screen_context, (XPointer)scr);
XSelectInput(dpy, scr->inputbox, KeyPressMask|KeyReleaseMask);
XLowerWindow(dpy, scr->inputbox);
XMapWindow(dpy, scr->inputbox);
}
XSelectInput(dpy, scr->root,
SubstructureNotifyMask|SubstructureRedirectMask|
KeyPressMask|KeyReleaseMask|
ButtonPressMask|ButtonReleaseMask|FocusChangeMask);
if(scr->back != scr->root)
XSelectInput(dpy, scr->back,
SubstructureNotifyMask|SubstructureRedirectMask|
KeyPressMask|KeyReleaseMask|
ButtonPressMask|ButtonReleaseMask);
XStoreName(dpy, scr->back, scr->title);
XLowerWindow(dpy, scr->back);
XMapWindow(dpy, scr->back);
}
scr=scr->behind;
} while(scr!=front);
do {
if(!scr->realized) {
scanwins();
if(!getvroot(scr->root)) {
init_dri(&scr->dri, dpy, scr->root, scr->cmap, True);
setvirtualroot(scr);
}
scr->realized=1;
}
scr=scr->behind;
} while(scr!=front);
}
Scrn *getscreen(Window w)
{
Scrn *s=front;
if(w && s)
do {
if(s->back == w || s->root == w)
return s;
s=s->behind;
} while(s!=front);
return front;
}
Scrn *getscreenbyroot(Window w)
{
Scrn *s=front;
if(s)
do {
if(s->root == w)
return s;
s=s->behind;
} while(s!=front);
return NULL;
}

30
screen.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef SCREEN_H
#define SCREEN_H
#include "icon.h"
typedef struct _Scrn {
struct _Scrn *behind, *upfront;
Window root, back, inputbox;
Colormap cmap;
Visual *visual;
GC gc, icongc, rubbergc, menubargc;
char *title;
char *deftitle;
struct DrawInfo dri;
int fh,bh,h2,h3,h4,h5,h6,h7,h8;
int width, height, depth, y, bw;
struct IconPixmaps default_tool_pms;
Pixmap disabled_stipple;
unsigned int default_tool_pm_w, default_tool_pm_h, lh;
Window menubar, menubarparent, menubardepth;
int hotkeyspace, checkmarkspace, subspace, menuleft;
struct _Icon *icons, *firstselected;
struct Menu *firstmenu;
int number, realized, iconcolorsallocated;
unsigned long iconcolor[256];
} Scrn;
extern Scrn *scr, *front;
#endif

47
smakefile Normal file
View File

@@ -0,0 +1,47 @@
PROGRAMS = amiwm requestchoice
AMIWM_HOME = amiwm:
SRCS1 = main.c drawinfo.c client.c frame.c icc.c \
icon.c menu.c diskobject.c gram.c lex.c rc.c
OBJS1 = main.o drawinfo.o client.o frame.o icc.o \
icon.o menu.o diskobject.o gram.o lex.o rc.o
SRCS2 = requestchoice.c drawinfo.c
OBJS2 = requestchoice.o drawinfo.o
all : $(PROGRAMS)
amiwm : $(OBJS1)
sc LINK PNAME amiwm $(OBJS1)
requestchoice : $(OBJS2)
sc LINK PNAME requestchoice $(OBJS2)
gram.c : gram.y
bison -y -d -o gram.c gram.y
lex.c : lex.l
flex -t < lex.l > lex.c
gram.o : gram.c
lex.o : lex.c
menu.o : menu.c
sc menu DEF AMIWM_HOME="$(AMIWM_HOME)"
rc.o : rc.c
sc rc DEF AMIWM_HOME="$(AMIWM_HOME)"
clean : tidy
-delete FORCE $(PROGRAMS)
tidy :
-delete FORCE \#?.(o|q|tmp|lnk) lex.c gram.c gram.h core
install :
copy amiwm requestchoice system.amiwmrc def_tool.info $(AMIWM_HOME)

16
style.h Normal file
View File

@@ -0,0 +1,16 @@
#ifndef STYLE_H
#define STYLE_H
#include <X11/Xlib.h>
#include "icon.h"
typedef struct _Style {
struct _Style *next;
char *style_class, *style_title, *style_icon_title;
struct IconPixmaps icon_pms;
unsigned int icon_pm_w, icon_pm_h;
char *icon_name;
} Style;
#endif

10
system.amiwmrc Normal file
View File

@@ -0,0 +1,10 @@
FastQuit Off
SizeBorder Right
IconPalette MagicWB
DefaultIcon "def_tool.info"
CustomIconsOnly Off
ShortLabelIcons Off
TitlebarClock Off
TitleClockFormat "%c"
Screen "Workbench Screen"
Module "Keyboard" "Meta<M>:all:rotatescreens"

3
system.map Normal file
View File

@@ -0,0 +1,3 @@
P3 4 2 255
170 170 170 0 0 0 255 255 255 102 136 187
238 68 68 85 221 85 0 68 221 238 153 0

1
version.h Normal file
View File

@@ -0,0 +1 @@
#define VERSION "0.22"