9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* pgp
@ 1996-03-07 19:54 Scott
  0 siblings, 0 replies; only message in thread
From: Scott @ 1996-03-07 19:54 UTC (permalink / raw)


Here are some diffs for pgp to get it to compile under ape.
I'd like to have the 9fans look them over before sending them
off to the pgp maintainers.


#!/bin/rc
#
# command: /bin/boddle orig .
# srcdir: orig
# version: 826228074
# date: Thu Mar 7 14:47:54 EST 1996
#
myname=$0
doextract=no

fn usage{
	echo $myname: usage: $myname '[-X] [src-directory]' >[1=2]
	exit usage
}

fn sigint{
	rm -rf 826228074
	exit interrupt
}

while(~ $1 -*){
	switch($1){
	case -X
		doextract=yes
	case -*
		usage
	}
	shift
}

switch($#*){
case 0
	srcdir=orig
case 1
	srcdir=$1
case *
	usage
}

if(! ~ $doextract yes){
	echo This shell file contains a bundle of diffs representing changes
	echo to original source files in the Plan 9 distribution. It will run
	echo against the files in
	echo ' ' $srcdir
	echo '(unless overridden by the optional source directory argument)'
	echo and create a directory 826228074 containing the updated files.
	echo It will NOT automatically update the original files.
	echo
	echo Invoke with argument -X to perform the actual extraction.
	exit 0
}

rm -rf 826228074
mkdir 826228074

target=826228074/fileio.c
echo -n '826228074/fileio.c: '
if(! test -f $srcdir/fileio.c || ! test -r $srcdir/fileio.c){
	echo $srcdir/fileio.c unreadable
	exit unreadable
}
sum=`{sum < $srcdir/fileio.c}
if(! ~ 92f3d44635173  $sum(1)^$sum(2)){
	echo $srcdir/fileio.c is not the original distribution file
	exit original
}
cp $srcdir/fileio.c 826228074/fileio.c
ed 826228074/fileio.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM fileio.c'
471a
#endif
.
470a
#ifdef _PLAN9_SOURCE
	    strcat(result, "lib/pgp");
#else
.
467a
#endif
.
466a
#ifdef _PLAN9_SOURCE
	s = getenv("home");
#else
.
wq
//GO.SYSIN DD VADIM fileio.c
sum=`{sum < 826228074/fileio.c}
if(~ 3e7e69ed35294  $sum(1)^$sum(2))
	echo
if not{
	echo 826228074/fileio.c checksum error creating updated file
	exit checksum
}
target=826228074/fileio.h
echo -n '826228074/fileio.h: '
if(! test -f $srcdir/fileio.h || ! test -r $srcdir/fileio.h){
	echo $srcdir/fileio.h unreadable
	exit unreadable
}
sum=`{sum < $srcdir/fileio.h}
if(! ~ b1b4317f4854  $sum(1)^$sum(2)){
	echo $srcdir/fileio.h is not the original distribution file
	exit original
}
cp $srcdir/fileio.h 826228074/fileio.h
ed 826228074/fileio.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM fileio.h'
28a
#endif
.
27a
#ifdef _PLAN9_SOURCE
#define PGP_SYSTEM_DIR "/lib/pgp/"
#else
.
wq
//GO.SYSIN DD VADIM fileio.h
sum=`{sum < 826228074/fileio.h}
if(~ e63d10dc4923  $sum(1)^$sum(2))
	echo
if not{
	echo 826228074/fileio.h checksum error creating updated file
	exit checksum
}
target=826228074/makefile
echo -n '826228074/makefile: '
if(! test -f $srcdir/makefile || ! test -r $srcdir/makefile){
	echo $srcdir/makefile unreadable
	exit unreadable
}
sum=`{sum < $srcdir/makefile}
if(! ~ a16b56f019247  $sum(1)^$sum(2)){
	echo $srcdir/makefile is not the original distribution file
	exit original
}
cp $srcdir/makefile 826228074/makefile
ed 826228074/makefile >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM makefile'
153a
# Plan 9, for the x86, under the the Ansi/Posix Environment (ape/psh)
plan9-8:
	$(MAKE) all CC=cc LD=cc \
	CFLAGS="$(RSAINCDIR) -DIDEA32 -DUNIX -DPORTABLE -DMAX_NAMELEN=28 \
		-D_BSD_EXTENSION -D_POSIX_SOURCE -D_PLAN9_SOURCE" \
		OBJS_EXT="gettimeofday.o"

.
wq
//GO.SYSIN DD VADIM makefile
sum=`{sum < 826228074/makefile}
if(~ 08cde43019504  $sum(1)^$sum(2))
	echo
