diff -c3 -r rdist-6.1.3/Makefile.local rdist-6.1.3.LOCAL_MODS/Makefile.local
*** rdist-6.1.3/Makefile.local	Mon Feb  5 10:50:27 1996
--- rdist-6.1.3.LOCAL_MODS/Makefile.local	Wed Mar 26 14:33:05 1997
***************
*** 8,14 ****
  # BIN_DIR variable, you would uncomment the following line
  # or add your own line.
  #
! #BIN_DIR	= /usr/bin
  
  #
  # Add any local definitions you want pass to the compiler to DEFS_LOCAL
--- 8,14 ----
  # BIN_DIR variable, you would uncomment the following line
  # or add your own line.
  #
! BIN_DIR	= /usr/local/bin
  
  #
  # Add any local definitions you want pass to the compiler to DEFS_LOCAL
***************
*** 40,52 ****
  # Set a site specific install program to use.  Must support BSD style
  # install(1) arguments.
  #
! #INSTALL		= install
  
  #
  # Site specific Man Page configuration.
  #
! #MAN_1_DIR	= /usr/local/man/man1
! #MAN_8_DIR	= /usr/local/man/man8
! #MAN_OWNER	= bin
! #MAN_GROUP	= bin
! #MAN_MODE	= 644
--- 40,52 ----
  # Set a site specific install program to use.  Must support BSD style
  # install(1) arguments.
  #
! INSTALL		= /usr/local/gnu/bin/install
  
  #
  # Site specific Man Page configuration.
  #
! MAN_1_DIR	= /usr/local/man/man1
! MAN_8_DIR	= /usr/local/man/man8
! MAN_OWNER	= bin
! MAN_GROUP	= bin
! MAN_MODE	= 644
Only in rdist-6.1.3.LOCAL_MODS/src: child.o
diff -c3 -r rdist-6.1.3/src/client.c rdist-6.1.3.LOCAL_MODS/src/client.c
*** rdist-6.1.3/src/client.c	Wed Feb 28 12:34:29 1996
--- rdist-6.1.3.LOCAL_MODS/src/client.c	Wed Mar 26 15:08:39 1997
***************
*** 509,521 ****
  			(void) sprintf(ptarget, "%s%s", 
  				       (ptarget[-1] == '/' ? "" : "/"), s);
  			debugmsg(DM_MISC, "check %s\n", target);
! 			if (except(target))
! 				(void) sendcmd(CC_NO, NULL);
! 			else if (lstat(target, &stb) < 0) {
! 				if (sendcmd(CC_YES, NULL) == 0)
! 					didupdate = 1;
! 			} else
  				(void) sendcmd(CC_NO, NULL);
  			break;
  
  		case CC_END:
--- 509,523 ----
  			(void) sprintf(ptarget, "%s%s", 
  				       (ptarget[-1] == '/' ? "" : "/"), s);
  			debugmsg(DM_MISC, "check %s\n", target);
! 			if (lstat(target, &stb) < 0) {
! 			    if (except(target,NULL)) {
  				(void) sendcmd(CC_NO, NULL);
+ 			    } else if (sendcmd(CC_YES, NULL) == 0) {
+ 				didupdate = 1;
+ 			    }
+ 			} else {
+ 			    (void) sendcmd(CC_NO, NULL);
+ 			}
  			break;
  
  		case CC_END:
***************
*** 1029,1039 ****
  
  	debugmsg(DM_CALL, "sendit(%s, 0x%x) called\n", rname, opts);
  
