BSD 4_3_Reno development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Tue, 28 Oct 1986 02:48:14 +0000 (18:48 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Tue, 28 Oct 1986 02:48:14 +0000 (18:48 -0800)
Work on file usr/src/contrib/patch/Makefile.SH
Work on file usr/src/contrib/patch/MANIFEST
Work on file usr/src/contrib/patch/config.H
Work on file usr/src/contrib/patch/version.c
Work on file usr/src/contrib/patch/inp.h
Work on file usr/src/contrib/patch/INTERN.h
Work on file usr/src/contrib/patch/version.h

Synthesized-from: CSRG/cd2/4.3reno

usr/src/contrib/patch/INTERN.h [new file with mode: 0644]
usr/src/contrib/patch/MANIFEST [new file with mode: 0644]
usr/src/contrib/patch/Makefile.SH [new file with mode: 0644]
usr/src/contrib/patch/config.H [new file with mode: 0644]
usr/src/contrib/patch/inp.h [new file with mode: 0644]
usr/src/contrib/patch/version.c [new file with mode: 0644]
usr/src/contrib/patch/version.h [new file with mode: 0644]

diff --git a/usr/src/contrib/patch/INTERN.h b/usr/src/contrib/patch/INTERN.h
new file mode 100644 (file)
index 0000000..8bf16f5
--- /dev/null
@@ -0,0 +1,15 @@
+/* $Header: INTERN.h,v 2.0 86/09/17 15:35:58 lwall Exp $
+ *
+ * $Log:       INTERN.h,v $
+ * Revision 2.0  86/09/17  15:35:58  lwall
+ * Baseline for netwide release.
+ * 
+ */
+
+#undef EXT
+#define EXT
+
+#undef INIT
+#define INIT(x) = x
+
+#define DOINIT
diff --git a/usr/src/contrib/patch/MANIFEST b/usr/src/contrib/patch/MANIFEST
new file mode 100644 (file)
index 0000000..9469576
--- /dev/null
@@ -0,0 +1,23 @@
+After all the patch kits are run you should have the following files:
+
+Filename               Kit Description
+--------               --- -----------
+Configure                1  A shell script that installs everything system dependent.
+EXTERN.h                 1  Toggle .h files to look foreign.
+INTERN.h                 3  Toggle .h files to look domestic.
+MANIFEST                 3  This list of files.
+Makefile.SH              3  The makefile.
+README                   3  Installation instructions.
+common.h                 3  Common definitions.
+config.H                 3  Sample config.h, in case Configure won't run.
+inp.c                    2  Input file abstract data type routines.
+inp.h                    3  Public defs for above.
+patch.c                  2  The patch program.
+patch.man                2  Manual page for patch.
+patchlevel.h             3  The patch level of the patch program.
+pch.c                    1  Patch abstract data type routines.
+pch.h                    3  Public defs for above.
+util.c                   2  Utility routines.
+util.h                   1  Public defs for above.
+version.c                3  Version number routine.
+version.h                3  Public defs for above.
diff --git a/usr/src/contrib/patch/Makefile.SH b/usr/src/contrib/patch/Makefile.SH
new file mode 100644 (file)
index 0000000..718ab70
--- /dev/null
@@ -0,0 +1,87 @@
+case $CONFIG in
+    '') . config.sh ;;
+esac
+echo "Extracting Makefile (with variable substitutions)"
+cat >Makefile <<!GROK!THIS!
+# $Header: Makefile.SH,v 2.0 86/09/17 15:36:15 lwall Exp $
+#
+# $Log:        Makefile.SH,v $
+# Revision 2.0  86/09/17  15:36:15  lwall
+# Baseline for netwide release.
+# 
+# Revision 1.2  86/09/08  14:07:42  lwall
+# Split up patch.c.
+# 
+# Revision 1.1  86/08/01  20:18:35  lwall
+# Initial revision
+# 
+
+CC = $cc
+bin = $bin
+mansrc = $mansrc
+manext = $manext
+CFLAGS = $iandd -O
+LDFLAGS = $iandd
+
+!GROK!THIS!
+cat >>Makefile <<'!NO!SUBS!'
+
+public = patch
+private = 
+manpages = patch.man
+util = Makefile
+
+c = patch.c pch.c inp.c version.c util.c
+
+obj = patch.o pch.o inp.o util.o version.o
+
+lintflags = -phbvxac
+
+addedbyconf = Makefile.old bsd config.h config.sh eunice loc pdp11 usg v7
+
+# grrr
+SHELL = /bin/sh
+
+.c.o:
+       $(CC) -c $(CFLAGS) $*.c
+
+all: $(public) $(private) $(util)
+       touch all
+
+patch: $(obj)
+       $(CC) $(LDFLAGS) $(obj) $(libs) -o patch
+
+# won't work with csh
+install: patch
+       export PATH || exit 1
+       - mv $(bin)/patch $(bin)/patch.old
+       - if test `pwd` != $(bin); then cp $(public) $(bin); fi
+       cd $(bin); chmod 755 $(public)
+       - if test `pwd` != $(mansrc); then \
+for page in $(manpages); do \
+cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
+done; \
+fi
+
+clean:
+       rm -f *.o *.orig core
+
+realclean:
+       rm -f patch *.o *.orig core $(addedbyconf)
+
+# The following lint has practically everything turned on.  Unfortunately,
+# you have to wade through a lot of mumbo jumbo that can't be suppressed.
+# If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
+# for that spot.
+
+lint:
+       lint $(lintflags) $(defs) $(c) > patch.fuzz
+
+patch.o: config.h common.h patch.c inp.h pch.h util.h version.h
+pch.o: config.h common.h pch.c pch.h util.h
+inp.o: config.h common.h inp.c inp.h util.h
+util.o: config.h common.h util.c util.h
+version.o: config.h common.h version.c version.h patchlevel.h util.h
+
+!NO!SUBS!
+$eunicefix Makefile
diff --git a/usr/src/contrib/patch/config.H b/usr/src/contrib/patch/config.H
new file mode 100644 (file)
index 0000000..93cdf03
--- /dev/null
@@ -0,0 +1,33 @@
+/* config.h
+ * This file was produced by running the Configure script.
+ * Feel free to modify any of this as the need arises.
+ */
+
+
+#/*undef       EUNICE          /* no file linking? */
+#/*undef       VMS
+
+#/*undef       index strchr    /* cultural */
+#/*undef       rindex strrchr  /*  differences? */
+
+#/*undef       void int        /* is void to be avoided? */
+
+/* How many register declarations are paid attention to? */
+
+#define Reg1 register
+#define Reg2 register
+#define Reg3 register
+#define Reg4 register
+#define Reg5 register
+#define Reg6 register
+#define Reg7 
+#define Reg8 
+#define Reg9 
+#define Reg10 
+#define Reg11 
+#define Reg12 
+#define Reg13 
+#define Reg14 
+#define Reg15 
+#define Reg16 
+
diff --git a/usr/src/contrib/patch/inp.h b/usr/src/contrib/patch/inp.h
new file mode 100644 (file)
index 0000000..c6d2a91
--- /dev/null
@@ -0,0 +1,18 @@
+/* $Header: inp.h,v 2.0 86/09/17 15:37:25 lwall Exp $
+ *
+ * $Log:       inp.h,v $
+ * Revision 2.0  86/09/17  15:37:25  lwall
+ * Baseline for netwide release.
+ * 
+ */
+
+EXT LINENUM input_lines INIT(0);       /* how long is input file in lines */
+EXT LINENUM last_frozen_line INIT(0);  /* how many input lines have been */
+                                       /* irretractibly output */
+
+bool rev_in_string();
+void scan_input();
+bool plan_a();                 /* returns false if insufficient memory */
+void plan_b();
+char *ifetch();
+
diff --git a/usr/src/contrib/patch/version.c b/usr/src/contrib/patch/version.c
new file mode 100644 (file)
index 0000000..17dfb81
--- /dev/null
@@ -0,0 +1,28 @@
+/* $Header: version.c,v 2.0 86/09/17 15:40:11 lwall Exp $
+ *
+ * $Log:       version.c,v $
+ * Revision 2.0  86/09/17  15:40:11  lwall
+ * Baseline for netwide release.
+ * 
+ */
+
+#include "EXTERN.h"
+#include "common.h"
+#include "util.h"
+#include "INTERN.h"
+#include "patchlevel.h"
+#include "version.h"
+
+/* Print out the version number and die. */
+
+void
+version()
+{
+    extern char rcsid[];
+
+#ifdef lint
+    rcsid[0] = rcsid[0];
+#else
+    fatal3("%s\nPatch level: %d\n", rcsid, PATCHLEVEL);
+#endif
+}
diff --git a/usr/src/contrib/patch/version.h b/usr/src/contrib/patch/version.h
new file mode 100644 (file)
index 0000000..08fe68d
--- /dev/null
@@ -0,0 +1,9 @@
+/* $Header: version.h,v 2.0 86/09/17 15:40:14 lwall Exp $
+ *
+ * $Log:       version.h,v $
+ * Revision 2.0  86/09/17  15:40:14  lwall
+ * Baseline for netwide release.
+ * 
+ */
+
+void version();