Module Name: src
Committed By: gutteridge
Date: Wed Mar 20 02:50:50 UTC 2019
Modified Files:
src/bin/pax: pat_rep.c
Log Message:
pax: minor adjustments to comments in pat_rep.c
Amend several comments to match present reality (the functionality was
added back in 2007).
To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/bin/pax/pat_rep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/pax/pat_rep.c
diff -u src/bin/pax/pat_rep.c:1.30 src/bin/pax/pat_rep.c:1.31
--- src/bin/pax/pat_rep.c:1.30 Wed Jun 13 15:14:40 2018
+++ src/bin/pax/pat_rep.c Wed Mar 20 02:50:50 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pat_rep.c,v 1.30 2018/06/13 15:14:40 christos Exp $ */
+/* $NetBSD: pat_rep.c,v 1.31 2019/03/20 02:50:50 gutteridge Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: pat_rep.c,v 1.30 2018/06/13 15:14:40 christos Exp $");
+__RCSID("$NetBSD: pat_rep.c,v 1.31 2019/03/20 02:50:50 gutteridge Exp $");
#endif
#endif /* not lint */
@@ -85,12 +85,13 @@ static int resub(regex_t *, regmatch_t *
* parses the -s replacement string; compiles the regular expression
* and stores the compiled value and its replacement string together in
* replacement string list. Input to this function is of the form:
- * /old/new/pg
+ * /old/new/gps
* The first char in the string specifies the delimiter used by this
* replacement string. "Old" is a regular expression in "ed" format which
* is compiled by regcomp() and is applied to filenames. "new" is the
- * substitution string; p and g are options flags for printing and global
- * replacement (over the single filename)
+ * substitution string; g, p, and s are options flags for global
+ * replacement (over the single filename), printing, and preventing
+ * substitutions on symbolic link destinations.
* Return:
* 0 if a proper replacement string and regular expression was added to
* the list of replacement patterns; -1 otherwise.
@@ -895,7 +896,7 @@ fix_path( char *or_name, int *or_len, ch
* namelen the size of the name buffer.
* nlen is the length of this name (and is modified to hold the length of
* the final string).
- * prnt is a flag that says whether to print the final result.
+ * flags contains various options to control behavior.
* Return:
* 0 if substitution was successful, 1 if we are to skip the file (the name
* ended up empty)