- 	if (except(target))
- 		return(0);
- 
  	if (dostat(target, &stb, opts) < 0)
  		return(-1);
  
  	/*
  	 * Does rname need updating?
--- 1031,1041 ----
  
  	debugmsg(DM_CALL, "sendit(%s, 0x%x) called\n", rname, opts);
  
  	if (dostat(target, &stb, opts) < 0)
  		return(-1);
+ 
+ 	if (except(target,&stb))
+ 		return(0);
  
  	/*
  	 * Does rname need updating?
Only in rdist-6.1.3.LOCAL_MODS/src: client.o
Only in rdist-6.1.3.LOCAL_MODS/src: common.o
Only in rdist-6.1.3.LOCAL_MODS/src: distopt.o
diff -c3 -r rdist-6.1.3/src/docmd.c rdist-6.1.3.LOCAL_MODS/src/docmd.c
*** rdist-6.1.3/src/docmd.c	Mon Jan 29 18:30:10 1996
--- rdist-6.1.3.LOCAL_MODS/src/docmd.c	Wed Mar 26 15:11:40 1997
***************
*** 667,680 ****
  
  	debugmsg(DM_CALL, "cmptime(%s)", name);
  
- 	if (except(name))
- 		return;
- 
- 	if (nflag) {
- 		(void) printf("comparing dates: %s\n", name);
- 		return;
- 	}
- 
  	/*
  	 * first time cmptime() is called?
  	 */
--- 667,672 ----
***************
*** 690,703 ****
--- 682,706 ----
  		return;
  	}
  
+ 	if (except(name,&stb))
+ 		return;
+ 
+ 	if (nflag) {
+ 		(void) printf("comparing dates: %s\n", name);
+ 		return;
+ 	}
+ 
  	if (S_ISDIR(stb.st_mode)) {
  		rcmptime(&stb, sbcmds, env);
  		return;
  	} else if (!S_ISREG(stb.st_mode)) {
  		error("%s: not a plain file", name);
  		return;
+ 	} else if (!include_pat(name)) {
+ 		return;
  	}
  
