home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!sun-barr!newstop!sun!andrew.cmu.edu
- From: dl2n+@andrew.cmu.edu (Daniel Edward Lovinger)
- Newsgroups: comp.sources.x
- Subject: v08i041: Xlife 2.0, Part05/10
- Message-ID: <138510@sun.Eng.Sun.COM>
- Date: 7 Jul 90 00:01:27 GMT
- Sender: news@sun.Eng.Sun.COM
- Lines: 4366
- Approved: argv@sun.com
-
- Submitted-by: Daniel Edward Lovinger <dl2n+@andrew.cmu.edu>
- Posting-number: Volume 8, Issue 41
- Archive-name: xlife/part05
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 5 (of 8)."
- # Contents: xlife-2.0/data.h xlife-2.0/file.c xlife-2.0/icon.h
- # xlife-2.0/lifeconv.c xlife-2.0/patterns/background1.life
- # xlife-2.0/patterns/billiards.life
- # xlife-2.0/patterns/blockpusher4.life
- # xlife-2.0/patterns/counter.life
- # xlife-2.0/patterns/gliderarmyof256.life
- # xlife-2.0/patterns/rake2.life xlife-2.0/patterns/round.life
- # xlife-2.0/utils.c xlife-2.0/xlife.man
- # Wrapped by dl2n@niobe.weh.andrew.cmu.edu on Mon Jul 2 22:48:10 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f xlife-2.0/data.h -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/data.h\"
- else
- echo shar: Extracting \"xlife-2.0/data.h\" \(3374 characters\)
- sed "s/^X//" >xlife-2.0/data.h <<'END_OF_xlife-2.0/data.h'
- X/*
- X * XLife Copyright 1989 Jon Bennett jb7m+@andrew.cmu.edu, jcrb@cs.cmu.edu
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation, and that the name of the copyright holders not be used in
- X * advertising or publicity pertaining to distribution of the software without
- X * specific, written prior permission. The copyright holders make no
- X * representations about the suitability of this software for any purpose. It
- X * is provided "as is" without express or implied warranty.
- X *
- X * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X */
- X
- Xextern int sys_nerr, errno;
- Xextern char *sys_errlist[];
- X#define SYSERR sys_errlist[(errno > sys_nerr? 0 : errno)]
- X
- XGLOBAL Display *disp;
- XGLOBAL Window rootw, mainw, lifew, inputw;
- XGLOBAL int screen;
- XGLOBAL unsigned long fcolor, bcolor;
- XGLOBAL XEvent event;
- XGLOBAL XFontStruct *nfont, *bfont;
- XGLOBAL int getinput;
- X#define INPBUFLEN 255
- XGLOBAL char inpbuf[INPBUFLEN];
- XGLOBAL int minbuflen;
- X#define DIRBUFLEN 100
- XGLOBAL int numcomments;
- X#define MAXCOMMENTS 50
- XGLOBAL char comments[MAXCOMMENTS][256];
- XGLOBAL char loadirbuf[DIRBUFLEN];
- XGLOBAL char loadir[DIRBUFLEN];
- XGLOBAL char keybuf[16];
- XGLOBAL char lookup[0xfffff];
- XGLOBAL char fname[256];
- XGLOBAL KeySym ks;
- XGLOBAL XGCValues xgcv;
- XGLOBAL GC ntextgc, btextgc,inputgc,blackgc,whitegc;
- XGLOBAL Pixmap lifepm;
- XGLOBAL Cursor cursor;
- X
- XGLOBAL char *itoa();
- X
- XGLOBAL unsigned long xpos,ypos;
- X
- XGLOBAL int getcell();
- XGLOBAL void generate();
- XGLOBAL void addcell();
- XGLOBAL void deletecell();
- XGLOBAL void redisplay();
- XGLOBAL void forget();
- XGLOBAL void Motion();
- XGLOBAL void setcell();
- XGLOBAL void kill();
- XGLOBAL void clear();
- XGLOBAL void savefile();
- XGLOBAL void loadfile();
- XGLOBAL void center();
- XGLOBAL void newrules();
- XGLOBAL void redrawscreen();
- XGLOBAL void help();
- XGLOBAL void randomize();
- XGLOBAL void settimeout();
- XGLOBAL void gentab();
- XGLOBAL void saveall();
- XGLOBAL void getxstring();
- XGLOBAL void name_file();
- XGLOBAL void comment();
- XGLOBAL void view_comments();
- XGLOBAL void benchmark();
- XGLOBAL unsigned long dispcells;
- XGLOBAL unsigned long load;
- XGLOBAL unsigned long save;
- XGLOBAL unsigned long scale;
- XGLOBAL unsigned long born;
- XGLOBAL unsigned long live;
- XGLOBAL unsigned long run;
- XGLOBAL unsigned long maxdead;
- XGLOBAL unsigned long hide;
- XGLOBAL unsigned long generations;
- XGLOBAL unsigned long numboxes;
- XGLOBAL unsigned long numcells;
- XGLOBAL unsigned long collisions;
- X#define CHASHSIZE 65537
- X#define CHASHMULT 16383
- X
- XGLOBAL unsigned long hashcnt[CHASHSIZE];
- XGLOBAL int width;
- XGLOBAL int height;
- XGLOBAL int inputlength;
- XGLOBAL int onpt,offpt,onrect,offrect;
- XGLOBAL int state;
- XGLOBAL struct timeval timeout;
- X
- X
- XGLOBAL int link_called;
- XGLOBAL int link_search;
- XGLOBAL int create_called;
- XGLOBAL int create_null;
- END_OF_xlife-2.0/data.h
- if test 3374 -ne `wc -c <xlife-2.0/data.h`; then
- echo shar: \"xlife-2.0/data.h\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/file.c -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/file.c\"
- else
- echo shar: Extracting \"xlife-2.0/file.c\" \(5219 characters\)
- sed "s/^X//" >xlife-2.0/file.c <<'END_OF_xlife-2.0/file.c'
- X/*
- X * XLife Copyright 1989 Jon Bennett jb7m+@andrew.cmu.edu, jcrb@cs.cmu.edu
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation, and that the name of the copyright holders not be used in
- X * advertising or publicity pertaining to distribution of the software without
- X * specific, written prior permission. The copyright holders make no
- X * representations about the suitability of this software for any purpose. It
- X * is provided "as is" without express or implied warranty.
- X *
- X * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X */
- X
- X#include "defs.h"
- X#include "data.h"
- X#include <stdio.h>
- X#include <pwd.h>
- X#include <ctype.h>
- X
- Xchar *gethome()
- X{
- X return(getpwuid(getuid())->pw_dir);
- X}
- X
- X
- Xchar *checktilda(stng)
- Xchar *stng;
- X{
- X static char full[1024];
- X struct passwd *pw;
- X int i;
- X if (stng[0]=='~') {
- X i=1;
- X while(stng[i]!='/' && stng[i]!='\0')
- X full[i-1]=stng[i], i++;
- X if (i==1)
- X strcpy(full,gethome());
- X else {
- X full[i-1]='\0';
- X if((pw = getpwnam(full)) == NULL){
- X XClearWindow(disp,inputw);
- X XDrawString(disp,inputw,ntextgc,ICOORDS(0,0),SYSERR,strlen(SYSERR));
- X }
- X else{
- X strcpy(full,pw->pw_dir);
- X }
- X }
- X strcat(full,stng+i);
- X } else
- X strcpy(full,stng);
- X return(full);
- X}
- X
- Xchar *addlifeext(buf)
- Xchar *buf;
- X{
- X int len=strlen(buf);
- X if(strcmp(buf+len-5,".life")){
- X return(".life");
- X }
- X return("");
- X}
- X
- Xvoid savefile(){
- X
- X FILE *savefl;
- X char outbuf[100];
- X
- X strcpy(inpbuf,"Save to:");
- X minbuflen=8;
- X strcat(inpbuf, "./");
- X XClearWindow(disp,inputw);
- X XDrawString(disp, inputw, ntextgc,ICOORDS(0,0),inpbuf, strlen(inpbuf));
- X
- X getxstring();
- X
- X strcpy(outbuf,checktilda(inpbuf+8));
- X inpbuf[0]=0;
- X strcat(outbuf,addlifeext(outbuf));
- X if((savefl=fopen(outbuf,"w")) != NULL){
- X saveall(savefl, '\0');
- X fclose(savefl);
- X }
- X else{
- X XClearWindow(disp,inputw);
- X XDrawString(disp,inputw,ntextgc,ICOORDS(0,0),SYSERR,strlen(SYSERR));
- X }
- X}
- X
- X
- Xint do_loadfile(filename, hotx, hoty)
- X char *filename;
- X int hotx, hoty;
- X{
- X FILE *loadfl;
- X int x,y, linect = 0;
- X#define M_ABSOLUTE 0
- X#define M_RELATIVE 1
- X#define M_PICTURE 2
- X int loadmode = M_ABSOLUTE;
- X
- X if ((loadfl=fopen(filename,"r")) != NULL)
- X {
- X char buf[BUFSIZ];
- X int xoff = 0, yoff = 0;
- X
- X while (fgets(buf, BUFSIZ, loadfl) != (char *)NULL)
- X {
- X if (buf[0] == '#')
- X {
- X char incl[BUFSIZ];
- X int lx, ly;
- X
- X incl[0] = '\0';
- X switch(buf[1])
- X {
- X
- X case 'N':
- X (void) strcat(fname,buf+2);
- X fname[strlen(fname)-1]=0;
- X break;
- X
- X case 'A':
- X loadmode = M_ABSOLUTE;
- X break;
- X
- X case 'R':
- X loadmode = M_RELATIVE;
- X xoff = yoff = 0;
- X (void) sscanf(buf+2, " %d %d", &xoff, &yoff);
- X break;
- X
- X case 'P':
- X loadmode = M_PICTURE;
- X xoff = yoff = 0;
- X (void) sscanf(buf+2, " %d %d", &xoff, &yoff);
- X break;
- X
- X case 'I':
- X xoff = yoff = 0;
- X (void) sscanf(buf+2, " %s %d %d", incl, &xoff, &yoff);
- X (void) strcat(incl, addlifeext(incl));
- X if (!do_loadfile(incl, hotx + xoff, hoty + yoff))
- X return(0);
- X break;
- X
- X case 'L':
- X (void) sscanf(buf+2, " %d %d %[^\n]", &lx, &ly, incl);
- X XDrawString(disp, lifew, ntextgc,
- X RXPOS(xoff+lx, xpos), RYPOS(yoff+ly, ypos),
- X incl, strlen(incl));
- X break;
- X
- X
- X default:
- X break;
- X }
- X }
- X else if (loadmode == M_ABSOLUTE && sscanf(buf,"%d %d\n",&x,&y)==2)
- X {
- X addcell(xpos + x, ypos + y);
- X numcells++;
- X }
- X else if (loadmode == M_RELATIVE && sscanf(buf,"%d %d\n",&x,&y)==2)
- X {
- X addcell(hotx + xoff + x, hoty + yoff + y);
- X numcells++;
- X }
- X else /* loadmode == M_PICTURE */
- X {
- X char *cp;
- X
- X for (cp = buf; *cp; cp++)
- X if (*cp == '*')
- X {
- X addcell(hotx + xoff + (cp-buf),
- X hoty + yoff + linect);
- X numcells++;
- X }
- X }
- X linect++;
- X }
- X fclose(loadfl);
- X return 1;
- X } else
- X return 0;
- X}
- X
- X
- Xvoid loadfile(){
- X
- X char outbuf[100];
- X
- X strcpy(inpbuf,"Load from:");
- X minbuflen=10;
- X strcat(inpbuf,loadirbuf);
- X XClearWindow(disp,inputw);
- X XDrawString(disp, inputw, ntextgc,ICOORDS(0,0),inpbuf, strlen(inpbuf));
- X
- X getxstring();
- X
- X strcpy(outbuf,checktilda(inpbuf+10));
- X inpbuf[0]=0;
- X strcat(outbuf,addlifeext(outbuf));
- X if (do_loadfile(outbuf, XPOS(event.xmotion.x, xpos), YPOS(event.xmotion.y, ypos))) {
- X/* scale = 1; */
- X XClearWindow(disp,lifew);
- X redrawscreen();
- X }
- X else{
- X XClearWindow(disp,inputw);
- X XDrawString(disp,inputw,ntextgc,ICOORDS(0,0),SYSERR,strlen(SYSERR));
- X }
- X}
- X
- END_OF_xlife-2.0/file.c
- if test 5219 -ne `wc -c <xlife-2.0/file.c`; then
- echo shar: \"xlife-2.0/file.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/icon.h -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/icon.h\"
- else
- echo shar: Extracting \"xlife-2.0/icon.h\" \(3319 characters\)
- sed "s/^X//" >xlife-2.0/icon.h <<'END_OF_xlife-2.0/icon.h'
- X#define icon_width 64
- X#define icon_height 64
- X#define icon_x_hot -1
- X#define icon_y_hot -1
- Xstatic char icon_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x30, 0x01,
- X 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x38, 0x03, 0x00, 0x00, 0x00, 0x00,
- X 0xc0, 0x01, 0x1c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x0e, 0x03,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x03, 0x18, 0x1e, 0x78, 0x00,
- X 0x00, 0x8e, 0x03, 0x03, 0x18, 0x3f, 0xfc, 0x00, 0x00, 0xdc, 0x01, 0x03,
- X 0x80, 0x03, 0xce, 0x01, 0x00, 0xf8, 0x00, 0x03, 0x80, 0x01, 0x86, 0x01,
- X 0x00, 0x70, 0x00, 0x03, 0x98, 0x01, 0x86, 0x01, 0x00, 0xf8, 0x00, 0x03,
- X 0x98, 0x01, 0x86, 0x01, 0x00, 0xdc, 0x01, 0x03, 0x98, 0x01, 0xfe, 0x01,
- X 0x00, 0x8e, 0x03, 0x03, 0x98, 0x3f, 0xfe, 0x00, 0x00, 0x07, 0x07, 0x03,
- X 0x98, 0x1f, 0x06, 0x00, 0x80, 0x03, 0x0e, 0x03, 0x98, 0x01, 0x06, 0x00,
- X 0xc0, 0x01, 0x1c, 0x03, 0x98, 0x01, 0x0e, 0x00, 0xe0, 0x00, 0x38, 0xff,
- X 0x98, 0x01, 0xfc, 0x01, 0x60, 0x00, 0x30, 0xff, 0x99, 0x01, 0xf8, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0xe0, 0xbd, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xbd, 0x07,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xbd, 0x07, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0xe0, 0xbd, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf7,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf7, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x80, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf7,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7b, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xc0, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7b, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xc0, 0x03, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x0f, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xc0, 0x03, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_xlife-2.0/icon.h
- if test 3319 -ne `wc -c <xlife-2.0/icon.h`; then
- echo shar: \"xlife-2.0/icon.h\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/lifeconv.c -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/lifeconv.c\"
- else
- echo shar: Extracting \"xlife-2.0/lifeconv.c\" \(5093 characters\)
- sed "s/^X//" >xlife-2.0/lifeconv.c <<'END_OF_xlife-2.0/lifeconv.c'
- X/*
- X * lifeconv.c -- image format conversion routines for Xlife
- X *
- X * By Eric S. Raymond (eric@snark.uu.net)
- X *
- X * A leading -[RAP] argument forces the conversion format. Otherwise
- X * it uses the following rules:
- X *
- X * 1) If the image won't fit in a 1000x876 screen, leave it alone (thus,
- X * very large patterns like the breeder are left in #A format).
- X *
- X * 2) Otherwise, convert it to whichever of `P' or `R' format takes up less
- X * disk space. Offsets are generated in the header so that the hot spot is
- X * at the center of the bounding rectangle.
- X *
- X * With no file arguments, lifeconv acts as a filter. If given file arguments,
- X * the files will be converted to the new format in place.
- X */
- X#include <stdio.h>
- X
- X#define MARK '*'
- X#define SPACE '.'
- X
- X/* XMAX should be divisible by 8 (bits in a char)
- X * XMAX x YMAX should be big enough to handle anything reasonable
- X */
- X#define XMAX 2000
- X#define YMAX 2000
- X
- X/* image data */
- Xstatic char image[XMAX >> 3][YMAX];
- Xstatic int xmin, ymin, xmax, ymax, numcells;
- Xstatic int xoff, yoff;
- X
- Xstatic void mark(x, y)
- X/* mark a cell and update the bounding-box data */
- Xint x, y;
- X{
- X
- X image[x >> 3][y] |= 1 << (0x07 - (x & 0x07));
- X numcells++;
- X
- X if (x < xmin)
- X xmin = x;
- X if (y < ymin)
- X ymin = y;
- X if (x > xmax)
- X xmax = x;
- X if (y > ymax)
- X ymax = y;
- X}
- X
- Xstatic int cvimage(name, ifp, mode, ofp)
- X/* read in an image in A, R or P form */
- Xchar *name;
- XFILE *ifp;
- Xchar mode;
- XFILE *ofp;
- X{
- X char buf[BUFSIZ];
- X int x, y, i, j, xcorner, ycorner;
- X char inmode = 'A';
- X
- X /* read in a complete image file in any mode */
- X bzero(image, sizeof(image));
- X numcells = 0;
- X xmin = XMAX; ymin = YMAX; xmax = 0; ymax = 0;
- X while (fgets(buf, BUFSIZ, ifp) != (char *)NULL)
- X {
- X extern char *strchr();
- X
- X if (buf[0] == '#')
- X {
- X xoff = yoff = 0;
- X
- X if (strchr("RAI", buf[1]) != (char *)NULL)
- X {
- X inmode = buf[1];
- X (void) sscanf(buf + 2, "%d %d", &xoff, &yoff);
- X }
- X else {
- X if (buf[1] == '#')
- X (void) fputs(buf, ofp);
- X }
- X
- X }
- X else if ((inmode=='A'||inmode=='R') && sscanf(buf, "%d %d", &x,&y)==2)
- X {
- X if (x >= XMAX || y >= YMAX)
- X {
- X /*
- X * If you get this message, recompile with larger
- X * XMAX and YMAX values
- X */
- X (void) fprintf(stderr,
- X "%s: point %d = (%d,%d) out of bounds\n",
- X name, numcells, x, y);
- X return(-1);
- X }
- X else if (inmode == 'R')
- X mark(XMAX/2 + xoff + x, YMAX/2 + yoff + y);
- X else
- X mark(xoff + x, yoff + y);
- X }
- X else /* inmode == 'P' */
- X {
- X char *cp;
- X
- X for (cp = buf; *cp; cp++)
- X if (*cp == MARK)
- X mark(xoff + cp - buf, yoff + y);
- X y++;
- X }
- X }
- X
- X /* if the mode is \0, we go for the shortest output form */
- X if (mode == '\0')
- X if (((ymax - ymin + 1) * (xmax - xmin + 1)) > numcells * 8)
- X mode = 'R';
- X else
- X mode = 'P';
- X
- X /* undo the hack to accept negative indices */
- X if (inmode == 'R' && mode != 'A')
- X {
- X xcorner = XMAX/2; ycorner = YMAX/2;
- X xmin -= XMAX/2; ymin -= YMAX/2;
- X xmax -= XMAX/2; ymax -= YMAX/2;
- X }
- X else
- X xcorner = ycorner = 0;
- X
- X /* here goes the write side */
- X if (mode == 'P')
- X {
- X (void) fprintf(ofp, "#P %d %d\n", -(xmax-xmin)/2, -(ymax-ymin)/2);
- X for (i = ymin; i <= ymax; i++)
- X {
- X for (j = xmin; j <= xmax; j++)
- X if (image[(j + xcorner) >> 3][i + ycorner] & (1 << (0x07 - ((j+xcorner) & 0x07))))
- X (void) fputc(MARK, ofp);
- X else
- X (void) fputc(SPACE, ofp);
- X (void) fputc('\n', ofp);
- X }
- X }
- X else if (mode == 'R')
- X {
- X int cx = xmin + (xmax-xmin)/2;
- X int cy = ymin + (ymax-ymin)/2;
- X
- X (void) fprintf(ofp, "#R\n");
- X for (i = ymin; i <= ymax; i++)
- X for (j = xmin; j <= xmax; j++)
- X if (image[(j + xcorner) >> 3][i + ycorner] & (1 << (0x07 - ((j+xcorner & 0x07)))))
- X (void) fprintf(ofp, "%3d %3d\n", j - cx, i - cy);
- X }
- X else /* if (mode == 'A') */
- X {
- X (void) fprintf(ofp, "#A\n");
- X for (i = ymin; i <= ymax; i++)
- X for (j = xmin; j <= xmax; j++)
- X if (image[(j + xcorner) >> 3][i + ycorner] & (1 << (0x07 - ((j+xcorner & 0x07)))))
- X (void) fprintf(ofp, "%3d %3d\n", xoff + j, yoff + i);
- X }
- X
- X return(mode);
- X}
- X
- Xmain(argc, argv)
- Xint argc;
- Xchar **argv;
- X{
- X char convmode = '\0';
- X
- X if (argc == 1)
- X (void) cvimage("stdin", stdin, convmode, stdout);
- X else
- X {
- X char tmpfile[BUFSIZ];
- X FILE *ifp, *ofp;
- X
- X if (argv[1][0] == '-' && strchr("RAP", argv[1][1]) != (char *)NULL)
- X {
- X convmode = argv[1][1];
- X argv++, argc--;
- X }
- X
- X (void) strcpy(tmpfile, ".lfcnvXXXXXX");
- X (void) mktemp(tmpfile);
- X while (++argv, --argc)
- X if ((ifp = fopen(argv[0], "r")) == (FILE *)NULL)
- X perror(argv[0]);
- X else if ((ofp = fopen(tmpfile, "w")) == (FILE *)NULL)
- X perror(tmpfile);
- X else
- X {
- X char oldname[BUFSIZ];
- X int status = cvimage(argv[0], ifp, convmode, ofp);
- X
- X (void) fclose(ifp);
- X (void) fclose(ofp);
- X if (status < 0)
- X continue;
- X
- X (void) fprintf(stderr, "%s: %c\n", argv[0], status);
- X
- X if (unlink(argv[0]) != 0)
- X perror(argv[0]);
- X else if (link(tmpfile, argv[0]) != 0)
- X perror(argv[0]);
- X else if (unlink(tmpfile) != 0)
- X perror(argv[0]);
- X }
- X }
- X}
- X
- END_OF_xlife-2.0/lifeconv.c
- if test 5093 -ne `wc -c <xlife-2.0/lifeconv.c`; then
- echo shar: \"xlife-2.0/lifeconv.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/patterns/background1.life -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/patterns/background1.life\"
- else
- echo shar: Extracting \"xlife-2.0/patterns/background1.life\" \(3551 characters\)
- sed "s/^X//" >xlife-2.0/patterns/background1.life <<'END_OF_xlife-2.0/patterns/background1.life'
- X#P -29 -29
- X............**.**..........**.**..........**.**............
- X...........*.*.*.*........*.*.*.*........*.*.*.*...........
- X...........**...**........**...**........**...**...........
- X...........................................................
- X...........**...**........**...**........**...**...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........**...**........**...**........**...**...........
- X...........................................................
- X.**.******..**.**..******..**.**..******..**.**..******.**.
- X*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*
- X**.........**...**........**...**........**...**.........**
- X...........................................................
- X**.........**...**........**...**........**...**.........**
- X*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*
- X.**.******..**.**..******..**.**..******..**.**..******.**.
- X...........................................................
- X...........**...**........**...**........**...**...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........**...**........**...**........**...**...........
- X...........................................................
- X.**.******..**.**..******..**.**..******..**.**..******.**.
- X*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*
- X**.........**...**........**...**........**...**.........**
- X...........................................................
- X**.........**...**........**...**........**...**.........**
- X*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*
- X.**.******..**.**..******..**.**..******..**.**..******.**.
- X...........................................................
- X...........**...**........**...**........**...**...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........**...**........**...**........**...**...........
- X...........................................................
- X.**.******..**.**..******..**.**..******..**.**..******.**.
- X*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*
- X**.........**...**........**...**........**...**.........**
- X...........................................................
- X**.........**...**........**...**........**...**.........**
- X*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*.*.*.*....*.*.*
- X.**.******..**.**..******..**.**..******..**.**..******.**.
- X...........................................................
- X...........**...**........**...**........**...**...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........*.....*........*.....*........*.....*...........
- X...........**...**........**...**........**...**...........
- X...........................................................
- X...........**...**........**...**........**...**...........
- X...........*.*.*.*........*.*.*.*........*.*.*.*...........
- X............**.**..........**.**..........**.**............
- END_OF_xlife-2.0/patterns/background1.life
- if test 3551 -ne `wc -c <xlife-2.0/patterns/background1.life`; then
- echo shar: \"xlife-2.0/patterns/background1.life\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/patterns/billiards.life -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/patterns/billiards.life\"
- else
- echo shar: Extracting \"xlife-2.0/patterns/billiards.life\" \(7074 characters\)
- sed "s/^X//" >xlife-2.0/patterns/billiards.life <<'END_OF_xlife-2.0/patterns/billiards.life'
- X#A
- X58 178
- X62 178
- X57 179
- X59 179
- X60 179
- X62 179
- X57 180
- X61 180
- X56 181
- X57 181
- X61 181
- X63 181
- X62 182
- X63 182
- X55 175
- X55 176
- X57 174
- X58 174
- X60 174
- X61 174
- X58 175
- X60 175
- X62 175
- X56 176
- X60 176
- X62 176
- X60 177
- X62 177
- X63 177
- X57 146
- X59 146
- X60 146
- X57 147
- X59 147
- X60 147
- X57 148
- X59 149
- X60 149
- X57 150
- X58 150
- X60 150
- X56 151
- X56 152
- X55 146
- X52 148
- X53 148
- X52 149
- X55 149
- X53 150
- X54 150
- X55 150
- X53 152
- X54 152
- X53 153
- X55 153
- X56 145
- X55 145
- X80 183
- X80 184
- X79 183
- X79 184
- X80 186
- X81 186
- X82 186
- X86 186
- X87 186
- X83 187
- X85 187
- X87 187
- X83 188
- X85 188
- X83 189
- X85 189
- X86 189
- X80 190
- X81 190
- X82 190
- X80 192
- X80 193
- X74 186
- X75 186
- X79 186
- X74 187
- X76 187
- X78 187
- X76 188
- X78 188
- X79 188
- X75 189
- X76 189
- X78 189
- X79 190
- X79 192
- X79 193
- X78 162
- X79 162
- X76 151
- X77 151
- X76 152
- X77 152
- X80 155
- X80 156
- X80 157
- X82 157
- X83 157
- X80 158
- X82 158
- X83 158
- X76 154
- X77 154
- X78 154
- X79 154
- X72 155
- X73 155
- X75 155
- X78 155
- X72 156
- X73 156
- X75 156
- X77 156
- X75 157
- X79 157
- X75 158
- X76 159
- X77 159
- X78 159
- X79 159
- X78 161
- X79 161
- X69 130
- X71 130
- X68 131
- X69 131
- X71 131
- X69 132
- X69 133
- X70 134
- X71 134
- X73 128
- X74 128
- X78 128
- X79 128
- X75 129
- X77 129
- X81 130
- X83 130
- X81 131
- X83 131
- X84 131
- X80 132
- X83 132
- X83 133
- X80 134
- X81 134
- X82 134
- X80 135
- X75 130
- X77 130
- X75 131
- X77 131
- X72 132
- X73 132
- X74 132
- X78 132
- X79 132
- X72 134
- X72 135
- X81 124
- X82 124
- X81 125
- X83 125
- X83 126
- X82 127
- X83 127
- X85 127
- X86 127
- X83 128
- X85 128
- X86 128
- X81 129
- X83 129
- X70 124
- X71 124
- X69 125
- X71 125
- X69 126
- X66 127
- X67 127
- X69 127
- X70 127
- X66 128
- X67 128
- X69 128
- X69 129
- X71 129
- X127 124
- X127 125
- X126 126
- X127 126
- X131 122
- X128 123
- X131 123
- X129 124
- X130 124
- X129 119
- X130 119
- X129 120
- X131 120
- X133 120
- X134 120
- X131 121
- X133 121
- X134 121
- X150 122
- X150 123
- X147 124
- X148 124
- X150 124
- X151 124
- X147 125
- X149 125
- X150 126
- X151 126
- X151 121
- X152 120
- X153 121
- X152 122
- X154 122
- X156 122
- X157 122
- X154 123
- X156 123
- X157 123
- X154 124
- X154 125
- X152 126
- X153 126
- X152 128
- X153 128
- X152 129
- X153 129
- X119 142
- X119 143
- X121 146
- X122 146
- X124 146
- X122 147
- X125 147
- X126 147
- X127 147
- X122 148
- X123 149
- X124 149
- X125 149
- X125 150
- X128 146
- X130 146
- X131 146
- X130 147
- X130 148
- X132 148
- X131 149
- X132 149
- X123 139
- X124 139
- X122 140
- X124 140
- X122 141
- X120 142
- X122 142
- X123 142
- X120 143
- X122 143
- X126 143
- X122 144
- X124 144
- X122 145
- X124 145
- X128 139
- X129 139
- X128 140
- X130 140
- X130 141
- X129 142
- X130 142
- X132 142
- X133 142
- X130 143
- X132 143
- X133 143
- X128 144
- X130 144
- X128 145
- X130 145
- X151 145
- X154 141
- X155 141
- X154 142
- X155 143
- X154 144
- X155 144
- X152 145
- X156 145
- X157 145
- X153 146
- X154 146
- X155 146
- X158 146
- X156 147
- X157 147
- X155 148
- X155 149
- X153 150
- X154 150
- X152 151
- X152 152
- X150 146
- X150 147
- X151 148
- X146 149
- X147 149
- X149 149
- X151 149
- X146 150
- X148 150
- X149 150
- X151 150
- X150 151
- X150 152
- X151 153
- X130 160
- X131 160
- X129 161
- X131 161
- X124 170
- X126 170
- X124 171
- X127 171
- X123 172
- X124 172
- X123 162
- X124 162
- X124 163
- X127 163
- X124 164
- X126 164
- X121 165
- X122 165
- X124 165
- X126 165
- X121 166
- X122 166
- X124 166
- X126 166
- X124 167
- X121 168
- X122 168
- X124 168
- X121 169
- X122 169
- X124 169
- X127 169
- X128 170
- X130 170
- X128 171
- X130 171
- X129 172
- X129 173
- X131 173
- X130 174
- X131 174
- X129 162
- X128 163
- X130 163
- X130 164
- X128 165
- X130 165
- X132 165
- X133 165
- X128 166
- X130 166
- X132 166
- X133 166
- X130 167
- X129 168
- X130 168
- X132 168
- X133 168
- X130 169
- X132 169
- X133 169
- X160 170
- X156 165
- X157 165
- X156 166
- X158 166
- X157 167
- X160 164
- X161 164
- X160 165
- X160 166
- X160 167
- X162 167
- X163 167
- X160 168
- X162 168
- X163 168
- X160 169
- X152 170
- X158 170
- X153 171
- X158 171
- X159 171
- X152 172
- X156 172
- X157 172
- X157 173
- X152 174
- X153 174
- X154 174
- X155 174
- X156 174
- X153 176
- X154 176
- X153 177
- X154 177
- X151 170
- X151 171
- X150 174
- X151 174
- X150 175
- X174 118
- X175 118
- X173 119
- X174 120
- X175 120
- X175 130
- X170 122
- X174 122
- X175 122
- X169 123
- X171 123
- X173 123
- X169 124
- X171 124
- X173 124
- X168 125
- X169 125
- X171 125
- X173 125
- X174 125
- X171 126
- X171 127
- X173 127
- X174 127
- X175 127
- X172 128
- X173 129
- X174 129
- X175 129
- X176 122
- X178 122
- X180 122
- X176 123
- X178 123
- X180 123
- X178 124
- X180 124
- X181 124
- X178 125
- X178 126
- X176 127
- X177 127
- X176 117
- X176 118
- X176 120
- X177 120
- X178 120
- X179 121
- X184 147
- X175 151
- X178 146
- X179 146
- X181 146
- X183 146
- X176 147
- X177 147
- X181 147
- X183 147
- X176 148
- X177 148
- X181 148
- X181 149
- X176 150
- X177 150
- X178 150
- X179 150
- X180 150
- X176 152
- X177 152
- X178 152
- X178 153
- X182 144
- X178 145
- X179 145
- X181 145
- X183 145
- X184 167
- X184 168
- X183 167
- X183 168
- X184 179
- X184 180
- X183 179
- X183 180
- X181 170
- X182 170
- X183 170
- X180 171
- X180 172
- X177 173
- X178 173
- X180 173
- X177 174
- X178 174
- X180 174
- X182 174
- X183 174
- X180 175
- X182 175
- X183 175
- X180 176
- X181 177
- X182 177
- X183 177
- X184 170
- X185 170
- X186 170
- X187 171
- X184 172
- X185 172
- X187 172
- X184 173
- X185 173
- X187 173
- X189 173
- X190 173
- X187 174
- X189 174
- X190 174
- X187 175
- X187 176
- X184 177
- X185 177
- X186 177
- X175 190
- X175 191
- X173 193
- X174 193
- X175 193
- X178 190
- X181 190
- X176 191
- X177 191
- X178 191
- X179 191
- X180 191
- X181 191
- X176 193
- X177 193
- X178 193
- X179 193
- X180 193
- X181 193
- X182 193
- X183 193
- X172 194
- X172 195
- X169 196
- X170 196
- X172 196
- X170 197
- X172 197
- X174 197
- X175 197
- X170 198
- X172 198
- X174 198
- X175 198
- X169 199
- X170 199
- X172 199
- X170 200
- X172 200
- X174 200
- X175 200
- X170 201
- X172 201
- X174 201
- X175 201
- X176 195
- X177 195
- X179 195
- X180 195
- X176 196
- X177 196
- X179 196
- X180 196
- X181 197
- X182 197
- X181 198
- X182 198
- X181 200
- X182 200
- X181 201
- X182 201
- X184 202
- X186 202
- X187 202
- X184 203
- X184 204
- X184 194
- X184 195
- X184 196
- X186 196
- X187 196
- X184 197
- X186 197
- X184 198
- X186 198
- X184 199
- X186 199
- X187 199
- X184 200
- X186 200
- X184 201
- X186 201
- X169 202
- X170 202
- X172 202
- X172 203
- X172 204
- X173 205
- X174 205
- X175 205
- X175 207
- X175 208
- X176 202
- X177 202
- X179 202
- X180 202
- X176 203
- X177 203
- X179 203
- X180 203
- X176 205
- X177 205
- X178 205
- X179 205
- X180 205
- X181 205
- X182 205
- X183 205
- X176 207
- X177 207
- X178 207
- X179 207
- X180 207
- X181 207
- X178 208
- X181 208
- X150 203
- X150 204
- X151 204
- X156 202
- X157 202
- X152 203
- X153 203
- X155 203
- X153 204
- X155 204
- X154 205
- X153 198
- X154 198
- X152 199
- X155 199
- X154 200
- X156 200
- X152 201
- X154 201
- X156 201
- X144 194
- X151 200
- X151 201
- X138 194
- X140 194
- X137 195
- X138 195
- X140 195
- X142 195
- X143 195
- X139 196
- X141 196
- X139 197
- X141 197
- X140 198
- X144 193
- X140 190
- X140 191
- X141 191
- X142 191
- X138 192
- X139 192
- X143 192
- X137 193
- X140 193
- X142 193
- X128 202
- X128 203
- X129 203
- X130 204
- X128 205
- X129 205
- X123 202
- X126 202
- X124 203
- X125 204
- X126 204
- X127 205
- X127 206
- X128 201
- X120 199
- X122 199
- X123 199
- X120 200
- X121 200
- X123 200
- X126 200
- X127 200
- X123 201
- X125 201
- X112 194
- X112 189
- X112 190
- X112 191
- X113 191
- X114 192
- X113 193
- X106 186
- X107 186
- X106 187
- X109 187
- X110 187
- X107 188
- X108 188
- X111 188
- X110 189
- X107 190
- X108 190
- X106 191
- X109 191
- X110 191
- X106 192
- X107 192
- X111 192
- X111 193
- X107 168
- X108 168
- X107 169
- X109 169
- X101 172
- X102 172
- X101 173
- X102 173
- X104 170
- X105 170
- X107 170
- X109 170
- X104 171
- X107 171
- X109 171
- X110 171
- X104 172
- X109 172
- X104 173
- X105 173
- X106 173
- X107 173
- X109 173
- X108 174
- X106 175
- X106 176
- X107 176
- X102 146
- X102 147
- X99 148
- X100 148
- X102 148
- X99 149
- X101 149
- X103 149
- X101 150
- X103 150
- X101 151
- X102 152
- X103 153
- X101 145
- X102 145
- X105 146
- X106 146
- X104 147
- X107 147
- X105 148
- X107 148
- X107 149
- X108 149
- X105 150
- X106 150
- X109 150
- X104 151
- X108 151
- X109 151
- X104 152
- X112 130
- X115 130
- X112 131
- X114 131
- X113 132
- X112 126
- X113 127
- X113 128
- X113 129
- X114 129
- X108 123
- X107 124
- X109 124
- X106 125
- X109 125
- X110 125
- X111 125
- X107 126
- X108 126
- X109 127
- X111 127
- X109 128
- X110 129
- X111 129
- X110 208
- X111 208
- X106 209
- X107 209
- X110 209
- X105 210
- X108 210
- X110 210
- X104 211
- X106 211
- X108 211
- X110 211
- X111 211
- X105 212
- X110 212
- X106 213
- X107 213
- X108 213
- X110 213
- X109 214
- X108 215
- X108 216
- X109 216
- X89 218
- X89 219
- X88 220
- X86 218
- X87 219
- X86 212
- X87 212
- X86 213
- X87 214
- X87 216
- X86 217
- X89 213
- X90 213
- X88 214
- X91 214
- X90 215
- X92 215
- X88 216
- X92 216
- X88 217
- X90 217
- X91 217
- X72 210
- X72 211
- X69 207
- X70 207
- X68 208
- X71 208
- X66 209
- X69 209
- X71 209
- X66 210
- X67 210
- X69 210
- X71 210
- X66 212
- X67 212
- X69 212
- X70 212
- X67 213
- X69 213
- X67 214
- X69 214
- X68 215
- END_OF_xlife-2.0/patterns/billiards.life
- if test 7074 -ne `wc -c <xlife-2.0/patterns/billiards.life`; then
- echo shar: \"xlife-2.0/patterns/billiards.life\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/patterns/blockpusher4.life -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/patterns/blockpusher4.life\"
- else
- echo shar: Extracting \"xlife-2.0/patterns/blockpusher4.life\" \(6867 characters\)
- sed "s/^X//" >xlife-2.0/patterns/blockpusher4.life <<'END_OF_xlife-2.0/patterns/blockpusher4.life'
- X#R
- X-31 -78
- X-31 -77
- X-30 -77
- X-30 -76
- X-29 -76
- X-15 -76
- X-14 -76
- X-40 -75
- X-39 -75
- X-30 -75
- X-29 -75
- X-28 -75
- X-16 -75
- X-15 -75
- X-14 -75
- X-40 -74
- X-39 -74
- X-30 -74
- X-29 -74
- X-19 -74
- X-17 -74
- X-16 -74
- X 10 -74
- X 11 -74
- X-59 -73
- X-58 -73
- X-31 -73
- X-30 -73
- X-19 -73
- X-16 -73
- X -6 -73
- X -5 -73
- X 10 -73
- X 11 -73
- X-59 -72
- X-58 -72
- X-31 -72
- X-19 -72
- X-17 -72
- X-16 -72
- X -6 -72
- X -5 -72
- X-27 -71
- X-16 -71
- X-15 -71
- X-14 -71
- X-27 -70
- X-25 -70
- X-15 -70
- X-14 -70
- X-27 -69
- X-26 -69
- X -9 -68
- X -8 -68
- X -9 -67
- X -8 -67
- X -7 -67
- X-23 -66
- X -7 -66
- X -6 -66
- X -4 -66
- X-25 -65
- X-23 -65
- X -7 -65
- X -4 -65
- X 2 -65
- X 3 -65
- X 7 -65
- X 8 -65
- X 12 -65
- X 13 -65
- X-61 -64
- X-60 -64
- X-56 -64
- X-55 -64
- X-34 -64
- X-26 -64
- X-24 -64
- X-13 -64
- X -7 -64
- X -6 -64
- X -4 -64
- X 2 -64
- X 3 -64
- X 10 -64
- X-61 -63
- X-59 -63
- X-57 -63
- X-55 -63
- X-35 -63
- X-27 -63
- X-24 -63
- X-12 -63
- X -9 -63
- X -8 -63
- X -7 -63
- X 7 -63
- X 13 -63
- X-60 -62
- X-59 -62
- X-58 -62
- X-57 -62
- X-56 -62
- X-35 -62
- X-34 -62
- X-33 -62
- X-26 -62
- X-24 -62
- X-14 -62
- X-13 -62
- X-12 -62
- X -9 -62
- X -8 -62
- X 8 -62
- X 9 -62
- X 11 -62
- X 12 -62
- X-59 -61
- X-58 -61
- X-57 -61
- X-30 -61
- X-29 -61
- X-25 -61
- X-23 -61
- X 9 -61
- X 11 -61
- X-58 -60
- X-31 -60
- X-29 -60
- X-23 -60
- X -1 -60
- X 0 -60
- X 10 -60
- X-70 -59
- X-69 -59
- X-48 -59
- X-47 -59
- X-31 -59
- X -1 -59
- X 0 -59
- X 10 -59
- X-70 -58
- X-69 -58
- X-48 -58
- X-47 -58
- X-32 -58
- X-31 -58
- X-42 -56
- X -5 -56
- X-42 -55
- X-40 -55
- X -7 -55
- X -5 -55
- X-42 -54
- X-41 -54
- X -6 -54
- X -5 -54
- X-70 -53
- X-69 -53
- X-68 -53
- X-57 -53
- X-55 -53
- X-10 -53
- X -9 -53
- X 6 -53
- X 8 -53
- X-70 -52
- X-69 -52
- X-68 -52
- X-56 -52
- X-55 -52
- X-39 -52
- X-38 -52
- X-11 -52
- X -9 -52
- X 6 -52
- X 7 -52
- X-71 -51
- X-67 -51
- X-56 -51
- X-39 -51
- X-37 -51
- X-11 -51
- X 7 -51
- X 11 -51
- X 12 -51
- X 13 -51
- X-37 -50
- X-12 -50
- X-11 -50
- X 10 -50
- X 14 -50
- X-72 -49
- X-71 -49
- X-67 -49
- X-66 -49
- X-37 -49
- X-36 -49
- X 9 -49
- X 15 -49
- X-61 -48
- X-60 -48
- X-59 -48
- X 9 -48
- X 10 -48
- X 12 -48
- X 14 -48
- X 15 -48
- X-62 -47
- X-58 -47
- X-32 -47
- X-31 -47
- X-63 -46
- X-57 -46
- X-49 -46
- X-31 -46
- X 0 -46
- X-62 -45
- X-58 -45
- X-48 -45
- X-47 -45
- X-31 -45
- X-29 -45
- X-21 -45
- X -2 -45
- X -1 -45
- X-61 -44
- X-60 -44
- X-59 -44
- X-49 -44
- X-48 -44
- X-30 -44
- X-29 -44
- X-21 -44
- X-20 -44
- X-19 -44
- X-18 -44
- X -1 -44
- X 0 -44
- X-61 -43
- X-60 -43
- X-59 -43
- X-20 -43
- X-19 -43
- X-18 -43
- X-17 -43
- X-11 -43
- X-10 -43
- X-20 -42
- X-17 -42
- X-11 -42
- X-10 -42
- X-70 -41
- X-68 -41
- X-20 -41
- X-19 -41
- X-18 -41
- X-17 -41
- X-69 -40
- X-68 -40
- X-21 -40
- X-20 -40
- X-19 -40
- X-18 -40
- X 11 -40
- X 12 -40
- X-69 -39
- X-60 -39
- X-59 -39
- X-21 -39
- X 11 -39
- X 12 -39
- X 40 -39
- X 41 -39
- X-60 -38
- X-59 -38
- X 40 -38
- X 41 -38
- X 11 -37
- X 12 -37
- X 32 -37
- X 33 -37
- X-74 -36
- X-73 -36
- X-69 -36
- X-68 -36
- X 12 -36
- X 32 -36
- X-74 -35
- X-73 -35
- X-69 -35
- X-68 -35
- X 12 -35
- X 14 -35
- X 22 -35
- X 23 -35
- X 30 -35
- X 32 -35
- X-62 -34
- X-51 -34
- X 13 -34
- X 14 -34
- X 21 -34
- X 23 -34
- X 30 -34
- X 31 -34
- X-72 -33
- X-71 -33
- X-70 -33
- X-61 -33
- X-60 -33
- X-53 -33
- X-52 -33
- X-51 -33
- X 20 -33
- X 21 -33
- X 22 -33
- X-72 -32
- X-71 -32
- X-70 -32
- X-62 -32
- X-61 -32
- X-54 -32
- X -8 -32
- X -7 -32
- X 19 -32
- X 20 -32
- X 21 -32
- X 39 -32
- X 40 -32
- X 41 -32
- X-71 -31
- X-54 -31
- X-53 -31
- X -7 -31
- X 20 -31
- X 21 -31
- X 22 -31
- X -7 -30
- X -5 -30
- X 4 -30
- X 5 -30
- X 21 -30
- X 23 -30
- X 39 -30
- X 41 -30
- X -6 -29
- X -5 -29
- X 2 -29
- X 5 -29
- X 22 -29
- X 23 -29
- X 38 -29
- X 39 -29
- X 40 -29
- X 41 -29
- X 42 -29
- X 1 -28
- X 37 -28
- X 38 -28
- X 42 -28
- X 43 -28
- X 1 -27
- X 13 -27
- X 14 -27
- X 37 -27
- X 38 -27
- X 42 -27
- X 43 -27
- X-55 -26
- X-53 -26
- X-44 -26
- X-43 -26
- X 1 -26
- X 13 -26
- X 14 -26
- X-71 -25
- X-70 -25
- X-54 -25
- X-53 -25
- X-45 -25
- X-43 -25
- X 2 -25
- X 5 -25
- X-71 -24
- X-70 -24
- X-54 -24
- X-43 -24
- X 4 -24
- X 5 -24
- X-61 -23
- X-60 -23
- X 10 -23
- X-61 -22
- X-60 -22
- X-40 -22
- X 8 -22
- X 9 -22
- X 10 -22
- X-66 -21
- X-65 -21
- X-40 -21
- X-39 -21
- X-38 -21
- X 7 -21
- X-66 -20
- X-65 -20
- X-37 -20
- X 7 -20
- X 8 -20
- X 42 -20
- X 43 -20
- X-38 -19
- X-37 -19
- X-25 -19
- X-24 -19
- X 42 -19
- X-52 -18
- X-51 -18
- X-50 -18
- X-25 -18
- X-24 -18
- X 43 -18
- X 44 -18
- X 45 -18
- X-50 -17
- X 45 -17
- X-51 -16
- X 57 -16
- X 58 -16
- X 57 -15
- X 46 -14
- X 48 -14
- X 55 -14
- X 57 -14
- X 69 -14
- X 70 -14
- X 45 -13
- X 48 -13
- X 55 -13
- X 56 -13
- X 69 -13
- X 70 -13
- X 36 -12
- X 37 -12
- X 44 -12
- X 45 -12
- X-59 -11
- X-58 -11
- X-38 -11
- X-37 -11
- X-33 -11
- X-32 -11
- X 36 -11
- X 37 -11
- X 42 -11
- X 43 -11
- X 47 -11
- X-60 -10
- X-58 -10
- X 44 -10
- X 45 -10
- X-69 -9
- X-68 -9
- X-64 -9
- X-63 -9
- X-58 -9
- X-38 -9
- X-32 -9
- X 45 -9
- X 48 -9
- X-67 -8
- X-66 -8
- X-65 -8
- X 46 -8
- X 48 -8
- X-68 -7
- X-64 -7
- X-37 -7
- X-36 -7
- X-34 -7
- X-33 -7
- X-67 -6
- X-65 -6
- X-35 -6
- X-66 -5
- X-65 -3
- X-64 -3
- X-63 -3
- X 46 -3
- X-65 -2
- X-64 -2
- X-63 -2
- X 45 -2
- X 66 -2
- X 67 -2
- X 71 -2
- X 72 -2
- X-36 -1
- X-35 -1
- X 45 -1
- X 46 -1
- X 47 -1
- X 68 -1
- X 69 -1
- X 70 -1
- X-36 0
- X-35 0
- X -8 0
- X 67 0
- X 71 0
- X-10 1
- X -8 1
- X 68 1
- X 70 1
- X-67 2
- X-66 2
- X-62 2
- X-61 2
- X-11 2
- X -9 2
- X 69 2
- X-66 3
- X-65 3
- X-64 3
- X-63 3
- X-62 3
- X-12 3
- X -9 3
- X-65 4
- X-64 4
- X-63 4
- X-11 4
- X -9 4
- X-64 5
- X-16 5
- X-15 5
- X-10 5
- X -8 5
- X 1 5
- X 2 5
- X 71 5
- X 72 5
- X-54 6
- X-53 6
- X-17 6
- X-15 6
- X -8 6
- X 1 6
- X 3 6
- X 71 6
- X-54 7
- X-53 7
- X-17 7
- X 3 7
- X 72 7
- X 73 7
- X 74 7
- X-18 8
- X-17 8
- X 3 8
- X 4 8
- X 74 8
- X-65 13
- X-64 13
- X-65 14
- X-64 14
- X-27 14
- X-26 14
- X 56 14
- X 57 14
- X-27 15
- X-26 15
- X 55 15
- X 57 15
- X-17 16
- X-16 16
- X 57 16
- X-57 17
- X-56 17
- X-52 17
- X-51 17
- X-31 17
- X-30 17
- X-17 17
- X-16 17
- X-31 18
- X-56 19
- X-52 19
- X-33 19
- X-31 19
- X-55 20
- X-54 20
- X-53 20
- X-33 20
- X-32 20
- X-55 21
- X-54 21
- X-53 21
- X-29 23
- X-28 23
- X-24 23
- X-23 23
- X-52 24
- X-28 24
- X-27 24
- X-26 24
- X-25 24
- X-24 24
- X-18 24
- X-17 24
- X-16 24
- X -8 24
- X -7 24
- X-53 25
- X-52 25
- X-51 25
- X-27 25
- X-26 25
- X-25 25
- X-19 25
- X-15 25
- X -9 25
- X -7 25
- X-54 26
- X-50 26
- X-42 26
- X-41 26
- X-26 26
- X -7 26
- X-52 27
- X-42 27
- X-41 27
- X-20 27
- X-14 27
- X 16 27
- X-55 28
- X-49 28
- X-20 28
- X-19 28
- X-15 28
- X-14 28
- X 15 28
- X-55 29
- X-49 29
- X 15 29
- X 16 29
- X 17 29
- X-54 30
- X-50 30
- X-53 31
- X-52 31
- X-51 31
- X-29 35
- X-28 35
- X-27 35
- X-29 37
- X-27 37
- X-30 38
- X-29 38
- X-28 38
- X-27 38
- X-26 38
- X-31 39
- X-30 39
- X-26 39
- X-25 39
- X-52 40
- X-51 40
- X-31 40
- X-30 40
- X-26 40
- X-25 40
- X-18 40
- X-17 40
- X-13 40
- X-12 40
- X 0 40
- X 47 40
- X 48 40
- X-52 41
- X-51 41
- X -1 41
- X 0 41
- X 22 41
- X 23 41
- X 47 41
- X 48 41
- X-18 42
- X-12 42
- X -1 42
- X 1 42
- X 22 42
- X 10 43
- X 20 43
- X 22 43
- X-17 44
- X-16 44
- X-14 44
- X-13 44
- X 9 44
- X 11 44
- X 20 44
- X 21 44
- X 26 44
- X 27 44
- X-15 45
- X -2 45
- X 7 45
- X 8 45
- X 12 45
- X 25 45
- X 27 45
- X -2 46
- X -1 46
- X 0 46
- X 1 46
- X 7 46
- X 8 46
- X 12 46
- X 27 46
- X -1 47
- X 0 47
- X 1 47
- X 2 47
- X 7 47
- X 8 47
- X 12 47
- X-29 48
- X-28 48
- X-18 48
- X-17 48
- X-12 48
- X-11 48
- X -1 48
- X 2 48
- X 9 48
- X 11 48
- X-29 49
- X-28 49
- X-17 49
- X-12 49
- X-11 49
- X -1 49
- X 0 49
- X 1 49
- X 2 49
- X 10 49
- X-20 50
- X-19 50
- X-18 50
- X -2 50
- X -1 50
- X 0 50
- X 1 50
- X-20 51
- X -2 51
- X 13 54
- X 14 54
- X 15 54
- X 11 56
- X 17 56
- X 11 57
- X 17 57
- X 11 58
- X 17 58
- X 27 60
- X 28 60
- X 27 61
- X 19 62
- X 20 62
- X 25 62
- X 27 62
- X 18 63
- X 19 63
- X 25 63
- X 26 63
- X 20 64
- X 3 67
- X 4 67
- X 5 67
- X 5 68
- X 4 69
- X 16 69
- X 17 69
- X 27 69
- X -8 70
- X 16 70
- X 17 70
- X 26 70
- X 27 70
- X -9 71
- X -8 71
- X 26 71
- X 28 71
- X 37 71
- X 39 71
- X-10 72
- X -9 72
- X -4 72
- X -3 72
- X 3 72
- X 35 72
- X 39 72
- X-20 73
- X-19 73
- X-11 73
- X-10 73
- X -9 73
- X -4 73
- X -3 73
- X 1 73
- X 3 73
- X 23 73
- X 24 73
- X 35 73
- X-20 74
- X-19 74
- X-10 74
- X -9 74
- X -4 74
- X -3 74
- X 0 74
- X 2 74
- X 23 74
- X 26 74
- X 34 74
- X 39 74
- X 48 74
- X 49 74
- X -9 75
- X -8 75
- X -1 75
- X 2 75
- X 14 75
- X 15 75
- X 27 75
- X 35 75
- X 48 75
- X 49 75
- X -8 76
- X 0 76
- X 2 76
- X 14 76
- X 15 76
- X 27 76
- X 35 76
- X 39 76
- X 1 77
- X 3 77
- X 27 77
- X 37 77
- X 39 77
- X 3 78
- X 23 78
- X 26 78
- X 23 79
- X 24 79
- END_OF_xlife-2.0/patterns/blockpusher4.life
- if test 6867 -ne `wc -c <xlife-2.0/patterns/blockpusher4.life`; then
- echo shar: \"xlife-2.0/patterns/blockpusher4.life\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/patterns/counter.life -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/patterns/counter.life\"
- else
- echo shar: Extracting \"xlife-2.0/patterns/counter.life\" \(6651 characters\)
- sed "s/^X//" >xlife-2.0/patterns/counter.life <<'END_OF_xlife-2.0/patterns/counter.life'
- X#R
- X 23 -77
- X 24 -77
- X 25 -76
- X-19 -75
- X-18 -75
- X-17 -75
- X -8 -75
- X -7 -75
- X 10 -75
- X 11 -75
- X 22 -75
- X 23 -75
- X 26 -75
- X-21 -74
- X-17 -74
- X -8 -74
- X -7 -74
- X 10 -74
- X 11 -74
- X 23 -74
- X 26 -74
- X 45 -74
- X-22 -73
- X-17 -73
- X 24 -73
- X 26 -73
- X 44 -73
- X 45 -73
- X-55 -72
- X-54 -72
- X-44 -72
- X-43 -72
- X-22 -72
- X-18 -72
- X 24 -72
- X 25 -72
- X 43 -72
- X 44 -72
- X 45 -72
- X 47 -72
- X 57 -72
- X 58 -72
- X-55 -71
- X-54 -71
- X-45 -71
- X-44 -71
- X 42 -71
- X 43 -71
- X 57 -71
- X 58 -71
- X-44 -70
- X-43 -70
- X-42 -70
- X-41 -70
- X-40 -70
- X-22 -70
- X-18 -70
- X 13 -70
- X 14 -70
- X 24 -70
- X 25 -70
- X 43 -70
- X 44 -70
- X-43 -69
- X-42 -69
- X-41 -69
- X-40 -69
- X-22 -69
- X-17 -69
- X 11 -69
- X 15 -69
- X 16 -69
- X 24 -69
- X 26 -69
- X 44 -69
- X-21 -68
- X-17 -68
- X -8 -68
- X -7 -68
- X 11 -68
- X 16 -68
- X 23 -68
- X 26 -68
- X-43 -67
- X-42 -67
- X-41 -67
- X-40 -67
- X-27 -67
- X-19 -67
- X-18 -67
- X-17 -67
- X -8 -67
- X -7 -67
- X 11 -67
- X 15 -67
- X 16 -67
- X 22 -67
- X 23 -67
- X 26 -67
- X 44 -67
- X 55 -67
- X-44 -66
- X-43 -66
- X-42 -66
- X-41 -66
- X-40 -66
- X-29 -66
- X-27 -66
- X 13 -66
- X 14 -66
- X 25 -66
- X 43 -66
- X 44 -66
- X 53 -66
- X 54 -66
- X 56 -66
- X-45 -65
- X-44 -65
- X-28 -65
- X-27 -65
- X 23 -65
- X 24 -65
- X 42 -65
- X 43 -65
- X 52 -65
- X 53 -65
- X 55 -65
- X 56 -65
- X 57 -65
- X-44 -64
- X-43 -64
- X 43 -64
- X 44 -64
- X 45 -64
- X 47 -64
- X 53 -64
- X 56 -64
- X 44 -63
- X 45 -63
- X 54 -63
- X 55 -63
- X 25 -62
- X 27 -62
- X 45 -62
- X 25 -61
- X 26 -61
- X 26 -60
- X-16 -56
- X-15 -55
- X-17 -54
- X-16 -54
- X-15 -54
- X 15 -51
- X 13 -50
- X 14 -50
- X 14 -49
- X 15 -49
- X -4 -44
- X -6 -43
- X -4 -43
- X -5 -42
- X -4 -42
- X-28 -41
- X-27 -41
- X-24 -41
- X-22 -41
- X 19 -41
- X 20 -41
- X 21 -41
- X 22 -41
- X-29 -40
- X-28 -40
- X-27 -40
- X-25 -40
- X-21 -40
- X -8 -40
- X -7 -40
- X 10 -40
- X 11 -40
- X 18 -40
- X 19 -40
- X 22 -40
- X-30 -39
- X-29 -39
- X-22 -39
- X -8 -39
- X -7 -39
- X 2 -39
- X 4 -39
- X 10 -39
- X 11 -39
- X 17 -39
- X 18 -39
- X 21 -39
- X-40 -38
- X-39 -38
- X-35 -38
- X-29 -38
- X-27 -38
- X-26 -38
- X-25 -38
- X-24 -38
- X-23 -38
- X 2 -38
- X 3 -38
- X 18 -38
- X 21 -38
- X 47 -38
- X 48 -38
- X-55 -37
- X-54 -37
- X-40 -37
- X-39 -37
- X-38 -37
- X-36 -37
- X-34 -37
- X-33 -37
- X-28 -37
- X-27 -37
- X-26 -37
- X 3 -37
- X 19 -37
- X 20 -37
- X 46 -37
- X 47 -37
- X 49 -37
- X 50 -37
- X 57 -37
- X 58 -37
- X-55 -36
- X-54 -36
- X-40 -36
- X-39 -36
- X-38 -36
- X-33 -36
- X 47 -36
- X 50 -36
- X 57 -36
- X 58 -36
- X-37 -35
- X-33 -35
- X-28 -35
- X-27 -35
- X-26 -35
- X 19 -35
- X 20 -35
- X 47 -35
- X 50 -35
- X-36 -34
- X-35 -34
- X-34 -34
- X-29 -34
- X-27 -34
- X-26 -34
- X-25 -34
- X-24 -34
- X-23 -34
- X 18 -34
- X 21 -34
- X 48 -34
- X 49 -34
- X-54 -33
- X-53 -33
- X-49 -33
- X-48 -33
- X-30 -33
- X-29 -33
- X-22 -33
- X -8 -33
- X -7 -33
- X 17 -33
- X 18 -33
- X 21 -33
- X-55 -32
- X-54 -32
- X-53 -32
- X-49 -32
- X-48 -32
- X-47 -32
- X-36 -32
- X-35 -32
- X-34 -32
- X-29 -32
- X-28 -32
- X-27 -32
- X-25 -32
- X-21 -32
- X -8 -32
- X -7 -32
- X 18 -32
- X 19 -32
- X 22 -32
- X 48 -32
- X 49 -32
- X-57 -31
- X-56 -31
- X-55 -31
- X-47 -31
- X-46 -31
- X-45 -31
- X-37 -31
- X-33 -31
- X-28 -31
- X-27 -31
- X-24 -31
- X-22 -31
- X 19 -31
- X 20 -31
- X 21 -31
- X 22 -31
- X 30 -31
- X 47 -31
- X 50 -31
- X-57 -30
- X-56 -30
- X-55 -30
- X-47 -30
- X-46 -30
- X-45 -30
- X-40 -30
- X-39 -30
- X-38 -30
- X-33 -30
- X -4 -30
- X -3 -30
- X 28 -30
- X 29 -30
- X 47 -30
- X 50 -30
- X-57 -29
- X-56 -29
- X-55 -29
- X-47 -29
- X-46 -29
- X-45 -29
- X-40 -29
- X-39 -29
- X-38 -29
- X-36 -29
- X-34 -29
- X-33 -29
- X -4 -29
- X 29 -29
- X 30 -29
- X 46 -29
- X 47 -29
- X 49 -29
- X 50 -29
- X-55 -28
- X-54 -28
- X-53 -28
- X-49 -28
- X-48 -28
- X-47 -28
- X-40 -28
- X-39 -28
- X-35 -28
- X -3 -28
- X 47 -28
- X 48 -28
- X-54 -27
- X-53 -27
- X-49 -27
- X-48 -27
- X -4 -27
- X -3 -27
- X-19 -24
- X-21 -23
- X-19 -23
- X-20 -22
- X-19 -22
- X -8 -13
- X -7 -12
- X -9 -11
- X -8 -11
- X -7 -11
- X 7 -8
- X-20 -7
- X 5 -7
- X 6 -7
- X-21 -6
- X-20 -6
- X 6 -6
- X 7 -6
- X-22 -5
- X-21 -5
- X-20 -5
- X-18 -5
- X -8 -5
- X -7 -5
- X 10 -5
- X 11 -5
- X 24 -5
- X 25 -5
- X 26 -5
- X 27 -5
- X 33 -5
- X 34 -5
- X 35 -5
- X-54 -4
- X-51 -4
- X-23 -4
- X-22 -4
- X -8 -4
- X -7 -4
- X 10 -4
- X 11 -4
- X 24 -4
- X 26 -4
- X 27 -4
- X 34 -4
- X 35 -4
- X-51 -3
- X-43 -3
- X-42 -3
- X-41 -3
- X-22 -3
- X-21 -3
- X 24 -3
- X 33 -3
- X-55 -2
- X-45 -2
- X-40 -2
- X-21 -2
- X 25 -2
- X 26 -2
- X 40 -2
- X 43 -2
- X 44 -2
- X 57 -2
- X 58 -2
- X-55 -1
- X-54 -1
- X-45 -1
- X-39 -1
- X 4 -1
- X 41 -1
- X 42 -1
- X 44 -1
- X 57 -1
- X 58 -1
- X-49 0
- X-40 0
- X-21 0
- X 2 0
- X 4 0
- X 25 0
- X 26 0
- X 43 0
- X-52 1
- X-51 1
- X-42 1
- X-41 1
- X-22 1
- X-21 1
- X 3 1
- X 4 1
- X 24 1
- X 32 1
- X 41 1
- X 42 1
- X 43 1
- X-23 2
- X-22 2
- X -8 2
- X -7 2
- X 24 2
- X 26 2
- X 27 2
- X 32 2
- X 33 2
- X 34 2
- X 35 2
- X-52 3
- X-51 3
- X-42 3
- X-41 3
- X-22 3
- X-21 3
- X-20 3
- X-18 3
- X -8 3
- X -7 3
- X 24 3
- X 25 3
- X 26 3
- X 27 3
- X 32 3
- X 33 3
- X 41 3
- X 42 3
- X 43 3
- X-53 4
- X-49 4
- X-40 4
- X-21 4
- X-20 4
- X 43 4
- X-53 5
- X-50 5
- X-45 5
- X-39 5
- X-20 5
- X -4 5
- X -3 5
- X 34 5
- X 41 5
- X 42 5
- X 44 5
- X-53 6
- X-50 6
- X-45 6
- X-40 6
- X -4 6
- X 40 6
- X 43 6
- X 44 6
- X-52 7
- X-51 7
- X-43 7
- X-42 7
- X-41 7
- X-23 7
- X -3 7
- X-22 8
- X -4 8
- X -3 8
- X-24 9
- X-23 9
- X-22 9
- X 22 12
- X 20 13
- X 21 13
- X 21 14
- X 22 14
- X-11 19
- X-13 20
- X-11 20
- X-12 21
- X-11 21
- X-18 29
- X-17 29
- X-19 30
- X-18 30
- X-16 30
- X-15 30
- X -8 30
- X -7 30
- X 0 30
- X 10 30
- X 11 30
- X 26 30
- X 27 30
- X 28 30
- X-18 31
- X-15 31
- X -8 31
- X -7 31
- X 1 31
- X 10 31
- X 11 31
- X 24 31
- X 28 31
- X-45 32
- X-44 32
- X-18 32
- X-15 32
- X -1 32
- X 0 32
- X 1 32
- X 23 32
- X 28 32
- X-55 33
- X-54 33
- X-46 33
- X-44 33
- X-17 33
- X-16 33
- X 23 33
- X 27 33
- X 41 33
- X 42 33
- X 57 33
- X 58 33
- X-55 34
- X-54 34
- X-47 34
- X-46 34
- X-44 34
- X 40 34
- X 41 34
- X 57 34
- X 58 34
- X-46 35
- X-45 35
- X-17 35
- X-16 35
- X 13 35
- X 14 35
- X 15 35
- X 23 35
- X 27 35
- X 41 35
- X 42 35
- X 43 35
- X 44 35
- X 45 35
- X-45 36
- X-18 36
- X-15 36
- X 11 36
- X 12 36
- X 14 36
- X 16 36
- X 17 36
- X 23 36
- X 28 36
- X 42 36
- X 43 36
- X 44 36
- X 45 36
- X-18 37
- X-15 37
- X -8 37
- X -7 37
- X 11 37
- X 12 37
- X 18 37
- X 24 37
- X 28 37
- X-45 38
- X-19 38
- X-18 38
- X-16 38
- X-15 38
- X -8 38
- X -7 38
- X 11 38
- X 12 38
- X 14 38
- X 16 38
- X 17 38
- X 26 38
- X 27 38
- X 28 38
- X 42 38
- X 43 38
- X 44 38
- X 45 38
- X 54 38
- X 55 38
- X-46 39
- X-45 39
- X-26 39
- X-18 39
- X-17 39
- X 13 39
- X 14 39
- X 15 39
- X 41 39
- X 42 39
- X 43 39
- X 44 39
- X 45 39
- X 51 39
- X 52 39
- X 54 39
- X 56 39
- X-47 40
- X-46 40
- X-44 40
- X-28 40
- X-26 40
- X -4 40
- X -3 40
- X 40 40
- X 41 40
- X 51 40
- X 52 40
- X 56 40
- X 57 40
- X-46 41
- X-44 41
- X-27 41
- X-26 41
- X -4 41
- X 41 41
- X 42 41
- X 51 41
- X 52 41
- X 54 41
- X 56 41
- X-45 42
- X-44 42
- X -3 42
- X 12 42
- X 54 42
- X 55 42
- X -4 43
- X -3 43
- X 10 43
- X 12 43
- X 11 44
- X 12 44
- X 24 44
- X 26 44
- X 24 45
- X 25 45
- X 25 46
- X-15 50
- X-14 51
- X-16 52
- X-15 52
- X-14 52
- X 14 55
- X 12 56
- X 13 56
- X 13 57
- X 14 57
- X -3 62
- X -5 63
- X -3 63
- X -4 64
- X -3 64
- X 17 64
- X 18 64
- X 21 64
- X 23 64
- X 10 65
- X 11 65
- X 16 65
- X 17 65
- X 18 65
- X 20 65
- X 24 65
- X 10 66
- X 11 66
- X 15 66
- X 16 66
- X 23 66
- X 16 67
- X 18 67
- X 19 67
- X 20 67
- X 21 67
- X 22 67
- X 45 67
- X 46 67
- X 50 67
- X 17 68
- X 18 68
- X 19 68
- X 45 68
- X 46 68
- X 47 68
- X 49 68
- X 51 68
- X 52 68
- X 57 68
- X 58 68
- X 45 69
- X 46 69
- X 47 69
- X 52 69
- X 57 69
- X 58 69
- X 17 70
- X 18 70
- X 19 70
- X 48 70
- X 52 70
- X -3 71
- X 16 71
- X 18 71
- X 19 71
- X 20 71
- X 21 71
- X 22 71
- X 49 71
- X 50 71
- X 51 71
- X -4 72
- X -2 72
- X 15 72
- X 16 72
- X 23 72
- X -4 73
- X -3 73
- X 8 73
- X 16 73
- X 17 73
- X 18 73
- X 20 73
- X 24 73
- X 49 73
- X 50 73
- X 51 73
- X 9 74
- X 17 74
- X 18 74
- X 21 74
- X 23 74
- X 48 74
- X 52 74
- X -4 75
- X -3 75
- X 7 75
- X 8 75
- X 9 75
- X 29 75
- X 45 75
- X 46 75
- X 47 75
- X 52 75
- X -4 76
- X 27 76
- X 28 76
- X 45 76
- X 46 76
- X 47 76
- X 49 76
- X 51 76
- X 52 76
- X -3 77
- X 28 77
- X 29 77
- X 45 77
- X 46 77
- X 50 77
- X -4 78
- X -3 78
- END_OF_xlife-2.0/patterns/counter.life
- if test 6651 -ne `wc -c <xlife-2.0/patterns/counter.life`; then
- echo shar: \"xlife-2.0/patterns/counter.life\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/patterns/gliderarmyof256.life -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/patterns/gliderarmyof256.life\"
- else
- echo shar: Extracting \"xlife-2.0/patterns/gliderarmyof256.life\" \(6173 characters\)
- sed "s/^X//" >xlife-2.0/patterns/gliderarmyof256.life <<'END_OF_xlife-2.0/patterns/gliderarmyof256.life'
- X#P -38 -38
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- X..............................................................................
- X..............................................................................
- X.*....*....*....*....*....*....*....*....*....*....*....*....*....*....*....*.
- X**...**...**...**...**...**...**...**...**...**...**...**...**...**...**...**.
- X*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*..*.*
- END_OF_xlife-2.0/patterns/gliderarmyof256.life
- if test 6173 -ne `wc -c <xlife-2.0/patterns/gliderarmyof256.life`; then
- echo shar: \"xlife-2.0/patterns/gliderarmyof256.life\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/patterns/rake2.life -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/patterns/rake2.life\"
- else
- echo shar: Extracting \"xlife-2.0/patterns/rake2.life\" \(2915 characters\)
- sed "s/^X//" >xlife-2.0/patterns/rake2.life <<'END_OF_xlife-2.0/patterns/rake2.life'
- X#R
- X 36 -16
- X 37 -16
- X 34 -15
- X 39 -15
- X 40 -14
- X 11 -13
- X 34 -13
- X 40 -13
- X 9 -12
- X 13 -12
- X 30 -12
- X 35 -12
- X 36 -12
- X 37 -12
- X 38 -12
- X 39 -12
- X 40 -12
- X 46 -12
- X 47 -12
- X 48 -12
- X 49 -12
- X 50 -12
- X 51 -12
- X-49 -11
- X 14 -11
- X 29 -11
- X 30 -11
- X 45 -11
- X 51 -11
- X-51 -10
- X-47 -10
- X 9 -10
- X 14 -10
- X 29 -10
- X 31 -10
- X 51 -10
- X-46 -9
- X 10 -9
- X 11 -9
- X 12 -9
- X 13 -9
- X 14 -9
- X 50 -9
- X-51 -8
- X-46 -8
- X-14 -8
- X -3 -8
- X 43 -8
- X 47 -8
- X 48 -8
- X-50 -7
- X-49 -7
- X-48 -7
- X-47 -7
- X-46 -7
- X-15 -7
- X-13 -7
- X -3 -7
- X -2 -7
- X 42 -7
- X 43 -7
- X 44 -7
- X-12 -6
- X -8 -6
- X -4 -6
- X -2 -6
- X 33 -6
- X 34 -6
- X 42 -6
- X 43 -6
- X 46 -6
- X 47 -6
- X-17 -5
- X-16 -5
- X-15 -5
- X-14 -5
- X-13 -5
- X -9 -5
- X -8 -5
- X -7 -5
- X -5 -5
- X -4 -5
- X -3 -5
- X 0 -5
- X 1 -5
- X 12 -5
- X 13 -5
- X 33 -5
- X 34 -5
- X 36 -5
- X 44 -5
- X 45 -5
- X 46 -5
- X 47 -5
- X 49 -5
- X-22 -4
- X-21 -4
- X-18 -4
- X-17 -4
- X-11 -4
- X-10 -4
- X -6 -4
- X -5 -4
- X -3 -4
- X 1 -4
- X 2 -4
- X 3 -4
- X 11 -4
- X 14 -4
- X 29 -4
- X 30 -4
- X 33 -4
- X 45 -4
- X 50 -4
- X-35 -3
- X-34 -3
- X-23 -3
- X-20 -3
- X-17 -3
- X-12 -3
- X-10 -3
- X -7 -3
- X -5 -3
- X -4 -3
- X 0 -3
- X 2 -3
- X 3 -3
- X 4 -3
- X 5 -3
- X 6 -3
- X 11 -3
- X 13 -3
- X 21 -3
- X 22 -3
- X 28 -3
- X 30 -3
- X 31 -3
- X 33 -3
- X 36 -3
- X 37 -3
- X 50 -3
- X 51 -3
- X-35 -2
- X-34 -2
- X-22 -2
- X-21 -2
- X-16 -2
- X-12 -2
- X-11 -2
- X-10 -2
- X -9 -2
- X -2 -2
- X -1 -2
- X 2 -2
- X 3 -2
- X 4 -2
- X 5 -2
- X 6 -2
- X 12 -2
- X 21 -2
- X 22 -2
- X 28 -2
- X 32 -2
- X 34 -2
- X 36 -2
- X 47 -2
- X 48 -2
- X 49 -2
- X 50 -2
- X-12 -1
- X-11 -1
- X 0 -1
- X 1 -1
- X 2 -1
- X 29 -1
- X 30 -1
- X 31 -1
- X 33 -1
- X 34 -1
- X 47 -1
- X 48 -1
- X 49 -1
- X-12 1
- X-11 1
- X 0 1
- X 1 1
- X 2 1
- X 29 1
- X 30 1
- X 31 1
- X 33 1
- X 34 1
- X 47 1
- X 48 1
- X 49 1
- X-35 2
- X-34 2
- X-22 2
- X-21 2
- X-16 2
- X-12 2
- X-11 2
- X-10 2
- X -9 2
- X -2 2
- X -1 2
- X 2 2
- X 3 2
- X 4 2
- X 5 2
- X 6 2
- X 12 2
- X 21 2
- X 22 2
- X 28 2
- X 32 2
- X 34 2
- X 36 2
- X 47 2
- X 48 2
- X 49 2
- X 50 2
- X-35 3
- X-34 3
- X-23 3
- X-20 3
- X-17 3
- X-12 3
- X-10 3
- X -7 3
- X -5 3
- X -4 3
- X 0 3
- X 2 3
- X 3 3
- X 4 3
- X 5 3
- X 6 3
- X 11 3
- X 13 3
- X 21 3
- X 22 3
- X 28 3
- X 30 3
- X 31 3
- X 33 3
- X 36 3
- X 37 3
- X 50 3
- X 51 3
- X-22 4
- X-21 4
- X-18 4
- X-17 4
- X-11 4
- X-10 4
- X -6 4
- X -5 4
- X -3 4
- X 1 4
- X 2 4
- X 3 4
- X 11 4
- X 14 4
- X 29 4
- X 30 4
- X 33 4
- X 45 4
- X 50 4
- X-17 5
- X-16 5
- X-15 5
- X-14 5
- X-13 5
- X -9 5
- X -8 5
- X -7 5
- X -5 5
- X -4 5
- X -3 5
- X 0 5
- X 1 5
- X 12 5
- X 13 5
- X 33 5
- X 34 5
- X 36 5
- X 44 5
- X 45 5
- X 46 5
- X 47 5
- X 49 5
- X-12 6
- X -8 6
- X -4 6
- X -2 6
- X 33 6
- X 34 6
- X 42 6
- X 43 6
- X 46 6
- X 47 6
- X-50 7
- X-49 7
- X-48 7
- X-47 7
- X-46 7
- X-15 7
- X-13 7
- X -3 7
- X -2 7
- X 42 7
- X 43 7
- X 44 7
- X-51 8
- X-46 8
- X-14 8
- X -3 8
- X 43 8
- X 47 8
- X 48 8
- X-46 9
- X 10 9
- X 11 9
- X 12 9
- X 13 9
- X 14 9
- X 50 9
- X-51 10
- X-47 10
- X 9 10
- X 14 10
- X 29 10
- X 31 10
- X 51 10
- X-49 11
- X 14 11
- X 29 11
- X 30 11
- X 45 11
- X 51 11
- X 9 12
- X 13 12
- X 30 12
- X 35 12
- X 36 12
- X 37 12
- X 38 12
- X 39 12
- X 40 12
- X 46 12
- X 47 12
- X 48 12
- X 49 12
- X 50 12
- X 51 12
- X 11 13
- X 34 13
- X 40 13
- X 40 14
- X 34 15
- X 39 15
- X 36 16
- X 37 16
- END_OF_xlife-2.0/patterns/rake2.life
- if test 2915 -ne `wc -c <xlife-2.0/patterns/rake2.life`; then
- echo shar: \"xlife-2.0/patterns/rake2.life\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/patterns/round.life -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/patterns/round.life\"
- else
- echo shar: Extracting \"xlife-2.0/patterns/round.life\" \(1347 characters\)
- sed "s/^X//" >xlife-2.0/patterns/round.life <<'END_OF_xlife-2.0/patterns/round.life'
- X#R
- X 0 -34
- X 1 -34
- X-10 -33
- X -9 -33
- X -1 -33
- X 1 -33
- X 17 -33
- X 18 -33
- X-10 -32
- X -9 -32
- X -1 -32
- X 17 -32
- X 18 -32
- X -1 -31
- X 0 -31
- X 1 -31
- X -1 -27
- X 0 -27
- X 1 -27
- X-10 -26
- X -9 -26
- X -1 -26
- X 17 -26
- X 18 -26
- X-10 -25
- X -9 -25
- X -1 -25
- X 1 -25
- X 17 -25
- X 18 -25
- X 0 -24
- X 1 -24
- X -6 -18
- X -5 -18
- X 6 -18
- X-33 -17
- X-32 -17
- X-26 -17
- X-25 -17
- X -5 -17
- X -4 -17
- X 7 -17
- X 8 -17
- X-33 -16
- X-32 -16
- X-26 -16
- X-25 -16
- X -6 -16
- X 6 -16
- X 7 -16
- X 26 -10
- X 27 -10
- X 33 -10
- X 34 -10
- X 26 -9
- X 27 -9
- X 33 -9
- X 34 -9
- X-17 -7
- X-17 -6
- X-16 -6
- X 17 -6
- X 19 -6
- X-18 -5
- X-16 -5
- X 18 -5
- X 19 -5
- X 18 -4
- X 26 -1
- X 27 -1
- X 28 -1
- X 32 -1
- X 33 -1
- X 34 -1
- X-34 0
- X-33 0
- X-31 0
- X-27 0
- X-25 0
- X-24 0
- X 25 0
- X 28 0
- X 32 0
- X 35 0
- X-34 1
- X-31 1
- X-27 1
- X-24 1
- X 25 1
- X 26 1
- X 28 1
- X 32 1
- X 34 1
- X 35 1
- X-33 2
- X-32 2
- X-31 2
- X-27 2
- X-26 2
- X-25 2
- X-17 5
- X-18 6
- X-17 6
- X 17 6
- X 19 6
- X-18 7
- X-16 7
- X 17 7
- X 18 7
- X 18 8
- X-33 10
- X-32 10
- X-26 10
- X-25 10
- X-33 11
- X-32 11
- X-26 11
- X-25 11
- X -6 17
- X -5 17
- X 7 17
- X 26 17
- X 27 17
- X 33 17
- X 34 17
- X -7 18
- X -6 18
- X 5 18
- X 6 18
- X 26 18
- X 27 18
- X 33 18
- X 34 18
- X -5 19
- X 6 19
- X 7 19
- X 0 25
- X 1 25
- X-17 26
- X-16 26
- X 0 26
- X 2 26
- X 10 26
- X 11 26
- X-17 27
- X-16 27
- X 2 27
- X 10 27
- X 11 27
- X 0 28
- X 1 28
- X 2 28
- X 0 32
- X 1 32
- X 2 32
- X-17 33
- X-16 33
- X 2 33
- X 10 33
- X 11 33
- X-17 34
- X-16 34
- X 0 34
- X 2 34
- X 10 34
- X 11 34
- X 0 35
- X 1 35
- END_OF_xlife-2.0/patterns/round.life
- if test 1347 -ne `wc -c <xlife-2.0/patterns/round.life`; then
- echo shar: \"xlife-2.0/patterns/round.life\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/utils.c -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/utils.c\"
- else
- echo shar: Extracting \"xlife-2.0/utils.c\" \(3331 characters\)
- sed "s/^X//" >xlife-2.0/utils.c <<'END_OF_xlife-2.0/utils.c'
- X/*
- X * XLife Copyright 1989 Jon Bennett jb7m+@andrew.cmu.edu, jcrb@cs.cmu.edu
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation, and that the name of the copyright holders not be used in
- X * advertising or publicity pertaining to distribution of the software without
- X * specific, written prior permission. The copyright holders make no
- X * representations about the suitability of this software for any purpose. It
- X * is provided "as is" without express or implied warranty.
- X *
- X * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X */
- X
- X#include "defs.h"
- X
- Xfatal(s)
- Xchar *s;
- X{
- X fprintf(stderr, s);
- X exit(-22);
- X}
- X
- Xint ClassifyWin(win)
- XWindow win;
- X{
- X if(win == lifew)
- X return LIFEWIN;
- X if(win == inputw)
- X return INPUTWIN;
- X if(win == mainw)
- X return MAINWIN;
- X}
- X
- Xchar *itoa(n)
- Xint n;
- X{
- X static char buf[16];
- X char sign;
- X char *ptr;
- X
- X if (n >= 0)
- X sign = ' ';
- X else {
- X n = -n;
- X sign = '-';
- X }
- X buf[15] = 0;
- X ptr = buf + 14;
- X do {
- X *--ptr = n % 10 + '0';
- X if (ptr <= buf)
- X return(buf);
- X n /= 10;
- X } while (n > 0);
- X *--ptr = sign;
- X return(ptr);
- X}
- X
- Xdrawpoint(x,y,c)
- X int x,y,c;
- X{
- X if(c){
- X XDrawPoint(disp,lifew,whitegc,x,y);
- X }
- X else{
- X XDrawPoint(disp,lifew,blackgc,x,y);
- X }
- X}
- X
- Xdrawbox(x,y,c)
- X int x,y,c;
- X{
- X int sc;
- X sc = (1 << scale -1) - (scale > 2);
- X if(c){
- X XFillRectangle(disp,lifew,whitegc,x,y,sc,sc);
- X }
- X else{
- X XFillRectangle(disp,lifew,blackgc,x,y,sc,sc);
- X }
- X}
- X
- Xvoid randomize(){
- X unsigned long num;
- X
- X for(num = (width * height) >> (scale + 6);num;num--){
- X addcell(random()%(width>>(scale-1))+xpos,random()%(height>>(scale-1))+ypos);
- X }
- X redisplay();
- X}
- X
- Xvoid settimeout(ms)
- X unsigned long ms;
- X{
- X timeout.tv_sec=ms/1000;
- X timeout.tv_usec=(ms%1000)*1000;
- X}
- X
- Xvoid benchmark()
- X{
- X char outbuf[100];
- X u_long num,count;
- X double tm;
- X struct timeval start,end;
- X struct timezone tmz;
- X
- X state=STOP;
- X
- X strcpy(inpbuf,"Number of generations:");
- X minbuflen=22;
- X
- X XClearWindow(disp,inputw);
- X XDrawString(disp, inputw, ntextgc,ICOORDS(0,0),inpbuf, strlen(inpbuf));
- X
- X getxstring();
- X
- X strcpy(outbuf,inpbuf+22);
- X inpbuf[0]=0;
- X sscanf(outbuf,"%d",&count);
- X
- X gettimeofday(&start,&tmz);
- X for(num=0;num<count;num++){
- X generate();
- X }
- X gettimeofday(&end,&tmz);
- X tm=(((end.tv_sec * 1000000) + end.tv_usec) - ((start.tv_sec * 1000000) + start.tv_usec))/1000000.0;
- X sprintf(inpbuf,"%s:%f","Time",tm);
- X
- X XClearWindow(disp,lifew);
- X redrawscreen();
- X XClearWindow(disp,inputw);
- X XDrawString(disp, inputw, ntextgc,ICOORDS(0,0),inpbuf, strlen(inpbuf));
- X getxstring();
- X inpbuf[0]=0;
- X}
- END_OF_xlife-2.0/utils.c
- if test 3331 -ne `wc -c <xlife-2.0/utils.c`; then
- echo shar: \"xlife-2.0/utils.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f xlife-2.0/xlife.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"xlife-2.0/xlife.man\"
- else
- echo shar: Extracting \"xlife-2.0/xlife.man\" \(5364 characters\)
- sed "s/^X//" >xlife-2.0/xlife.man <<'END_OF_xlife-2.0/xlife.man'
- X.TH Xlife 6
- X.SH NAME
- XXlife - Conway's Game of Life for X, version 2.0
- X.SH SYNTAX
- X.B xlife [-geometry string] [-bw width] [initial pattern file]
- X.SH DESCRIPTION
- X.NXR "xlife"
- X.PN xlife
- Xbrings up a single window in which the user may play the game of life.
- X
- XThe universe is effectivly unbounded (4.2 billion on a side)
- XThe algorithim uses hashed 8x8 boxes of cells, and computes the next
- Xgeneration by using lookup tables for added speed.
- X
- XBy default Xlife will run in a window taking up your entire screen. The -bw
- Xoption allows you to pass Xlife the width of the borders created by your window
- Xmanager, for use in the internal window size calculation.
- X
- XThe -geometry option sets the Xlife window size and position as per usual for
- XX applications.
- X
- XIf possible, you should tell your window manager to create Xlife without a
- Xtitle bar; otherwise you will have to use -geometry to set the window's
- Xvertical size enough smaller than the default that the title bar doesn't
- Xcrowd the bottom of the window off the screen.
- X
- X.SH COMMANDS
- X.IP \fB8\fR 20
- XMove your view of the universe up.
- X.IP \fB2\fR 20
- XMove your view of the universe down.
- X.IP \fB6\fR 20
- XMove your view of the universe right.
- X.IP \fB4\fR 20
- XMove your view of the universe left.
- X.IP \fB5\fR 20
- XCenter the universe on the screen (based on average position of the cells).
- X.IP \fB=,+\fR 20
- XZoom the view in, magnifying the area around the mouse cursor.
- X.IP \fB\-\fR 20
- XZoom the view out.
- X.IP \fBg\fR 20
- XToggle running the game.
- X.IP \fBo\fR 20
- XStep forward one generation.
- X.IP \fBS\fR 20
- XSave the universe to a file adding extention .life.
- X.IP \fBl\fR 20
- XLoad (actually add to) the universe from a file with extention .life.
- XThis lets you overlay multiple saved states to make for some interesting
- Xeffects. Clear the universe if you want to start from scratch.
- X.IP \fBh\fR 20
- X(Hide) stop displaying after each generation, does not iconify.
- X.IP \fBc\fR 20
- XToggle showing of cell counts
- X.IP \fB?\fR 20
- XHelp for xlife.
- X.IP \fB!\fR 20
- XPlace random cells on the area of the universe on the screen.
- X.IP \fBr\fR 20
- XRedraw the screen.
- X.IP \fBR\fR 20
- XChange the rules in "stays alive on"/"born on"
- Xformat. The standard rules are 23/3 (alive on two or three
- Xneighbors, birth on three neighbors for an empty cell).
- X.IP \fBN\fR 20
- XChange the file's internal name.
- X.IP \fBA\fR 20
- XAdd comments.
- X.IP \fBV\fR 20
- XView comments.
- X.IP \fBC\fR 20
- XClear the universe.
- X.IP \fBQ\fR 20
- XQuit
- X.IP \fBButtons\fR 20
- X.IP \fB1\fR 20
- XActivate a cell at the cursor.
- X.IP \fB2\fR 20
- XCenter the universe view on the cursor.
- X.IP \fB3\fR 20
- XDelete a cell at the cursor.
- X.IP \fBf\fR 20
- XRun at a fast speed (no delay)
- X.IP \fBm\fR 20
- XRun at a medium speed
- X.IP \fBs\fR 20
- XRun at a slow speed
- X
- X.SH LOAD FILE FORMAT
- XA .life image file is an ordinary text file consisting of lines terminated by
- Xthe newline character. It is interpreted as one or more image sections
- Xseparated by section lines beginning with '#'. Lines led by `##' are
- Xconsidered comments and ignored.
- X
- XEach image section is interpreted according to the format letter following its
- Xsection line #. The format letters are:
- X
- XA -- Absolute.
- XEach line is interpreted as an absolute (x,y) coordinate pair.
- X
- XR -- Relative.
- XEach line is interpreted as a relative (x,y) coordinate pair.
- X
- XP -- Picture.
- XEach line in the section is interpreted as a scan line of a relative image.
- XEach '*' character turns the corresponding bit on. All other characters leave
- Xthe corresponding bit off.
- X
- XI -- Include.
- XA #I line should have whitespace-separated fields after the #I; a pattern name
- Xand optionally two integers interpreted as x and y offsets. The named pattern
- Xfile is loaded as if it had been included in the image at this point. The
- Xoffsets, if present, displace the load point of the pattern relative to the
- Xcurrent mouse position. The include facility is useful for assembling `sampler'
- Xcollections of interesting patterns.
- X
- XRelative image sections are normally drawn with 0,0 on the current mouse
- Xposition (coordinates may be negative). This may be changed by including a
- Xpair of whitespace-separated integers after the format character. If this is
- Xdone, these will be interpreted as a pair of x and y offsets, and the image
- Xsection will be drawn with its upper left corner displaced from the cursor
- Xposition by those offsets. This facility can be used to write image files
- Xthat will load patterns centered on the cursor.
- X
- XA leading image section with no header line is treated as though it had a `#A'
- Xheader. Thus, version 1.00 image files will load properly.
- X
- XN -- Name
- XThis line contains the internal name of the pattern (which may differ from the
- XXXX.life name of the file.
- X
- XO -- Owner
- XThis line contains information on the person who wrote the file, it is written
- Xin the form: id "name"@machine date, for example.
- X
- X#O jb7m "Jon C. R. Bennett"@sushi.andrew.cmu.edu Fri Jan 12 18:25:54 1990
- X
- XC -- Comment
- XLines begining with "C" are comments that the user may have automaticaly writen
- Xto the save file, and which may be viewed from withen Xlife.
- X
- XMore section formats may be added in the future.
- X
- X.SH RESTRICTIONS
- Xnone
- X
- X.SH AUTHORS
- XAlgorithm, implementation and file format enhancements:
- X Jon Bennett jcrb@cs.cmu.edu
- X
- XOriginal X code:
- X Chuck Silvers cs4n@andrew.cmu.edu
- X
- XAuto-sizing, X options and load format enhancements:
- X Eric S. Raymond (eric@snark.uu.net)
- X
- X.SH SEE ALSO
- Xxtrek(6)
- END_OF_xlife-2.0/xlife.man
- if test 5364 -ne `wc -c <xlife-2.0/xlife.man`; then
- echo shar: \"xlife-2.0/xlife.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- echo shar: End of archive 5 \(of 8\).
- cp /dev/null ark5isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 8 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- dan
- ----------------------------------------------------
- O'Reilly && Associates argv@sun.com / argv@ora.com
- Opinions expressed reflect those of the author only.
-