1diff -urN xlife-6.7.3/main.c xlife-6.7.4/main.c
2--- xlife-6.7.3/main.c	2013-08-04 15:10:25.000000000 +0400
3+++ xlife-6.7.4/main.c	2013-09-29 22:21:44.000000000 +0400
4@@ -25,7 +25,7 @@
5 /*
6  * A lot of modifications were added at 2001, 2011-13 by Vladimir Lidovski vol.litwr@gmail.com
7  * (C) This version of XLife may be used under the same conditions as mentioned above
8- * $Id: main.c 241 2013-08-04 10:00:07Z micro $
9+ * $Id: main.c 253 2013-09-29 18:39:43Z teacher $
10  */
11
12 #include <X11/Xlib.h>
13@@ -1135,7 +1135,7 @@
14       convmode++;
15       for (i = 1; i < argc; i++)
16         if (*argv[i] == '-')
17-              if (strchr("ACDIMPRSpv?lg", argv[i][1]))
18+              if (strchr("ACDIMPRSpv?lg4", argv[i][1]))
19                   switch (argv[i][1]) {
20                      case '?':
21 le:                     fatal("Usage: lifeconv -ACDIMPRSpv? [-l pattern-lib] [-g n] filename\n");
22@@ -1381,6 +1381,7 @@
23 		break;
24 	      case ConfigureNotify:
25 		DoResize();
26+                redraw_lifew();
27 		break;
28 	      case Expose:
29 	        DoExpose(event.xexpose.window);
30diff -urN xlife-6.7.3/patchlevel.h xlife-6.7.4/patchlevel.h
31--- xlife-6.7.3/patchlevel.h	2013-08-04 15:10:25.000000000 +0400
32+++ xlife-6.7.4/patchlevel.h	2013-09-29 20:55:50.000000000 +0400
33@@ -23,9 +23,9 @@
34 /*
35  * Several modifications were added at 2011-13 by Vladimir Lidovski vol.litwr@gmail.com
36  * (C) This version of XLife may be used under the same conditions as mentioned above
37- * $Id: patchlevel.h 227 2013-07-30 04:15:35Z micro $
38+ * $Id: patchlevel.h 251 2013-09-29 17:13:49Z teacher $
39  */
40
41 static int majorversion = 6;
42 static int minorversion = 7;
43-static int patchlevel = 3;
44+static int patchlevel = 4;
45diff -urN xlife-6.7.3/tile.c xlife-6.7.4/tile.c
46--- xlife-6.7.3/tile.c	2013-08-04 15:10:25.000000000 +0400
47+++ xlife-6.7.4/tile.c	2013-09-29 22:21:44.000000000 +0400
48@@ -23,7 +23,7 @@
49 /*
50  * A lot of modifications were added at 2001, 2011-13 by Vladimir Lidovski vol.litwr@gmail.com
51  * (C) This version of XLife may be used under the same conditions as mentioned above
52- * $Id: tile.c 241 2013-08-04 10:00:07Z micro $
53+ * $Id: tile.c 253 2013-09-29 18:39:43Z teacher $
54  */
55
56 /*
57@@ -877,6 +877,26 @@
58     coord_t x = 0, y;
59     cellcount_t cellcount;
60     pattern *pp = tentative.tiles ? &tentative : &active;
61+/*
62+ * Determine the bounding box of the live cells.
63+ */
64+    cellcount = bounding_box(pp);
65+    if (mode == '4') {
66+          if (ev_mode != VALENCE_DRIVEN || (born&1) || pp->xmax - pp->xmin >= 192
67+                || pp->ymax - pp->ymin >= 192
68+                || pp->xmax - pp->xmin >= 160 && pp->ymax - pp->ymin >= 160) {
69+             fprintf(stderr, "can't convert this pattern\n");
70+             return;
71+          }
72+          fwrite(&live, 2, 1, ofp);
73+          fwrite(&born, 2, 1, ofp);
74+          fprintf(ofp, "%c%c", pp->xmax - pp->xmin + 1, pp->ymax - pp->ymin + 1);
75+	  FOR_CELLS(pp, ptr, dx, dy)
76+		if (val = getcell(&ptr->cells, dx, dy))
77+		    fprintf(ofp, "%c%c",
78+			       ptr->x + dx - pp->xmin, ptr->y + dy - pp->ymin);
79+	  return;
80+    }
81     fprintf(ofp, "##XLife\n");
82     if (fname[0])
83         fprintf(ofp, "#N %s\n", fname);
84@@ -910,10 +930,6 @@
85     if (*colorfile)
86        fprintf(ofp, "#X %s\n", strrchr(colorfile, '/') + 1);
87     buf[0] = 0;
88-/*
89- * Determine the bounding box of the live cells.
90- */
91-    cellcount = bounding_box(pp);
92 /* caller may want save to shortest format */
93     if (mode == '\0')
94 	if ((pp->ymax - pp->ymin + 1)*(pp->xmax - pp->xmin + 1) > cellcount * 8)
95@@ -942,11 +958,11 @@
96 	  FOR_CELLS(pp, ptr, dx, dy)
97 		if (val = getcell(&ptr->cells, dx, dy))
98 		    if (maxstates > 2)
99-				fprintf(ofp, "%d %d %d\n",
100+			  fprintf(ofp, "%d %d %d\n",
101 				       ptr->x + dx - pp->xmin, ptr->y + dy - pp->ymin,
102 				       val);
103-		else
104-		    fprintf(ofp, "%d %d\n",
105+		    else
106+		          fprintf(ofp, "%d %d\n",
107 				       ptr->x + dx - pp->xmin, ptr->y + dy - pp->ymin);
108 	  return;
109
110