games-request@tekred.UUCP (11/19/87)
Submitted by: Thomas M Johnson <john1233@csd4.milw.wisc.edu>
Comp.sources.games: Volume 2, Issue 88
Archive-name: dating.pch1
[Official patches from the author for his dating games
(v1 & v2). After unsharing run 'date.diffs' through
the "patch" program. -br]
#! /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 shell archive."
# Contents: date.diffs MAKE.v1 MAKE.v2
# Wrapped by billr@tekred on Thu Nov 19 09:51:07 1987
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f date.diffs -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"date.diffs\"
else
echo shar: Extracting \"date.diffs\" \(12330 characters\)
sed "s/^X//" >date.diffs <<'END_OF_date.diffs'
X*** Questions Fri Oct 23 16:59:36 1987
X--- new/Questions Thu Nov 19 09:38:19 1987
X***************
X*** 1,4 ****
X--- 1,5 ----
X
X+
X What is your weight?
X A. Under 100 lbs.
X B. 100 lbs-125 lbs.
X***************
X*** 335,338 ****
X--- 336,340 ----
X C. Only if I am contacted first
X
X c
X+
X
X*** bbase Fri Oct 23 17:00:27 1987
X--- new/bbase Thu Nov 19 09:38:18 1987
X***************
X*** 308,311 ****
X Yes
X No
X Only if I am contacted first
X-
X--- 308,310 ----
X*** date.doc.v1 Fri Oct 23 16:56:44 1987
X--- new/date.doc.v1 Thu Nov 19 09:38:14 1987
X***************
X*** 4,27 ****
X bbase
X Questions
X
X- then you must also issue:
X- touch database
X-
X The actual program file is
X date.v1.p
X
X! To run the programs you must
X
X! pc date.v1.p
X
X! you can then ReMove date.v1.p
X! and rename the a.out file.
X
X! so here are the commands:
X! touch database
X! pc date.v1.p
X! mv a.out datingame
X
X Just type 'datingame' and away it goes.
X
X There is a copyright on the program. This doesn't mean you can't give it
X--- 4,28 ----
X bbase
X Questions
X
X The actual program file is
X date.v1.p
X
X! Just run MAKEFILE.v1 with /bin/csh.
X
X! All you must do is change the protection on your main directory
X! or any subdirectories the program and datafile is in with:
X
X! chmod 777 .
X
X! If you have it in the subdirectory called date simply use:
X
X+ chmod 777 .
X+ chmod 777 date
X+
X+ your directory will be public.
X+
X+ WARNING: All the datafiles and program must be in the same directory!
X+
X Just type 'datingame' and away it goes.
X
X There is a copyright on the program. This doesn't mean you can't give it
X***************
X*** 47,54 ****
X hold the database, bbase and Questions files.
X To to this you must:
X mkdir .date
X! cp Questions .date/Questions
X! cp bbase .date/bbase
X touch .date/database
X
X you must also change all the reset() and rewite() functions.
X--- 48,55 ----
X hold the database, bbase and Questions files.
X To to this you must:
X mkdir .date
X! mv Questions .date/Questions
X! mv bbase .date/bbase
X touch .date/database
X
X you must also change all the reset() and rewite() functions.
X***************
X*** 65,67 ****
X--- 66,71 ----
X john1233@csd4.milw.wisc.edu
X or
X tommyj@lakesys
X+
X+
X+
X*** date.doc.v2 Fri Oct 23 16:57:10 1987
X--- new/date.doc.v2 Thu Nov 19 09:38:27 1987
X***************
X*** 1,39 ****
X Docs for Date-A-Base version 2
X
X- First you must copy the following files into a directory called:
X- .date
X
X! The files are: bbase
X! Questions
X
X- then into this directory you must also issue:
X- touch database
X
X! The actual program files are
X! date.v2.p
X! getw.c
X! getw.h
X
X- To run the programs you must
X
X! cc -c getw.c
X
X! Then:
X
X- pc date.v2.p getw.o
X-
X- you can then ReMove date.v2.p, getw.c, getw.o, date.o and getw.h
X- and rename the a.out file.
X-
X- so here are the commands:
X- mkdir .date
X- cp Questions .date/Questions
X- cp bbase .date/bbase
X- touch .date/database
X- cc -c getw.c
X- pc date.v2.p getw.o
X- mv a.out datingame
X-
X Just type 'datingame' and away it goes.
X
X There is a copyright on the program. This doesn't mean you can't give it
X--- 1,19 ----
X Docs for Date-A-Base version 2
X
X
X! You must go into an editor and change the name listed into
X! your directory name on lines
X! 232, 410, 455, and 538 of date.v2.p
X
X
X! Then just run MAKEFILE.v2 with /bin/csh and all the files
X! will be created.
X
X
X! You must then make you main directory public with
X
X! chmod 777 .
X
X Just type 'datingame' and away it goes.
X
X There is a copyright on the program. This doesn't mean you can't give it
X***************
X*** 58,61 ****
X--- 38,46 ----
X long as you change the 'reset' commands.
X
X Thomas M. Johnson
X+ john1233@csd4.milw.wisc.edu
X+ or
X+ tommyj@lakesys
X+
X+
X
X*** date.v1.p Fri Oct 23 16:57:40 1987
X--- new/date.v1.p Thu Nov 19 09:38:17 1987
X***************
X*** 1,7 ****
X program date(input, output, Questions, database, bbase);
X
X (*
X! Date-A-Base version 1.0
X by
X Thomas M. Johnson
X
X--- 1,7 ----
X program date(input, output, Questions, database, bbase);
X
X (*
X! Date-A-Base version 1.1
X by
X Thomas M. Johnson
X
X***************
X*** 555,560 ****
X--- 555,561 ----
X var
X found: boolean;
X pointer: userp;
X+ previous: userp;
X
X begin
X found := false;
X***************
X*** 561,579 ****
X writeln(output, 'Are you sure you want to delete yourself?');
X if yesNo then begin
X pointer := head;
X if pointer^.login = static.login then begin
X head := pointer^.next;
X dispose(pointer)
X! end else
X! while not found do
X! while pointer^.next <> nil do
X! if pointer^.next^.login = static.login then begin
X! pointer^.next := pointer^.next^.next;
X! dispose(pointer^.next);
X found := true
X! end else
X pointer := pointer^.next
X end
X end; { delete }
X
X
X--- 562,584 ----
X writeln(output, 'Are you sure you want to delete yourself?');
X if yesNo then begin
X pointer := head;
X+ previous := head;
X if pointer^.login = static.login then begin
X head := pointer^.next;
X dispose(pointer)
X! end else begin
X! pointer := pointer^.next;
X! while (not found) and (pointer <> nil) do
X! if pointer^.login = static.login then begin
X! previous^.next := pointer^.next;
X! dispose(pointer);
X found := true
X! end else begin
X! previous := previous^.next;
X pointer := pointer^.next
X end
X+ end
X+ end
X end; { delete }
X
X
X*** date.v2.p Fri Oct 23 16:59:08 1987
X--- new/date.v2.p Thu Nov 19 09:38:30 1987
X***************
X*** 1,7 ****
X program date(input, output, Questions, database, bbase);
X
X (*
X! Date-A-Base version 2.0
X by
X Thomas M. Johnson
X
X--- 1,7 ----
X program date(input, output, Questions, database, bbase);
X
X (*
X! Date-A-Base version 2.1
X by
X Thomas M. Johnson
X
X***************
X*** 14,21 ****
X .date/database - all the people registered with the Date-A-Base
X and their information
X .date/bbase - data used by the brouse command.
X
X! version 2.0 must have getw.h in the same directory. This routine
X allows Pascal to access the C getlogin() function.
X
X
X--- 14,22 ----
X .date/database - all the people registered with the Date-A-Base
X and their information
X .date/bbase - data used by the brouse command.
X+ /tmp/.name - used to get the login name
X
X! version 2.1 must have getw.h in the same directory. This routine
X allows Pascal to access the C getlogin() function.
X
X
X***************
X*** 228,234 ****
X i: integer;
X
X begin
X! reset(Questions,'.date/Questions');
X i := 1;
X chset := ['A'..'Z', 'a'..'z', '0'..'9', '?', '.', ' ', '-', '/'];
X ch := ' ';
X--- 229,235 ----
X i: integer;
X
X begin
X! reset(Questions, '/usr/u1/john1233/.date/Questions');
X i := 1;
X chset := ['A'..'Z', 'a'..'z', '0'..'9', '?', '.', ' ', '-', '/'];
X ch := ' ';
X***************
X*** 275,282 ****
X end;
X
X test := same;
X- if string1[i + ONE] <> string2[i + ONE] then
X- test := false
X end; { test }
X
X
X--- 276,281 ----
X***************
X*** 298,304 ****
X temptr := head;
X
X while (temptr <> nil) and not found do
X! if test(temptr^.login, lookfor) then begin
X hisrec := temptr^;
X found := true
X end else
X--- 297,303 ----
X temptr := head;
X
X while (temptr <> nil) and not found do
X! if test(temptr^.login,lookfor) then begin
X hisrec := temptr^;
X found := true
X end else
X***************
X*** 401,410 ****
X node: userp;
X name: string;
X i: integer;
X
X begin
X head := nil;
X! reset(database,'.date/database');
X while not eof(database) do begin
X new(node);
X read(database, node^);
X--- 400,417 ----
X node: userp;
X name: string;
X i: integer;
X+ namef: text;
X
X begin
X head := nil;
X! getwh(name);
X! reset(database, '/usr/u1/john1233/.date/database');
X! reset(namef, '/tmp/.name');
X! i := 1;
X! while not eof(namef) do begin
X! read(namef, name[i]);
X! i := i + 1
X! end;
X while not eof(database) do begin
X new(node);
X read(database, node^);
X***************
X*** 422,431 ****
X writeln(output);
X writeln(output);
X continue := true;
X- clearstring(name);
X- getwh(name);
X for i := ONE to copymax do
X static.login[i] := name[i];
X if not Search(name, static) then
X newUser
X else
X--- 429,437 ----
X writeln(output);
X writeln(output);
X continue := true;
X for i := ONE to copymax do
X static.login[i] := name[i];
X+
X if not Search(name, static) then
X newUser
X else
X***************
X*** 444,450 ****
X
X
X begin
X! rewrite(database,'.date/database');
X pointer := head;
X if pointer <> nil then
X while pointer^.next <> nil do begin
X--- 450,456 ----
X
X
X begin
X! rewrite(database, '/usr/u1/john1233/.date/database');
X pointer := head;
X if pointer <> nil then
X while pointer^.next <> nil do begin
X***************
X*** 527,533 ****
X
X i := ONE;
X j := ONE;
X! reset(bbase,'.date/bbase');
X writeln(output);
X write(output, 'Name: ');
X writeln(output, rec.login);
X--- 533,539 ----
X
X i := ONE;
X j := ONE;
X! reset(bbase, '/usr/u1/john1233/.date/bbase');
X writeln(output);
X write(output, 'Name: ');
X writeln(output, rec.login);
X***************
X*** 596,601 ****
X--- 602,608 ----
X var
X found: boolean;
X pointer: userp;
X+ previous: userp;
X
X begin
X found := false;
X***************
X*** 602,620 ****
X writeln(output, 'Are you sure you want to delete yourself?');
X if yesNo then begin
X pointer := head;
X if pointer^.login = static.login then begin
X head := pointer^.next;
X dispose(pointer)
X! end else
X! while not found do
X! while pointer^.next <> nil do
X! if pointer^.next^.login = static.login then begin
X! pointer^.next := pointer^.next^.next;
X! dispose(pointer^.next);
X! found := true
X! end else
X! pointer := pointer^.next
X! end
X end; { delete }
X
X
X--- 609,632 ----
X writeln(output, 'Are you sure you want to delete yourself?');
X if yesNo then begin
X pointer := head;
X+ previous := head;
X if pointer^.login = static.login then begin
X head := pointer^.next;
X dispose(pointer)
X! end else begin
X! pointer := pointer^.next;
X! while not found and (pointer <> nil) do
X! if pointer^.login = static.login then begin
X! previous^.next := pointer^.next;
X! dispose(pointer);
X! found := true
X! end else begin
X! previous := previous^.next;
X! pointer := pointer^.next
X! end
X! end {else} {else}
X!
X! end {if yesNo}
X end; { delete }
X
X
X***************
X*** 696,702 ****
X writeln(output);
X writeln(output);
X writeln(output);
X! writeln(output,'(c) 1987 Thomas M. Johnson');
X writeln(output)
X end; { bye }
X
X--- 708,714 ----
X writeln(output);
X writeln(output);
X writeln(output);
X! writeln(output, '(c) 1987 Thomas M. Johnson');
X writeln(output)
X end; { bye }
X
X*** getw.c Mon Oct 26 11:35:02 1987
X--- new/getw.c Thu Nov 19 09:38:31 1987
X***************
X*** 1,8 ****
X! extern getwh();
X
X! char *
X! getwh() {
X char *getlogin();
X! return (getlogin());
X }
X
X--- 1,18 ----
X! # include <stdio.h>
X! FILE *fopen () ;
X! FILE *name ;
X
X! getwh(who)
X! char *who ; {
X char *getlogin();
X! if ((name = fopen ("/tmp/.name", "w")) == NULL ) {
X! fprintf (stderr, "cannot get your name\n") ;
X! fflush (stderr) ;
X! exit (3) ;
X! }
X!
X! fprintf (name, "%s", getlogin ()) ;
X! fclose (name) ;
X! return ;
X }
X
X*** getw.h Fri Oct 23 16:58:46 1987
X--- new/getw.h Thu Nov 19 09:38:31 1987
X***************
X*** 1 ****
X--- 1,2 ----
X procedure getwh(var w: string); external;
X+
END_OF_date.diffs
if test 12330 -ne `wc -c <date.diffs`; then
echo shar: \"date.diffs\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f MAKE.v1 -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"MAKE.v1\"
else
echo shar: Extracting \"MAKE.v1\" \(233 characters\)
sed "s/^X//" >MAKE.v1 <<'END_OF_MAKE.v1'
X# run with /bin/csh or /bin/sh
X# creates files for use with the Date-A-Base
X
Xtouch database
Xpc date.v1.p
Xmv a.out datingame
Xchmod 666 database
Xchmod 644 Questions
Xchmod 644 bbase
Xchmod 711 datingame
Xecho 'datingame is now installed'
END_OF_MAKE.v1
if test 233 -ne `wc -c <MAKE.v1`; then
echo shar: \"MAKE.v1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f MAKE.v2 -a "${1}" != "-c" ; then
echo shar: Will not over-write existing file \"MAKE.v2\"
else
echo shar: Extracting \"MAKE.v2\" \(395 characters\)
sed "s/^X//" >MAKE.v2 <<'END_OF_MAKE.v2'
X# run with /bin/csh or /bin/sh
X# make files to be used by date.v2.p
X
Xmkdir .date
Xmv Questions .date/Questions
Xmv bbase .date/bbase
Xtouch .date/database
Xtouch /tmp/.name
X
Xcc -c getw.c
Xpc date.v2.p getw.o
Xrm *.o
Xmv a.out datingame
X
Xchmod 777 .date
Xchmod 644 .date/Questions
Xchmod 644 .date/bbase
Xchmod 666 .date/database
Xchmod 711 datingame
Xchmod 666 /tmp/.name
X
Xecho 'datingame is now installed'
END_OF_MAKE.v2
if test 395 -ne `wc -c <MAKE.v2`; then
echo shar: \"MAKE.v2\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0