+ 
  	if (stb.st_mtime > lastmod) {
  		message(MT_INFO, "%s: file is newer", name);
  		for (sc = sbcmds; sc != NULL; sc = sc->sc_next) {
***************
*** 813,820 ****
  /*
   * Return TRUE if file is in the exception list.
   */
! extern int except(file)
  	char *file;
  {
  	register struct	subcmd *sc;
  	register struct	namelist *nl;
--- 816,824 ----
  /*
   * Return TRUE if file is in the exception list.
   */
! extern int except(file, stb)
  	char *file;
+ 	struct stat *stb;
  {
  	register struct	subcmd *sc;
  	register struct	namelist *nl;
***************
*** 822,827 ****
--- 826,855 ----
  	debugmsg(DM_CALL, "except(%s)", file);
  
  	for (sc = subcmds; sc != NULL; sc = sc->sc_next) {
+ 		if (sc->sc_type == INCLUDE_PAT) {
+ 			/* XXX: this is a total hack, we just need include_pat
+ 			 * XXX: to work on files, not directories */
+ 			if (stb == NULL || S_ISDIR(stb->st_mode)) {
+ 			    continue;
+ 			}
+ 			for (nl = sc->sc_args; nl != NULL; nl = nl->n_next) {
+ 				char *cp, *re_comp();
+ 
+ 				if ((cp = re_comp(nl->n_name)) != NULL) {
+ 					error("Regex error \"%s\" for \"%s\".",
+ 					      cp, nl->n_name);
+ 					return(0);
+ 				}
+ 				if (re_exec(file) > 0) {
+ 				    break;
+ 				}
+ 			}
+ 			if (nl == NULL) {
+ 			    /* not on the list */
+ 			    return (1);
+ 			}
+ 			continue;
+ 		}
  		if (sc->sc_type == EXCEPT) {
  			for (nl = sc->sc_args; nl != NULL; nl = nl->n_next)
  				if (strcmp(file, nl->n_name) == 0)
***************
*** 843,848 ****
--- 871,908 ----
  		}
  	}
  	return(0);
+ }
+ 
+ /*
+  * Return TRUE if file is in the include_pat list.
+  */
+ extern int include_pat(file)
+ 	char *file;
+ {
+ 	register struct	subcmd *sc;
+ 	register struct	namelist *nl;
+ 	int saw_an_include_pat;
+ 
+ 	debugmsg(DM_CALL, "include_pat(%s)", file);
+ 
+ 	for (sc = subcmds; sc != NULL; sc = sc->sc_next) {
+ 		if (sc->sc_type == INCLUDE_PAT) {
+ 			for (nl = sc->sc_args; nl != NULL; nl = nl->n_next) {
+ 				char *cp, *re_comp();
+ 
+ 				if ((cp = re_comp(nl->n_name)) != NULL) {
+ 					error("Regex error \"%s\" for \"%s\".",
+ 					      cp, nl->n_name);
+ 					return(0);
+ 				}
+ 				if (re_exec(file) > 0) {
+ 				    return(1);
+ 				}
+ 			}
+ 			saw_an_include_pat = 1;
+ 		}
+ 	}
+ 	return(saw_an_include_pat ? 0 : 1);
  }
  
  /*
Only in rdist-6.1.3.LOCAL_MODS/src: docmd.o
Only in rdist-6.1.3.LOCAL_MODS/src: expand.o
Only in rdist-6.1.3.LOCAL_MODS/src: filesys-os.o
Only in rdist-6.1.3.LOCAL_MODS/src: filesys.o
Only in rdist-6.1.3.LOCAL_MODS/src: gram.c
Only in rdist-6.1.3.LOCAL_MODS/src: gram.o
diff -c3 -r rdist-6.1.3/src/gram.y rdist-6.1.3.LOCAL_MODS/src/gram.y
*** rdist-6.1.3/src/gram.y	Mon Apr 11 16:59:22 1994
--- rdist-6.1.3.LOCAL_MODS/src/gram.y	Wed Mar 26 14:31:18 1997
***************
*** 74,79 ****
--- 74,80 ----
  %term SPECIAL		10
  %term CMDSPECIAL	11
  %term OPTION		12
+ %term INCLUDE_PAT	13
  
  %union {
  	opt_t 			optval;
***************
*** 84,90 ****
  
  %type <optval> OPTION, options
  %type <string> NAME, STRING
! %type <subcmd> INSTALL, NOTIFY, EXCEPT, PATTERN, SPECIAL, CMDSPECIAL, cmdlist, cmd
  %type <namel> namelist, names, opt_namelist nlist
  
  %%
--- 85,91 ----
  
  %type <optval> OPTION, options
  %type <string> NAME, STRING
! %type <subcmd> INSTALL, NOTIFY, EXCEPT, PATTERN, SPECIAL, CMDSPECIAL, INCLUDE_PAT, cmdlist, cmd
  %type <namel> namelist, names, opt_namelist nlist
  
  %%
***************
*** 197,202 ****
--- 198,213 ----
  			$1->sc_args = expand($2, E_VARS);
  			$$ = $1;
  		}
+ 		| INCLUDE_PAT namelist ';' = {
+ 			struct namelist *nl;
+ 			char *cp, *re_comp();
+ 
+ 			for (nl = $2; nl != NULL; nl = nl->n_next)
+ 				if ((cp = re_comp(nl->n_name)) != NULL)
+ 					yyerror(cp);
+ 			$1->sc_args = expand($2, E_VARS);
+ 			$$ = $1;
+ 		}
  		| SPECIAL opt_namelist STRING ';' = {
  			if ($2 != NULL)
  				$1->sc_args = expand($2, E_ALL);
***************
*** 388,393 ****
--- 399,406 ----
  		c = SPECIAL;
  	else if (!strcmp(yytext, "cmdspecial"))
  		c = CMDSPECIAL;
+ 	else if (!strcmp(yytext, "include_pat"))
+ 	    	c = INCLUDE_PAT;
  	else {
  		yylval.string = makestr(yytext);
  		return(NAME);
Only in rdist-6.1.3.LOCAL_MODS/src: isexec.o
Only in rdist-6.1.3.LOCAL_MODS/src: lookup.o
Only in rdist-6.1.3.LOCAL_MODS/src: message.o
Only in rdist-6.1.3.LOCAL_MODS/src: rdist
Only in rdist-6.1.3.LOCAL_MODS/src: rdist.o
Only in rdist-6.1.3.LOCAL_MODS/src: rdistd
Only in rdist-6.1.3.LOCAL_MODS/src: rdistd.o
Only in rdist-6.1.3.LOCAL_MODS/src: rshrcmd.o
Only in rdist-6.1.3.LOCAL_MODS/src: server.o
Only in rdist-6.1.3.LOCAL_MODS/src: setargs.o
Only in rdist-6.1.3.LOCAL_MODS/src: signal.o
Only in rdist-6.1.3.LOCAL_MODS/src: y.tab.h
