Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/pax pax: minor adjustments to comments in pat_rep.c



details:   https://anonhg.NetBSD.org/src/rev/1d40c4f8b27a
branches:  trunk
changeset: 997690:1d40c4f8b27a
user:      gutteridge <gutteridge%NetBSD.org@localhost>
date:      Wed Mar 20 02:50:50 2019 +0000

description:
pax: minor adjustments to comments in pat_rep.c

Amend several comments to match present reality (the functionality was
added back in 2007).

diffstat:

 bin/pax/pat_rep.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r adc46b702c69 -r 1d40c4f8b27a bin/pax/pat_rep.c
--- a/bin/pax/pat_rep.c Tue Mar 19 23:55:28 2019 +0000
+++ b/bin/pax/pat_rep.c Wed Mar 20 02:50:50 2019 +0000
@@ -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 @@
  *     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 @@
  *     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)



Home | Main Index | Thread Index | Old Index