[comp.sources.unix] v22i105: MIT Athena delete/undelete programs, release 2, Patch10

rsalz@uunet.uu.net (Rich Salz) (06/08/90)

Submitted-by: "Jonathan I. Kamens" <jik@pit-manager.mit.edu>
Posting-number: Volume 22, Issue 105
Archive-name: undel2/patch10
Patch-To: volume22/undel2

[  DON'T PANIC!  The undel2 posting earlier in this volume was at
   patchlevel 9.  --r$  ]

  The following is official patch number 10 to the "undel" package
recently posted to comp.sources.unix.  Please apply it.

  Unshar the shar below, and feed the resulting file to patch with
your current working directory set to the directory in which your
undel sources reside.

  This patch accomplishes the following:

1. The README file is updated.
2. The Makefile is updated to make it easier to customize for other
   sites.
3. Several modifications are made in order to accommodate System V
   environments better.
4. A couple of files have some debugging code added to them.

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710

#! /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:  delete.patch10
# Wrapped by jik@pit-manager on Fri Jun  8 00:13:30 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'delete.patch10' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'delete.patch10'\"
else
echo shar: Extracting \"'delete.patch10'\" \(27287 characters\)
sed "s/^X//" >'delete.patch10' <<'END_OF_FILE'
X*** /tmp/,RCSt1018872	Fri Jun  8 00:10:39 1990
X--- README	Thu Jun  7 22:56:38 1990
X***************
X*** 16,34 ****
X  
X  			 SUPPORTED PLATFORMS
X  
X! I've personally compiled these sources under 4.3BSD on VAXen and IBM
X! RT/PC's, under Mach on the NeXT Machine, under Ultrix on the
X! DECstation 3100, and under SunOS 4.0, and I assume they should compile
X! with minimal trouble on other architectures.  If you make it compile
X! on another platform and you have to make changes, please send me
X! patches.
X  
X  
X  			 WHAT YOU NEED TO DO
X  
X! 1. Compile the com_err library (see below for more details) found in
X!    the sub-directory et, and install it if you want to (you'll have to
X!    modify the delete Makefile a bit if you don't).
X  
X  2. Edit the Makefile to fit your site.  See below for details.
X  
X--- 16,36 ----
X  
X  			 SUPPORTED PLATFORMS
X  
X! I've personally compiled these sources under Vax 4.3BSD, IBM AOS 4.3,
X! Mach on the NeXT Machine (with the "-bsd" flag to the compiler),
X! Ultrix 3.1 on the DECstation 3100, SunOS 4.0, A/UX, and HP-UX, and I
X! assume they should compile with minimal trouble on other architectures
X! (However, I've been told that there may be some problems compiling on
X! POSIX-compliant architectures; they're being worked on.).  If you make
X! it compile on another platform and you have to make changes, please
X! send me patches.
X  
X  
X  			 WHAT YOU NEED TO DO
X  
X! 1. Compile the com_err library (see below for more details) and
X!    install it if you want to (you'll have to modify the delete
X!    Makefile a bit if you don't).
X  
X  2. Edit the Makefile to fit your site.  See below for details.
X  
X***************
X*** 45,83 ****
X  1. Change the install binary directory and install man page directory
X     (and possibly man section).
X  
X! 2. Change the "-I/usr/include" to point to the et subdirectory if you
X!    have not installed the com_err header file in a standard location,
X!    or to wherever you have installed it.  Change the COMPILE_ET
X!    variable to use et/compile_et if you haven't installed the
X!    compile_et utility.  Change the -L/usr/athena/lib flag to point to
X!    wherever you have installed the library, or to the et subdirectory
X!    if you have not.
X  
X! 3. Deal with the AFS_MOUNTPOINTS flag, which specifies whether
X!    undelete, expunge and lsdel will check for Andrew File System mount
X!    points in addition to standard Unix mount points.
X  
X!    a. If you undefine it, remove the -I and -L flags that point to AFS
X!       includes and libraries, and remove the "-lsys" from the LIBS
X!       variable.
X  
X-    b. If you leave it defined, change the -I and -L flags to point to
X-       wherever you keep your AFS includes and libraries.
X  
X- 
X  			   COM_ERR LIBRARY
X  
X! This is the second release of this package.  Unlike the first release,
X! this release requires (for error-handling) a library called com_err,
X! which was written by members of the MIT Student Information Processing
X! Board (SIPB).  Along with that library comes a utility called
X! compile_et.  The sources to the com_err library and compile_et are
X! included with the sources to the delete package; you should compile
X! them and then either install them in a "standard location" on your
X! machine or modify the delete Makefile so that it knows where they are.
X! The delete Makefile does not compile them by default, since they are
X! already compiled and installed at Athena, so you should compile and
X! install them separately from delete etc.
X  
X  The files texinfo.tex and com_err.texinfo in the et sources are
X  compressed and uuencoded because they have control characters in them.
X--- 47,78 ----
X  1. Change the install binary directory and install man page directory
X     (and possibly man section).
X  
X! 2. Change the ETINCS and ETLDFLAGS variables to point to the right
X!    place.  Also, change the COMPILE_ET variable to point to a
X!    compile_et executable if you haven't installed it somewhere in your
X!    search path.
X  
X! 3. If your system is SYSV-like (e.g. it uses strchr and strrchr
X!    instead of index and rindex, or it has memcpy and doesn't have
X!    bcopy), and your compile doesn't define the symbol SYSV
X!    automatically, then put "-DSYSV" in the DEFINES variable.
X  
X! 4. You probably won't want to include AFS support, in which case you
X!    should empty all the variables starting with "AFS".  If you do want
X!    to support AFS, then set the variables appropriately.
X  
X  
X  			   COM_ERR LIBRARY
X  
X! In order to compile delete, you need to get your hands on the com_err
X! package, which was written by members of the MIT Student Information
X! Processing Board (SIPB); it should be archived in the same place
X! delete is.  You should compile the library and compile_et utility that
X! comes with it and then either install them in a "standard location" on
X! your machine or modify the delete Makefile so that it knows where they
X! are.  The delete Makefile does not compile them by default, since they
X! are already compiled and installed at Athena, so you should compile
X! and install them separately from delete etc.
X  
X  The files texinfo.tex and com_err.texinfo in the et sources are
X  compressed and uuencoded because they have control characters in them.
X***************
X*** 85,116 ****
X  of them is necessary for just building the library and using it to
X  build delete et al -- they are just documentation about the library.
X  
X- The version of the com_err library I've included here is "in flux" --
X- its authors tell me that several enhancements are planned for the near
X- future.  When the library is worked into a more final form, it will
X- probably be distributed (to comp.sources.unix, etc.) separately from
X- delete.
X  
X- 
X  			     FINAL NOTES
X- 
X- The final patch level used for the first release of this package was
X- patch level 2.  Since this is a whole new release, and there were some
X- unofficial patches here and there during the life of the first
X- release, I upped the patch level to 5 for the first distribution of
X- the second release of the delete package.
X- 
X- There were NO REAL PATCHES numbered 3, 4, or 5 -- I simply chose to
X- jump from 2 to 5 when issuing a new release.  Therefore, if you have
X- delete sources with a patch level less than 5, you will need to get a
X- whole new copy of the sources.
X- 
X- In other words, treat patch level 5 as patch level 0 for all intents
X- and purposes (gee, tha sounds stupid, but you get the idea :-).  See
X- the file PATCHLEVEL in the sources to find out what patch level of the
X- sources you currently have in your position (if you're reading this
X- README file out of a source distribution, you almost definitely have
X- patch level 6 or later).
X  
X  As usual, suggestions and bug fixes are always welcomed.
X  
X--- 80,87 ----
X*** /tmp/,RCSt1018879	Fri Jun  8 00:10:46 1990
X--- Makefile	Thu Jun  7 23:37:59 1990
X***************
X*** 5,11 ****
X  #
X  #     $Source: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v $
X  #     $Author: jik $
X! #     $Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v 1.17 89/12/20 15:14:34 jik Exp $
X  #
X  
X  DESTDIR=
X--- 5,11 ----
X  #
X  #     $Source: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v $
X  #     $Author: jik $
X! #     $Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v 1.22 90/06/07 23:36:17 jik Exp $
X  #
X  
X  DESTDIR=
X***************
X*** 16,30 ****
X  CC= 		cc
X  COMPILE_ET= 	compile_et
X  LINT= 		lint
X! DEFINES=	-DAFS_MOUNTPOINTS
X! INCLUDES=	-I/usr/include\
X! 		-I/afs/athena.mit.edu/astaff/project/afsdev/build/$(MACHINE)/include
X  CFLAGS= 	-O $(INCLUDES) $(DEFINES) $(CDEBUGFLAGS)
X! LDFLAGS=	-L/usr/athena/lib\
X! 		-L/afs/athena.mit.edu/astaff/project/afsdev/build/$(MACHINE)/lib/afs
X! LIBS= 		-lcom_err -lsys
X! LINTFLAGS=	$(DEFINES) $(INCLUDES) $(CDEBUGFLAGS) -u
X  LINTLIBS=	
X  SRCS= 		delete.c undelete.c directories.c pattern.c util.c\
X  		expunge.c lsdel.c col.c shell_regexp.c\
X  		errors.c stack.c
X--- 16,55 ----
X  CC= 		cc
X  COMPILE_ET= 	compile_et
X  LINT= 		lint
X! DEFINES=	$(AFSDEFINES)
X! 
X! 
X! # These variables apply only if you want this program to recognize
X! # Andrew File System mount points.  If you don't want to support AFS,
X! # then set all the variables starting with "AFS" to nothing.
X! AFSBLD=		bld
X! AFSINC=		/afs/athena.mit.edu/astaff/project/afsdev/sandbox/$(AFSBLD)/dest/include
X! AFSLIB=		/afs/athena.mit.edu/astaff/project/afsdev/sandbox/$(AFSBLD)/dest/lib
X! AFSINCS=	-I$(AFSINC)
X! AFSLDFLAGS=	-L$(AFSLIB) -L$(AFSLIB)/afs
X! AFSLIBS=	-lsys -lrx -llwp $(AFSLIB)/afs/util.a
X! AFSDEFINES=	-DAFS_MOUNTPOINTS
X! 
X! 
X! # ETINCS is a -I flag pointing to the directory in which the et header
X! # files are stored. 
X! # ETLDFLAGS is a -L flag pointing to the directory where the et
X! # library is stored.
X! # ETLIBS lists the et libraries we want to link against
X! ETINCS=		-I/usr/include
X! ETLDFLAGS=	-L/usr/athena/lib
X! ETLIBS=		-lcom_err
X! 
X! 
X! # You probably won't have to edit anything below this line.
X! 
X! INCLUDES=	$(ETINCS) $(AFSINCS)
X! LDFLAGS=	$(ETLDFLAGS) $(AFSLDFLAGS) 
X! LIBS= 		$(ETLIBS) $(AFSLIBS)
X  CFLAGS= 	-O $(INCLUDES) $(DEFINES) $(CDEBUGFLAGS)
X! LINTFLAGS=	-u $(INCLUDES) $(DEFINES) $(CDEBUGFLAGS)
X  LINTLIBS=	
X+ 
X  SRCS= 		delete.c undelete.c directories.c pattern.c util.c\
X  		expunge.c lsdel.c col.c shell_regexp.c\
X  		errors.c stack.c
X***************
X*** 37,48 ****
X  MANS= 		man1/delete.1 man1/expunge.1 man1/lsdel.1 man1/purge.1\
X  		man1/undelete.1
X  
X! ETLIBSRCS=	et/Makefile et/com_err.3 et/compile_et.1\
X! 		et/com_err.texinfo.Z.uu et/error_table.y et/et_lex.lex.l\
X! 		et/texinfo.tex.Z.uu et/*.c et/*.h et/*.et
X! ARCHIVE=	README Makefile PATCHLEVEL $(SRCS) $(INCS) $(ETSRCS)\
X! 		$(MANS) 
X! ARCHIVEDIRS= 	man1 et et/profiled
X  
X  DELETEOBJS= 	delete.o util.o delete_errs.o errors.o
X  UNDELETEOBJS= 	undelete.o directories.o util.o pattern.o\
X--- 62,70 ----
X  MANS= 		man1/delete.1 man1/expunge.1 man1/lsdel.1 man1/purge.1\
X  		man1/undelete.1
X  
X! ARCHIVE=	README Makefile PATCHLEVEL $(SRCS) $(INCS) $(MANS)\
X! 		$(ETSRCS)
X! ARCHIVEDIRS= 	man1
X  
X  DELETEOBJS= 	delete.o util.o delete_errs.o errors.o
X  UNDELETEOBJS= 	undelete.o directories.o util.o pattern.o\
X***************
X*** 138,144 ****
X  	tar cvf - $(ARCHIVE) $(ETLIBSRCS) | compress > delete.tar.Z
X  
X  shar: $(ARCHIVE)
X! 	makekit -oMANIFEST -h2 MANIFEST $(ARCHIVEDIRS) $(ARCHIVE) $(ETLIBSRCS)
X  
X  patch: $(ARCHIVE)
X  	makepatch $(ARCHIVE)
X--- 160,166 ----
X  	tar cvf - $(ARCHIVE) $(ETLIBSRCS) | compress > delete.tar.Z
X  
X  shar: $(ARCHIVE)
X! 	makekit -oMANIFEST $(ARCHIVEDIRS) $(ARCHIVE) $(ETLIBSRCS)
X  
X  patch: $(ARCHIVE)
X  	makepatch $(ARCHIVE)
X*** /tmp/,RCSt1018886	Fri Jun  8 00:10:52 1990
X--- PATCHLEVEL	Fri Jun  8 00:09:29 1990
X***************
X*** 1 ****
X! 9
X--- 1 ----
X! 10
X*** /tmp/,RCSt1018893	Fri Jun  8 00:10:58 1990
X--- delete.c	Thu Jun  7 19:17:25 1990
X***************
X*** 11,17 ****
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_delete_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/delete.c,v 1.21 89/12/15 04:39:22 jik Exp $";
X  #endif
X  
X  #include <sys/types.h>
X--- 11,17 ----
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_delete_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/delete.c,v 1.22 90/06/06 19:06:17 jik Exp $";
X  #endif
X  
X  #include <sys/types.h>
X***************
X*** 18,24 ****
X--- 18,30 ----
X  #include <stdio.h>
X  #include <sys/stat.h>
X  #include <sys/dir.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif /* SYSV */
X  #include <sys/param.h>
X  #include <sys/file.h>
X  #include <errno.h>
X*** /tmp/,RCSt1018900	Fri Jun  8 00:11:04 1990
X--- undelete.c	Thu Jun  7 19:17:41 1990
X***************
X*** 11,17 ****
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_undelete_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/undelete.c,v 1.19 89/12/15 04:39:31 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X--- 11,17 ----
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_undelete_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/undelete.c,v 1.20 90/06/06 19:06:43 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X***************
X*** 18,24 ****
X--- 18,30 ----
X  #include <sys/types.h>
X  #include <sys/dir.h>
X  #include <sys/param.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif /* SYSV */
X  #include <sys/stat.h>
X  #include <com_err.h>
X  #include <errno.h>
X*** /tmp/,RCSt1018907	Fri Jun  8 00:11:10 1990
X--- directories.c	Thu Jun  7 19:17:27 1990
X***************
X*** 11,17 ****
X   */
X  
X  #if !defined(lint) && !defined(SABER)
X!      static char rcsid_directories_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/directories.c,v 1.15 89/11/22 21:32:24 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X--- 11,17 ----
X   */
X  
X  #if !defined(lint) && !defined(SABER)
X!      static char rcsid_directories_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/directories.c,v 1.16 90/06/06 19:06:24 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X***************
X*** 19,25 ****
X--- 19,31 ----
X  #include <sys/stat.h>
X  #include <sys/param.h>
X  #include <sys/dir.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif /* SYSV */
X  #include <errno.h>
X  #include <com_err.h>
X  #include "delete_errs.h"
X*** /tmp/,RCSt1018914	Fri Jun  8 00:11:18 1990
X--- pattern.c	Thu Jun  7 22:33:55 1990
X***************
X*** 11,17 ****
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_pattern_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/pattern.c,v 1.16 90/01/11 04:11:58 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X--- 11,17 ----
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_pattern_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/pattern.c,v 1.18 90/06/07 22:33:45 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X***************
X*** 18,24 ****
X--- 18,30 ----
X  #include <sys/types.h>
X  #include <sys/dir.h>
X  #include <sys/param.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif /* SYSV */
X  #include <sys/stat.h>
X  #include <errno.h>
X  #include <com_err.h>
X***************
X*** 410,415 ****
X--- 416,424 ----
X       char first[MAXNAMLEN], rest[MAXPATHLEN];
X       int retval;
X       int strsize;
X+ #ifdef PATTERN_DEBUG
X+      int j;
X+ #endif
X       
X  #ifdef DEBUG
X       printf("do_match: looking for %s\n", name);
X***************
X*** 429,434 ****
X--- 438,446 ----
X       if (! *found) {
X  	  set_error(errno);
X  	  error("Malloc");
X+ #ifdef PATTERN_DEBUG
X+ 	  fprintf(stderr, "do_match: return 1.\n");
X+ #endif
X  	  return error_code;
X       }
X       *num_found = 0;
X***************
X*** 437,442 ****
X--- 449,457 ----
X       if (! dirp) {
X  	  set_error(errno);
X  	  error(base);
X+ #ifdef PATTERN_DEBUG
X+ 	  fprintf(stderr, "do_match: return 2.\n");
X+ #endif
X  	  return error_code;
X       }
X       (void) strcpy(first, firstpart(name, rest));
X***************
X*** 445,453 ****
X--- 460,474 ----
X  	  if (retval) {
X  	       error("add_str");
X  	       (void) popall();
X+ #ifdef PATTERN_DEBUG
X+ 	       fprintf(stderr, "do_match: return 3.\n");
X+ #endif
X  	       return retval;
X  	  }
X  	  (*num_found)++;
X+ #ifdef PATTERN_DEBUG
X+ 	  fprintf(stderr, "do_match: return 4.\n");
X+ #endif
X  	  return 0;
X       }
X       
X***************
X*** 456,461 ****
X--- 477,486 ----
X  	  if (! dp) goto updir;
X  
X  	  retval = reg_cmp(first, dp->d_name);
X+ #ifdef PATTERN_DEBUG
X+ 	fprintf(stderr, "do_match: comparing %s to %s returns %d.\n",
X+ 		first, dp->d_name, retval);
X+ #endif
X  	  if (retval < 0) {
X  	       error("reg_cmp");
X  	       goto updir;
X***************
X*** 465,470 ****
X--- 490,500 ----
X  
X  	  if (is_deleted(dp->d_name) && match_deleted) {
X  	       retval = reg_cmp(first, &dp->d_name[2]);
X+ #ifdef PATTERN_DEBUG
X+ 	       fprintf(stderr,
X+ 		       "do_match: deleted compare of %s to %s returns %d.\n",
X+ 		       first, &dp->d_name[2], retval);
X+ #endif
X  	       if (retval < 0) {
X  		    error("reg_cmp");
X  		    goto updir;
X***************
X*** 479,490 ****
X--- 509,529 ----
X  	       continue;
X  
X       downdir:
X+ #ifdef PATTERN_DEBUG
X+ 	  fprintf(stderr, "do_match: downdir\n");
X+ #endif
X  	  retval = push(&dirp, sizeof(DIR *));
X  	  if (retval) {
X  	       error("push");
X  	       (void) popall();
X+ #ifdef PATTERN_DEBUG
X+ 	       fprintf(stderr, "do_match: return 5.\n");
X+ #endif
X  	       return retval;
X  	  }
X+ #ifdef PATTERN_DEBUG
X+ 	  fprintf(stderr, "do_match: pushing %s, %s, %s\n", first, rest, base);
X+ #endif
X  	  string_push(first);
X  	  string_push(rest);
X  	  string_push(base);
X***************
X*** 497,502 ****
X--- 536,544 ----
X  			 if (retval) {
X  			      error("add_str");
X  			      (void) popall();
X+ #ifdef PATTERN_DEBUG
X+ 			      fprintf(stderr, "do_match: return 6.\n");
X+ #endif
X  			      return retval;
X  			 }
X  			 (*num_found)++;
X***************
X*** 507,512 ****
X--- 549,557 ----
X  		    if (retval) {
X  			 error("add_str");
X  			 (void) popall();
X+ #ifdef PATTERN_DEBUG
X+ 			 fprintf(stderr, "do_match: return 7.\n");
X+ #endif
X  			 return retval;
X  		    }
X  		    (*num_found)++;
X***************
X*** 514,519 ****
X--- 559,568 ----
X  	       string_pop(base);
X  	       string_pop(rest);
X  	       string_pop(first);
X+ #ifdef PATTERN_DEBUG
X+ 	       fprintf(stderr, "do_match: popped %s, %s, %s\n", first,
X+ 		       rest, base);
X+ #endif
X  	       (void) pop(&dirp, sizeof(DIR *));
X  	       continue;
X  	  }
X***************
X*** 527,532 ****
X--- 576,585 ----
X  	       string_pop(base);
X  	       string_pop(rest);
X  	       string_pop(first);
X+ #ifdef PATTERN_DEBUG
X+ 	       fprintf(stderr, "do_match: popped %s, %s, %s\n", first,
X+ 		       rest, base);
X+ #endif
X  	       (void) pop(&dirp, sizeof(DIR *));
X  	       continue;
X  	  }
X***************
X*** 534,555 ****
X--- 587,631 ----
X  	       continue;
X  
X       updir:
X+ #ifdef PATTERN_DEBUG
X+ 	  fprintf(stderr, "do_match: updir\n");
X+ #endif
X  	  closedir(dirp);
X  	  string_pop(base);
X+ #ifdef PATTERN_DEBUG
X+ 	  fprintf(stderr, "do_match: popped %s\n", base);
X+ #endif
X  	  if (retval) {
X  	       if (retval != STACK_EMPTY) {
X  		    error("pop");
X  		    (void) popall();
X+ #ifdef PATTERN_DEBUG
X+ 		    fprintf(stderr, "do_match: return 8.\n");
X+ #endif
X  		    return retval;
X  	       }
X+ #ifdef PATTERN_DEBUG
X+ 	       fprintf(stderr, "Returning %d word%s from do_match:\n",
X+ 		       *num_found,
X+ 		       *num_found == 1 ? "" : "s");
X+ 	       for (j = 0; j < *num_found; j++)
X+ 		    fprintf(stderr, "\t%s\n", (*found)[j]);
X+ 	       fprintf(stderr, "do_match: return 9.\n");
X+ #endif
X  	       return 0;
X  	  }
X  	  string_pop(rest);
X  	  string_pop(first);
X+ #ifdef PATTERN_DEBUG
X+ 	  fprintf(stderr, "do_match: popped %s, %s\n", rest, first);
X+ #endif
X  	  retval = pop(&dirp, sizeof(DIR *));
X  	  if (retval) {
X  	       error("pop");
X  	       (void) popall();
X+ #ifdef PATTERN_DEBUG
X+ 	       fprintf(stderr, "do_match: return 10.\n");
X+ #endif
X  	       return retval;
X  	  }
X  	  continue;
X*** /tmp/,RCSt1018921	Fri Jun  8 00:11:28 1990
X--- util.c	Thu Jun  7 19:17:42 1990
X***************
X*** 11,25 ****
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_util_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/util.c,v 1.15 90/01/11 03:47:11 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X  #include <sys/param.h>
X  #include <sys/types.h>
X  #include <sys/stat.h>
X  #include <sys/dir.h>
X  #include <strings.h>
X  #include <pwd.h>
X  #include <errno.h>
X  #ifdef AFS_MOUNTPOINTS
X--- 11,34 ----
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_util_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/util.c,v 1.17 90/06/07 13:05:30 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X  #include <sys/param.h>
X  #include <sys/types.h>
X+ #ifdef SYSV /* SYSV doesn't define uid_t */
X+ typedef unsigned short uid_t;
X+ #endif
X  #include <sys/stat.h>
X  #include <sys/dir.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif /* SYSV */
X  #include <pwd.h>
X  #include <errno.h>
X  #ifdef AFS_MOUNTPOINTS
X*** /tmp/,RCSt1018928	Fri Jun  8 00:11:36 1990
X--- expunge.c	Thu Jun  7 19:17:30 1990
X***************
X*** 11,17 ****
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_expunge_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/expunge.c,v 1.13 89/12/28 14:45:15 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X--- 11,17 ----
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_expunge_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/expunge.c,v 1.14 90/06/06 19:06:29 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X***************
X*** 19,25 ****
X--- 19,31 ----
X  #include <sys/time.h>
X  #include <sys/dir.h>
X  #include <sys/param.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif /* SYSV */
X  #include <sys/stat.h>
X  #include <com_err.h>
X  #include <errno.h>
X*** /tmp/,RCSt1018935	Fri Jun  8 00:11:43 1990
X--- lsdel.c	Thu Jun  7 22:31:48 1990
X***************
X*** 11,17 ****
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_lsdel_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/lsdel.c,v 1.9 89/11/22 21:31:08 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X--- 11,17 ----
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_lsdel_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/lsdel.c,v 1.11 90/06/07 22:31:31 jik Exp $";
X  #endif
X  
X  #include <stdio.h>
X***************
X*** 19,25 ****
X--- 19,34 ----
X  #include <sys/dir.h>
X  #include <sys/param.h>
X  #include <sys/stat.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif /* SYSV */
X+ #ifdef _AUX_SOURCE
X+ extern char *strcmp();
X+ #endif
X  #include <errno.h>
X  #include <com_err.h>
X  #include "col.h"
X*** /tmp/,RCSt1018942	Fri Jun  8 00:11:51 1990
X--- col.c	Thu Jun  7 19:17:24 1990
X***************
X*** 11,17 ****
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_col_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/col.c,v 1.6 89/11/22 21:24:21 jik Exp $";
X  #endif
X  
X  /*
X--- 11,17 ----
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_col_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/col.c,v 1.7 90/06/06 19:05:56 jik Exp $";
X  #endif
X  
X  /*
X***************
X*** 21,27 ****
X--- 21,33 ----
X   */
X  
X  #include <stdio.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif /* SYSV */
X  #include "errors.h"
X  #include "delete_errs.h"
X  #include "col.h"
X*** /tmp/,RCSt1018963	Fri Jun  8 00:12:07 1990
X--- stack.c	Thu Jun  7 22:35:00 1990
X***************
X*** 11,17 ****
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_stack_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/stack.c,v 1.5 89/12/11 03:32:37 jik Exp $";
X  #endif
X  
X  #include <sys/types.h>
X--- 11,17 ----
X   */
X  
X  #if (!defined(lint) && !defined(SABER))
X!      static char rcsid_stack_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/stack.c,v 1.7 90/06/07 22:34:48 jik Exp $";
X  #endif
X  
X  #include <sys/types.h>
X***************
X*** 36,42 ****
X  {
X       static caddr_t stack = (caddr_t) NULL;
X       static int size = 0, count = 0;
X! 
X       switch (op) {
X       case EMPTY_STACK:
X  	  if (size) {
X--- 36,42 ----
X  {
X       static caddr_t stack = (caddr_t) NULL;
X       static int size = 0, count = 0;
X!      
X       switch (op) {
X       case EMPTY_STACK:
X  	  if (size) {
X***************
X*** 44,53 ****
X  	       stack = (caddr_t) NULL;
X  	       size = count = 0;
X  	  }
X  	  return 0;
X       case STACK_PUSH:
X! 	  if (bytes == 0)
X  	       return 0;
X  	  if (size - count < bytes) {
X  	       do
X  		    size += STACK_INC;
X--- 44,61 ----
X  	       stack = (caddr_t) NULL;
X  	       size = count = 0;
X  	  }
X+ #ifdef STACK_DEBUG
X+ 	  fprintf(stderr, "dostack: return 1 (EMPTY_STACK).\n");
X+ #endif
X  	  return 0;
X       case STACK_PUSH:
X! 	  if (bytes == 0) {
X! #ifdef STACK_DEBUG
X! 	       fprintf(stderr, "Pushing 0 bytes at %d offset.\n", count);
X! 	       fprintf(stderr, "dostack: return 2 (STACK_PUSH).\n");
X! #endif
X  	       return 0;
X+ 	  }
X  	  if (size - count < bytes) {
X  	       do
X  		    size += STACK_INC;
X***************
X*** 59,75 ****
X  		    size = count = 0;
X  		    set_error(errno);
X  		    error("Malloc");
X  		    return error_code;
X  	       }
X  	  }
X  	  bcopy(data, stack + count, bytes);
X  	  count += bytes;
X  	  return 0;
X       case STACK_POP:
X! 	  if (bytes == 0)
X  	       return 0;
X  	  if (count == 0) {
X  	       set_status(STACK_EMPTY);
X  	       return error_code;
X  	  }
X  	  else {
X--- 67,104 ----
X  		    size = count = 0;
X  		    set_error(errno);
X  		    error("Malloc");
X+ #ifdef STACK_DEBUG
X+ 		    fprintf(stderr, "dostack: return 3 (STACK_PUSH).\n");
X+ #endif
X  		    return error_code;
X  	       }
X  	  }
X+ #ifdef STACK_DEBUG
X+ 	  fprintf(stderr, "Pushing %d bytes at %d offset.\n", bytes, count);
X+ #endif
X+ #if defined(SYSV) || (defined(__STDC__) && !defined(__HIGHC__))
X+ 	  memcpy(stack + count, data, bytes);
X+ #else
X  	  bcopy(data, stack + count, bytes);
X+ #endif
X  	  count += bytes;
X+ #ifdef STACK_DEBUG
X+ 	  fprintf(stderr, "dostack: return 4 (STACK_PUSH).\n");
X+ #endif
X  	  return 0;
X       case STACK_POP:
X! 	  if (bytes == 0) {
X! #ifdef STACK_DEBUG
X! 	       fprintf(stderr, "Popping 0 bytes at %d offset.\n", count);
X! 	       fprintf(stderr, "dostack: return 5 (STACK_POP).\n");
X! #endif
X  	       return 0;
X+ 	  }
X  	  if (count == 0) {
X  	       set_status(STACK_EMPTY);
X+ #ifdef STACK_DEBUG
X+ 	       fprintf(stderr, "dostack: return 6 (STACK_POP).\n");
X+ #endif
X  	       return error_code;
X  	  }
X  	  else {
X***************
X*** 76,82 ****
X--- 105,119 ----
X  	       int newblocks, newsize;
X  
X  	       count -= bytes;
X+ #ifdef STACK_DEBUG
X+ 	       fprintf(stderr, "Popping %d bytes at %d offset.\n", bytes,
X+ 		       count);
X+ #endif
X+ #if defined(SYSV) || (defined(__STDC__) && !defined(__HIGHC__))
X+ 	       memcpy(data, stack + count, bytes);
X+ #else
X  	       bcopy(stack + count, data, bytes);
X+ #endif
X  	       newblocks = count / STACK_INC + ((count % STACK_INC) ? 1 : 0);
X  	       newsize = newblocks * STACK_INC;
X  	       if (newsize < size) {
X***************
X*** 85,97 ****
X--- 122,143 ----
X  		    if (! stack) {
X  			 set_error(errno);
X  			 error("realloc");
X+ #ifdef STACK_DEBUG
X+ 			 fprintf(stderr, "dostack: return 7 (STACK_POP).\n");
X+ #endif
X  			 return error_code;
X  		    }
X  	       }
X+ #ifdef STACK_DEBUG
X+ 	       fprintf(stderr, "dostack: return 8 (STACK_POP).\n");
X+ #endif
X  	       return 0;
X  	  }
X       default:
X  	  set_error(STACK_BAD_OP);
X+ #ifdef STACK_DEBUG
X+ 	  fprintf(stderr, "dostack: return 9.\n");
X+ #endif
X  	  return error_code;
X       }
X  }
END_OF_FILE
if test 27287 -ne `wc -c <'delete.patch10'`; then
    echo shar: \"'delete.patch10'\" unpacked with wrong size!
fi
# end of 'delete.patch10'
fi
echo shar: End of shell archive.
exit 0

exit 0 # Just in case...
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.