Reworked LINK, now named `altmsglink', similar to BACKUP_PREFIX.
authormarkus schnalke <meillo@marmaro.de>
Wed, 5 Oct 2011 10:25:09 +0000 (12:25 +0200)
committermarkus schnalke <meillo@marmaro.de>
Wed, 5 Oct 2011 10:25:09 +0000 (12:25 +0200)
acconfig.h
config/config.c
h/mh.h
man/mh-profile.man
sbr/folder_read.c
sbr/readconfig.c
uip/mhparam.c
uip/rmf.c
uip/whatnowsbr.c

index 2547602..8162798 100644 (file)
 #define BUILTIN_FTP 1
 
 /*
 #define BUILTIN_FTP 1
 
 /*
- * Name of link to file to which you are replying.
- */
-#define LINK "@"
-
-/*
  * Define to 1 if your vi has ATT bug, such that it returns
  * non-zero exit codes on `pseudo-errors'.
  */
  * Define to 1 if your vi has ATT bug, such that it returns
  * non-zero exit codes on `pseudo-errors'.
  */
index cc3bb00..9b64e29 100644 (file)
@@ -352,6 +352,12 @@ char *backup_prefix = ",";
 
 char *defaulteditor = "vi";
 
 
 char *defaulteditor = "vi";
 
+/*
+ * Name of link to file to which you are replying or which you are
+ * redistributing. See `$mhaltmsg' in the mh-profile(5) man page.
+ */
+char *altmsglink = "@";
+
 /* 
  * This is the global nmh alias file.  It is somewhat obsolete, since
  * global aliases should be handled by the Mail Transport Agent (MTA).
 /* 
  * This is the global nmh alias file.  It is somewhat obsolete, since
  * global aliases should be handled by the Mail Transport Agent (MTA).
diff --git a/h/mh.h b/h/mh.h
index 31b5f4d..25bb475 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -299,6 +299,7 @@ extern struct node *m_defs; /* list of profile/context entries */
  */
 extern char *buildmimeproc;
 extern char *backup_prefix;
  */
 extern char *buildmimeproc;
 extern char *backup_prefix;
+extern char *altmsglink;
 extern char *catproc;
 extern char *components;
 extern char *context;
 extern char *catproc;
 extern char *components;
 extern char *context;
index b7e24ca..635fc32 100644 (file)
@@ -162,6 +162,14 @@ are "removed" by rmm. This should typically be `,' or `#'.
 (profile, default: `,')
 .RE
 .PP
 (profile, default: `,')
 .RE
 .PP
+.BR AltMsg-Link :
+@
+.RS 5
+Name of the link to the file to which you are replying or which you are
+redistributing. See `$mhaltmsg' below.
+(profile, default: `@')
+.RE
+.PP
 .BR automimeproc :
 .RS 5
 If defined and set to 1, then the
 .BR automimeproc :
 .RS 5
 If defined and set to 1, then the
@@ -764,11 +772,12 @@ This is set by
 .B dist
 and
 .B repl
 .B dist
 and
 .B repl
-during edit sessions so you can
-peruse the message being distributed or replied to.  The message is also
-available through a link called \*(lq@\*(rq in the current directory if
-your current working directory and the folder the message lives in are
-on the same UNIX filesystem.
+during edit sessions so you can peruse the message being distributed or
+replied to.  The message is also available through a link called
+\*(lq@\*(rq (if not changed by
+.BR altmsg-link )
+in the current directory if your current working directory
+and the message's folder are on the same UNIX filesystem.
 .RE
 .PP
 .B $mhdraft
 .RE
 .PP
 .B $mhdraft
index d59e731..f642ed3 100644 (file)
@@ -109,8 +109,8 @@ folder_read (char *name)
                    if (!strncmp (dp->d_name, backup_prefix, prefix_len))
                        continue;
 
                    if (!strncmp (dp->d_name, backup_prefix, prefix_len))
                        continue;
 
-                   /* skip the LINK file */
-                   if (!strcmp (dp->d_name, LINK))
+                   /* skip the altmsg link file */
+                   if (!strcmp (dp->d_name, altmsglink))
                        continue;
 
                    /* indicate that there are other files in folder */
                        continue;
 
                    /* indicate that there are other files in folder */
index 30585a2..6eca286 100644 (file)
@@ -20,6 +20,7 @@ static struct procstr procs[] = {
     { "context",       &context },
     { "mh-sequences",  &mh_seq },
     { "backup-prefix", &backup_prefix },
     { "context",       &context },
     { "mh-sequences",  &mh_seq },
     { "backup-prefix", &backup_prefix },
+    { "altmsg-link",   &altmsglink },
     { "buildmimeproc", &buildmimeproc },
     { "faceproc",      &faceproc },
     { "fileproc",      &fileproc },
     { "buildmimeproc", &buildmimeproc },
     { "faceproc",      &faceproc },
     { "fileproc",      &fileproc },
index 80b52a1..137a635 100644 (file)
@@ -15,8 +15,6 @@
 extern char *mhlibdir;
 extern char *mhetcdir;
 
 extern char *mhlibdir;
 extern char *mhetcdir;
 
-char *slink = LINK;
-
 static struct swit switches[] = {
 #define        COMPSW    0
     { "components", 0 },
 static struct swit switches[] = {
 #define        COMPSW    0
     { "components", 0 },
@@ -69,7 +67,7 @@ static struct proc procs [] = {
      { "etcdir",        &mhetcdir },
      { "libdir",        &mhlibdir },
      { "backup-prefix", &backup_prefix },
      { "etcdir",        &mhetcdir },
      { "libdir",        &mhlibdir },
      { "backup-prefix", &backup_prefix },
-     { "link",          &slink },
+     { "altmsg-link",   &altmsglink },
      { NULL,            NULL },
 };
 
      { NULL,            NULL },
 };
 
index 878f22a..12473f8 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -181,7 +181,7 @@ rmf (char *folder)
            default: 
                if (m_atoi (dp->d_name))
                    break;
            default: 
                if (m_atoi (dp->d_name))
                    break;
-               if (strcmp (dp->d_name, LINK) == 0
+               if (strcmp (dp->d_name, altmsglink) == 0
                        || strncmp (dp->d_name, backup_prefix, j) == 0)
                    break;
 
                        || strncmp (dp->d_name, backup_prefix, j) == 0)
                    break;
 
index 4a29a64..f5f78d7 100644 (file)
@@ -246,7 +246,7 @@ WhatNow (int argc, char **argv)
     snprintf (prompt, sizeof(prompt), myprompt, invo_name);
     for (;;) {
        if (!(argp = getans (prompt, aleqs))) {
     snprintf (prompt, sizeof(prompt), myprompt, invo_name);
     for (;;) {
        if (!(argp = getans (prompt, aleqs))) {
-           unlink (LINK);
+           unlink (altmsglink);
            done (1);
        }
        switch (smatch (*argp, aleqs)) {
            done (1);
        }
        switch (smatch (*argp, aleqs)) {
@@ -667,9 +667,9 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
        else
            snprintf (altpath, sizeof(altpath), "%s/%s", mp->foldpath, altmsg);
        if (cwd == NULL)
        else
            snprintf (altpath, sizeof(altpath), "%s/%s", mp->foldpath, altmsg);
        if (cwd == NULL)
-           strncpy (linkpath, LINK, sizeof(linkpath));
+           strncpy (linkpath, altmsglink, sizeof(linkpath));
        else
        else
-           snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK);
+           snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, altmsglink);
     }
 
     if (altmsg) {
     }
 
     if (altmsg) {