From: David Levine Date: Sun, 3 Aug 2014 12:53:15 +0000 (-0500) Subject: Added -debug switch to pick(1) and deprecated $MHPDEBUG. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/ca5ae3e652ed0fb43efaabd697162fd1c28d09ba?ds=inline;hp=40a17f8f191deee9f27fd3dd394eda9a641e6f1c Added -debug switch to pick(1) and deprecated $MHPDEBUG. --- diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 7830242d..81946359 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -22,6 +22,10 @@ OBSOLETE FEATURES ------------------- DEPRECATED FEATURES ------------------- + +- Support for the MHPDEBUG environment variable is deprecated and will be + removed from a future nmh release. Instead, use the -debug switch to pick. + --------- BUG FIXES --------- diff --git a/h/picksbr.h b/h/picksbr.h index 27c2e66c..fc3bc2a7 100644 --- a/h/picksbr.h +++ b/h/picksbr.h @@ -7,4 +7,4 @@ * prototypes */ int pcompile (char **, char *); -int pmatches (FILE *, int, long, long); +int pmatches (FILE *, int, long, long, int); diff --git a/man/mh-profile.man b/man/mh-profile.man index 3ebae8ba..1cdc7395 100644 --- a/man/mh-profile.man +++ b/man/mh-profile.man @@ -878,6 +878,13 @@ will emit debugging information. If this variable is set to a non-null value, .B pick will emit a representation of the search pattern. +.B $MHPDEBUG +is deprecated, so support for this variable will +be removed from a future nmh release. Instead, +.B pick +now supports a +.B \-debug +switch. .RE .PP .B $MHWDEBUG diff --git a/man/pick.man b/man/pick.man index 38166453..e023db5c 100644 --- a/man/pick.man +++ b/man/pick.man @@ -1,4 +1,4 @@ -.TH PICK %manext1% "March 1, 2014" "%nmhversion%" +.TH PICK %manext1% "August 3, 2014" "%nmhversion%" .\" .\" %nmhwarning% .\" @@ -46,6 +46,7 @@ pick \- search for messages by content .RB [ \-public " | " \-nopublic ] .RB [ \-zero " | " \-nozero ] .RB [ \-list " | " \-nolist ] +.RB [ \-debug ] .RB [ \-version ] .RB [ \-help ] .PP @@ -287,6 +288,11 @@ in the same way .B mark uses them. +.PP +The +.B \-debug +switch causes pick to output a representation of the search +pattern. .SS "Output when no messages are matched" If .B pick diff --git a/test/pick/test-pick b/test/pick/test-pick index 4eff47cb..858d8e75 100755 --- a/test/pick/test-pick +++ b/test/pick/test-pick @@ -76,10 +76,9 @@ run_test 'pick -not -lbrace -subject NoMatch -and -subject message.3 -rbrace' \ 10 11' -# Test MHPDEBUG. -# Don't use run_prog here because it loses the environment setting. -MHPDEBUG=1 pick -not -lbrace -subject NoMatch -and -subject message.3 -rbrace \ - >/dev/null 2>"$actual" +# Test -debug. +run_prog pick -debug -not -lbrace -subject NoMatch -and -subject message.3 \ + -rbrace >/dev/null 2>"$actual" cat >"$expected" <n_action) (args (head));