if not{
	echo 826228074/makefile checksum error creating updated file
	exit checksum
}
target=826228074/more.c
echo -n '826228074/more.c: '
if(! test -f $srcdir/more.c || ! test -r $srcdir/more.c){
	echo $srcdir/more.c unreadable
	exit unreadable
}
sum=`{sum < $srcdir/more.c}
if(! ~ 4ae91e6711934  $sum(1)^$sum(2)){
	echo $srcdir/more.c is not the original distribution file
	exit original
}
cp $srcdir/more.c 826228074/more.c
ed 826228074/more.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM more.c'
445,461c
    fflush(pgpout);
.
416,439d
406,414d
393,403d
391c
}
.
253,389c
    fflush(pgpout);
    while ((c = fgetc(fp)) != EOF)
	putchar(c);
    fclose(fp);
.
250,251c
    if ((fp = fopen(fn, "r")) == NULL)
.
242,248c
    FILE *fp;
    int c;
.
237,240c
extern FILE *pgpout;

int more_file(char *fn)
.
235d
42,233d
24,40d
22d
2,19c
	If you want "more", you know where to find it.
.
wq
//GO.SYSIN DD VADIM more.c
sum=`{sum < 826228074/more.c}
if(~ 82d2c1d4498  $sum(1)^$sum(2))
	echo
if not{
	echo 826228074/more.c checksum error creating updated file
	exit checksum
}
target=826228074/pgp.c
echo -n '826228074/pgp.c: '
if(! test -f $srcdir/pgp.c || ! test -r $srcdir/pgp.c){
	echo $srcdir/pgp.c unreadable
	exit unreadable
}
sum=`{sum < $srcdir/pgp.c}
if(! ~ 5a924c3b69200  $sum(1)^$sum(2)){
	echo $srcdir/pgp.c is not the original distribution file
	exit original
}
cp $srcdir/pgp.c 826228074/pgp.c
ed 826228074/pgp.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM pgp.c'
1190a
# endif
.
1189a
# endif
# ifdef SIGILL
.
1188a
# endif
# ifdef SIGSEGV
.
1187a
# ifdef SIGTRAP
.
wq
//GO.SYSIN DD VADIM pgp.c
sum=`{sum < 826228074/pgp.c}
if(~ 16b6ff1869271  $sum(1)^$sum(2))
	echo
if not{
	echo 826228074/pgp.c checksum error creating updated file
	exit checksum
}
target=826228074/system.c
echo -n '826228074/system.c: '
if(! test -f $srcdir/system.c || ! test -r $srcdir/system.c){
	echo $srcdir/system.c unreadable
	exit unreadable
}
sum=`{sum < $srcdir/system.c}
if(! ~ 30363a1238303  $sum(1)^$sum(2)){
	echo $srcdir/system.c is not the original distribution file
	exit original
}
cp $srcdir/system.c 826228074/system.c
ed 826228074/system.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM system.c'
38a
#ifdef _PLAN9_SOURCE
#undef UNIX

int ttyctl = -1;
int ttyfd = -1;

void ttycbreak(void)
{
	if (ttyfd == -1) 
		if ((ttyfd = open("/dev/cons", 2)) < 0)
			perror("open /dev/cons");
	if (ttyctl == -1) 
		if ((ttyctl = open("/dev/consctl", 1)) < 0)
			perror("open /dev/consctl");
	if (ttyfd == -1 || ttyctl == -1) {
		fprintf(stderr, "cannot open cons, using stdin\n");
		close(ttyfd); ttyfd = -1;
		close(ttyctl); ttyfd = -1;
		ttyfd = 0;
	} else {
		write(ttyctl, "rawon", 5);
	}
}

void ttynorm(void)
{
	close(ttyctl); ttyctl = -1;
	close(ttyfd); ttyfd = -1;
}

int getch(void)
{
	char c;
	read(ttyfd, &c, 1);
	return(c);
}

#endif

.
wq
//GO.SYSIN DD VADIM system.c
sum=`{sum < 826228074/system.c}
if(~ 8bd32cc338938  $sum(1)^$sum(2))
	echo
if not{
	echo 826228074/system.c checksum error creating updated file
	exit checksum
}
target=826228074/zunzip.h
echo -n '826228074/zunzip.h: '
if(! test -f $srcdir/zunzip.h || ! test -r $srcdir/zunzip.h){
	echo $srcdir/zunzip.h unreadable
	exit unreadable
}
sum=`{sum < $srcdir/zunzip.h}
if(! ~ 8b721d5710483  $sum(1)^$sum(2)){
	echo $srcdir/zunzip.h is not the original distribution file
	exit original
}
cp $srcdir/zunzip.h 826228074/zunzip.h
ed 826228074/zunzip.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM zunzip.h'
123a
#        include <sys/types.h>
.
wq
//GO.SYSIN DD VADIM zunzip.h
sum=`{sum < 826228074/zunzip.h}
if(~ e62ac94e10514  $sum(1)^$sum(2))
	echo
if not{
	echo 826228074/zunzip.h checksum error creating updated file
	exit checksum
}






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-03-07 19:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-03-07 19:54 pgp Scott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).