Source-Changes-HG archive

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

[src/netbsd-9]: src/usr.bin/mail Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/ee985f5ac1a6
branches:  netbsd-9
changeset: 963433:ee985f5ac1a6
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 17 12:30:36 2019 +0000

description:
Pull up following revision(s) (requested by christos in ticket #555):

        usr.bin/mail/mime_child.c: revision 1.10
        usr.bin/mail/mail.1: revision 1.68
        usr.bin/mail/complete.c: revision 1.21

PR/54766: elo: Broken mime-hooks handling in mail(1)
pullup-9.

PR/54765: elo: Minor error in the mail(1) man page (-F description truncated)
pullup-9

PR/54764: elo: Incorrect '+file' filename completion in mail(1)
Add propel completion stem so that file completion works.
pullup-9

diffstat:

 usr.bin/mail/complete.c   |  23 +++++++++++++++++------
 usr.bin/mail/mail.1       |   6 +++---
 usr.bin/mail/mime_child.c |   8 ++++----
 3 files changed, 24 insertions(+), 13 deletions(-)

diffs (113 lines):

diff -r bf0d3e8f5d68 -r ee985f5ac1a6 usr.bin/mail/complete.c
--- a/usr.bin/mail/complete.c   Tue Dec 17 10:25:42 2019 +0000
+++ b/usr.bin/mail/complete.c   Tue Dec 17 12:30:36 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: complete.c,v 1.20 2010/01/12 14:44:24 christos Exp $   */
+/*     $NetBSD: complete.c,v 1.20.48.1 2019/12/17 12:30:36 martin Exp $        */
 
 /*-
  * Copyright (c) 1997-2000,2005,2006 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: complete.c,v 1.20 2010/01/12 14:44:24 christos Exp $");
+__RCSID("$NetBSD: complete.c,v 1.20.48.1 2019/12/17 12:30:36 martin Exp $");
 #endif /* not lint */
 
 /*
@@ -332,16 +332,27 @@
 {
        StringList *words;
        char dir[MAXPATHLEN];
-       char *fname;
+       char *fname, *mf;
        DIR *dd;
        struct dirent *dp;
        unsigned char rv;
        size_t len;
 
        if ((fname = strrchr(word, '/')) == NULL) {
-               dir[0] = '.';
-               dir[1] = '\0';
-               fname = word;
+               if (word[0] == '+' && (mf = value(ENAME_FOLDER)) != NULL) {
+                       if (mf[0] == '/') {
+                               (void)estrlcpy(dir, mf, sizeof(dir));
+                       } else {
+                               dir[0] = '~';
+                               dir[1] = '/';
+                               (void)estrlcpy(dir + 2, mf, sizeof(dir) - 2);
+                       }
+                       fname = word + 1;
+               } else {
+                       dir[0] = '.';
+                       dir[1] = '\0';
+                       fname = word;
+               }
        } else {
                if (fname == word) {
                        dir[0] = '/';
diff -r bf0d3e8f5d68 -r ee985f5ac1a6 usr.bin/mail/mail.1
--- a/usr.bin/mail/mail.1       Tue Dec 17 10:25:42 2019 +0000
+++ b/usr.bin/mail/mail.1       Tue Dec 17 12:30:36 2019 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: mail.1,v 1.65.2.1 2019/09/05 08:19:41 martin Exp $
+.\"    $NetBSD: mail.1,v 1.65.2.2 2019/12/17 12:30:36 martin Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"    @(#)mail.1      8.8 (Berkeley) 4/28/95
 .\"
-.Dd September 1, 2019
+.Dd December 14, 2019
 .Dt MAIL 1
 .Os
 .Sh NAME
@@ -1328,7 +1328,7 @@
 or
 .Ic retain
 command) are not included.
-.It Ic \&~
+.It Ic \&~F Ns Ar messages
 Identical to
 .Ic \&~f ,
 except all message headers are included.
diff -r bf0d3e8f5d68 -r ee985f5ac1a6 usr.bin/mail/mime_child.c
--- a/usr.bin/mail/mime_child.c Tue Dec 17 10:25:42 2019 +0000
+++ b/usr.bin/mail/mime_child.c Tue Dec 17 12:30:36 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mime_child.c,v 1.9 2017/11/09 20:27:50 christos Exp $  */
+/*     $NetBSD: mime_child.c,v 1.9.6.1 2019/12/17 12:30:36 martin Exp $        */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef __lint__
-__RCSID("$NetBSD: mime_child.c,v 1.9 2017/11/09 20:27:50 christos Exp $");
+__RCSID("$NetBSD: mime_child.c,v 1.9.6.1 2019/12/17 12:30:36 martin Exp $");
 #endif /* not __lint__ */
 
 #include <assert.h>
@@ -159,7 +159,7 @@
        default:        /* parent */
                (void)close(p[READ]);
 
-               nfo = fdopen(p[WRITE], "wef");
+               nfo = fdopen(p[WRITE], "we");
                if (nfo == NULL) {
                        warn("mime_run_command: fdopen");
                        (void)close(p[WRITE]);
@@ -203,7 +203,7 @@
 
        default:        /* parent */
                (void)close(p[READ]);
-               nfo = fdopen(p[WRITE], "wef");
+               nfo = fdopen(p[WRITE], "we");
                if (nfo == NULL) {
                        warn("run_function: fdopen");
                        (void)close(p[WRITE]);



Home | Main Index | Thread Index | Old Index