]> git.marmaro.de Git - mmh/commitdiff
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 25476022cc5f211b41a2518f2141c835fe41852d..81627980ca32ed8c90b05625255031413e76e647 100644 (file)
  */
 #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'.
index cc3bb0093dc79a8b0101ad8473aaebe130a64dd5..9b64e29b8c1f295c79095b4ec47afeda5103a2f1 100644 (file)
@@ -352,6 +352,12 @@ char *backup_prefix = ",";
 
 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).
diff --git a/h/mh.h b/h/mh.h
index 31b5f4d868cb6505c05d800a48db5834e907f3a5..25bb4754a1cf9a847e3b4d5293b7bf19a970f039 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 *altmsglink;
 extern char *catproc;
 extern char *components;
 extern char *context;
index b7e24ca9066cc41eddf8f86caf8eea5b3a653ab9..635fc320f493472179e0d06661a071f696396351 100644 (file)
@@ -162,6 +162,14 @@ are "removed" by rmm. This should typically be `,' or `#'.
 (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
@@ -764,11 +772,12 @@ This is set by
 .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
index d59e7310da81517c3ec9ca224ed91d170927e244..f642ed39b02f24213088964ec64ee776022e9b91 100644 (file)
@@ -109,8 +109,8 @@ folder_read (char *name)
                    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 */
index 30585a231b3a4a302cac710a12fa9a12b7be0cbc..6eca2861ab33ce658bf896e3704fdcc1fc0f2e12 100644 (file)
@@ -20,6 +20,7 @@ static struct procstr procs[] = {
     { "context",       &context },
     { "mh-sequences",  &mh_seq },
     { "backup-prefix", &backup_prefix },
+    { "altmsg-link",   &altmsglink },
     { "buildmimeproc", &buildmimeproc },
     { "faceproc",      &faceproc },
     { "fileproc",      &fileproc },
index 80b52a18112de28767898e67a233fb9328979bb6..137a6356b3c4ffb895c1c72b11b885a7ca3878d5 100644 (file)
@@ -15,8 +15,6 @@
 extern char *mhlibdir;
 extern char *mhetcdir;
 
-char *slink = LINK;
-
 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 },
-     { "link",          &slink },
+     { "altmsg-link",   &altmsglink },
      { NULL,            NULL },
 };
 
index 878f22ad13efaf3385022a009bccd3d8d8cc4c08..12473f89c79215d18e5014e0b0dce57c3ee8caf6 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;
-               if (strcmp (dp->d_name, LINK) == 0
+               if (strcmp (dp->d_name, altmsglink) == 0
                        || strncmp (dp->d_name, backup_prefix, j) == 0)
                    break;
 
index 4a29a64a6d60a177047835bd9b44b75532e4d567..f5f78d74b494b7419d11b5bc1b567ba82d3135f7 100644 (file)
@@ -246,7 +246,7 @@ WhatNow (int argc, char **argv)
     snprintf (prompt, sizeof(prompt), myprompt, invo_name);
     for (;;) {
        if (!(argp = getans (prompt, aleqs))) {
-           unlink (LINK);
+           unlink (altmsglink);
            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)
-           strncpy (linkpath, LINK, sizeof(linkpath));
+           strncpy (linkpath, altmsglink, sizeof(linkpath));
        else
-           snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK);
+           snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, altmsglink);
     }
 
     if (altmsg) {