]> granicus.if.org Git - neomutt/commitdiff
tidy comments / docs
authorRichard Russon <rich@flatcap.org>
Wed, 28 Mar 2018 22:21:56 +0000 (23:21 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 28 Mar 2018 22:21:56 +0000 (23:21 +0100)
16 files changed:
README.md
buffy.c
color.c
commands.c
compose.c
conn/ssl.c
envelope.c
handler.c
hdrline.c
imap/imap.c
init.c
init.h
ncrypt/pgp.c
postpone.c
smtp.c
tags.c

index cf0e14e3c9a50822f4efb14820eed9b758ada6f5..b148976d9459a37cef55a0c3659f9321e983cd68 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,8 +5,9 @@
 [![Contributors](https://img.shields.io/badge/Contributors-115-orange.svg)](#contributors)
 [![Release](https://img.shields.io/github/release/neomutt/neomutt.svg)](https://github.com/neomutt/neomutt/releases/latest "Latest Release Notes")
 [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://github.com/neomutt/neomutt/blob/master/COPYRIGHT)
-[![Travis branch](https://api.travis-ci.org/neomutt/neomutt.svg?branch=neomutt)](https://travis-ci.org/neomutt/neomutt)
+[![Code build](https://img.shields.io/travis/neomutt/neomutt.svg?label=code)](https://travis-ci.org/neomutt/neomutt)
 [![Coverity Scan](https://img.shields.io/coverity/scan/8495.svg)](https://scan.coverity.com/projects/neomutt-neomutt)
+[![Website build](https://img.shields.io/travis/neomutt/neomutt.github.io.svg?label=website)](https://travis-ci.org/neomutt/neomutt.github.io)
 
 ## What is NeoMutt?
 
diff --git a/buffy.c b/buffy.c
index f24cc0139aac2260e6b7ee97f4d07fc820978151..eed86a4051e32db19d2d4b705881aa71cd2ef095 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -383,8 +383,8 @@ static void buffy_check(struct Buffy *tmp, struct stat *contex_sb, bool check_st
         if (stat(tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
             (!tmp->magic && (tmp->magic = mx_get_magic(tmp->path)) <= 0))
     {
-      /* if the mailbox still doesn't exist, set the newly created flag to
-         * be ready for when it does. */
+      /* if the mailbox still doesn't exist, set the newly created flag to be
+       * ready for when it does. */
       tmp->newly_created = true;
       tmp->magic = 0;
       tmp->size = 0;
@@ -392,8 +392,7 @@ static void buffy_check(struct Buffy *tmp, struct stat *contex_sb, bool check_st
     }
   }
 
-  /* check to see if the folder is the currently selected folder
-     * before polling */
+  /* check to see if the folder is the currently selected folder before polling */
   if (!Context || !Context->path ||
       ((tmp->magic == MUTT_IMAP ||
 #ifdef USE_NNTP
diff --git a/color.c b/color.c
index c4fdca841c2c3ef72446af4e32da95e46a76253b..e665cd798ae12029bca3fb73a79b4231b8e10ec7 100644 (file)
--- a/color.c
+++ b/color.c
@@ -891,10 +891,10 @@ static int parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer *err,
       && (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT || object == MT_COLOR_TREE) &&
       use_default_colors() != OK)
   /* the case of the tree object is special, because a non-default
-       * fg color of the tree element may be combined dynamically with
-       * the default bg color of an index line, not necessarily defined in
-       * a rc file.
-       */
+   * fg color of the tree element may be combined dynamically with
+   * the default bg color of an index line, not necessarily defined in
+   * a rc file.
+   */
   {
     mutt_str_strfcpy(err->data, _("default colors not supported"), err->dsize);
     return -1;
index 9a5d83917c2da9ebee802fa5e68f1586db2ea9b9..52e8ee2e5a5d6ddaf7520bcc0c1960eb851e0c0e 100644 (file)
@@ -260,7 +260,7 @@ void ci_bounce_message(struct Header *h)
   int rc;
 
   /* RFC5322 mandates a From: header, so warn before bouncing
-  * messages without one */
+   * messages without one */
   if (h)
   {
     if (!h->env->from)
index 8a41762250a2661da00f4d9c773c036f657ddbef..81cfe3c71c074345757fd86f28fac628bbe09b46 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -760,14 +760,17 @@ static void compose_status_line(char *buf, size_t buflen, size_t col, int cols,
 
 /**
  * mutt_compose_menu - Allow the user to edit the message envelope
+ * @param msg    Message to fill
+ * @param fcc    Buffer to save FCC
+ * @param fcclen Length of FCC buffer
+ * @param cur    Current message
+ * @param flags  Flags, e.g. #MUTT_COMPOSE_NOFREEHEADER
  * @retval  1 Message should be postponed
  * @retval  0 Normal exit
  * @retval -1 Abort message
  */
-int mutt_compose_menu(struct Header *msg, /* structure for new message */
-                      char *fcc, /* where to save a copy of the message */
-                      size_t fcclen, struct Header *cur, /* current message */
-                      int flags)
+int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen,
+                      struct Header *cur, int flags)
 {
   char helpstr[LONG_STRING];
   char buf[LONG_STRING];
index f6d8abcaf401c9659583978a4aa1f4434c333d6d..5b44e6d07268d8039d9dadc60a3fa2428d444dbe 100644 (file)
@@ -479,8 +479,8 @@ static bool compare_certificates(X509 *cert, X509 *peercert,
   unsigned int mdlen;
 
   /* Avoid CPU-intensive digest calculation if the certificates are
-    * not even remotely equal.
-    */
+   * not even remotely equal.
+   */
   if (X509_subject_name_cmp(cert, peercert) != 0 || X509_issuer_name_cmp(cert, peercert) != 0)
     return false;
 
index eb490403f98b8456cad340df4f29f2401dbf7cb3..0218fae4501eb63fe9fff580563bb1156b559812 100644 (file)
@@ -146,7 +146,7 @@ void mutt_env_merge(struct Envelope *base, struct Envelope **extra)
     (*extra)->disp_subj = NULL;
   }
   /* spam and user headers should never be hashed, and the new envelope may
-    * have better values. Use new versions regardless. */
+   * have better values. Use new versions regardless. */
   mutt_buffer_free(&base->spam);
   mutt_list_free(&base->userhdrs);
   MOVE_ELEM(spam);
index aab324528905f75fbea0bde962e1348b9cd893da..b7bf84f43c84ba08344013b225acf94beeafe2a7 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1685,14 +1685,14 @@ static int run_decode_and_handler(struct Body *b, struct State *s,
       }
 #endif
       /* decoding the attachment changes the size and offset, so save a copy
-        * of the "real" values now, and restore them after processing
-        */
+       * of the "real" values now, and restore them after processing
+       */
       tmplength = b->length;
       tmpoffset = b->offset;
 
       /* if we are decoding binary bodies, we don't want to prefix each
-        * line with the prefix or else the data will get corrupted.
-        */
+       * line with the prefix or else the data will get corrupted.
+       */
       save_prefix = s->prefix;
       s->prefix = NULL;
 
index 4e77975d7e013384f1ba813c2cf1d5a637a74574..11c5f4b8754798a7f56abef2b9f22f7934f3b0be 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -422,47 +422,48 @@ static bool thread_is_old(struct Context *ctx, struct Header *hdr)
  *
  * | Expando | Description
  * |:--------|:-----------------------------------------------------------------
- * | \%a     | Address of author
- * | \%A     | Reply-to address (if present; otherwise: address of author
- * | \%b     | Filename of the originating folder
+ * | \%a     | Address of the author
+ * | \%A     | Reply-to address (if present; otherwise: address of author)
+ * | \%b     | Filename of the original message folder (think mailbox)
  * | \%B     | The list to which the letter was sent, or else the folder name (%b).
  * | \%C     | Current message number
- * | \%c     | Size of message in bytes
+ * | \%c     | Number of characters (bytes) in the message
  * | \%D     | Date and time of message using $date_format and local timezone
  * | \%d     | Date and time of message using $date_format and sender's timezone
  * | \%e     | Current message number in thread
  * | \%E     | Number of messages in current thread
- * | \%f     | Entire from line
- * | \%F     | Like %n, unless from self
+ * | \%F     | Author name, or recipient name if the message is from you
+ * | \%f     | Sender (address + real name), either From: or Return-Path:
+ * | \%g     | Newsgroup name (if compiled with NNTP support)
  * | \%g     | Message tags (e.g. notmuch tags/imap flags)
  * | \%Gx    | Individual message tag (e.g. notmuch tags/imap flags)
  * | \%H     | Spam attribute(s) of this message
  * | \%I     | Initials of author
- * | \%i     | Message-id
+ * | \%i     | Message-id of the current message
  * | \%J     | Message tags (if present, tree unfolded, and != parent's tags)
  * | \%K     | The list to which the letter was sent (if any; otherwise: empty)
  * | \%L     | Like %F, except 'lists' are displayed first
  * | \%l     | Number of lines in the message
  * | \%M     | Number of hidden messages if the thread is collapsed
- * | \%m     | Number of messages in the mailbox
- * | \%n     | Name of author
- * | \%N     | Score
+ * | \%m     | Total number of message in the mailbox
+ * | \%N     | Message score
+ * | \%n     | Author's real name (or address if missing)
  * | \%O     | Like %L, except using address instead of name
- * | \%P     | Progress indicator for builtin pager
+ * | \%P     | Progress indicator for the built-in pager (how much of the file has been displayed)
  * | \%q     | Newsgroup name (if compiled with NNTP support)
  * | \%R     | Comma separated list of Cc: recipients
  * | \%r     | Comma separated list of To: recipients
- * | \%S     | Short message status (e.g., N/O/D/!/r/-)
- * | \%s     | Subject
- * | \%T     | $to_chars
+ * | \%S     | Single character status of the message (N/O/D/d/!/r/-)
+ * | \%s     | Subject of the message
+ * | \%T     | The appropriate character from the $$to_chars string
  * | \%t     | 'To:' field (recipients)
- * | \%u     | User (login) name of author
- * | \%v     | First name of author, unless from self
- * | \%W     | Where user is (organization)
+ * | \%u     | User (login) name of the author
+ * | \%v     | First name of the author, or the recipient if the message is from you
+ * | \%W     | Name of organization of author ('Organization:' field)
  * | \%x     | 'X-Comment-To:' field (if present and compiled with NNTP support)
  * | \%X     | Number of MIME attachments
- * | \%y     | 'X-Label:' field (if present)
  * | \%Y     | 'X-Label:' field (if present, tree unfolded, and != parent's x-label)
+ * | \%y     | 'X-Label:' field (if present)
  * | \%Z     | Combined message flags
  * | \%zc    | Message crypto flags
  * | \%zs    | Message status flags
index 12b458a50996781362777047070363dd98306ecf..ca7d19682217d9a230c9da021179ed92f216f391 100644 (file)
  * @page imap_imap IMAP network mailbox
  *
  * Support for IMAP4rev1, with the occasional nod to IMAP 4.
- *
- * | Data         | Description
- * | :----------- | :-------------------------
- * | #mx_imap_ops | Mailbox callback functions
  */
 
 #include "config.h"
diff --git a/init.c b/init.c
index d6c3bb2e17d7ce97f4e894983bd832c0f0cd7b3b..a3d12925dc8ddaf290af4ab424beba65742707e1 100644 (file)
--- a/init.c
+++ b/init.c
@@ -447,7 +447,7 @@ int mutt_option_set(const struct Option *val, struct Buffer *err)
         mutt_str_strfcpy(scratch, NONULL((const char *) val->var), sizeof(scratch));
         mutt_expand_path(scratch, sizeof(scratch));
         /* MuttVars[idx].var is already 'char**' (or some 'void**') or...
-        * so cast to 'void*' is okay */
+         * so cast to 'void*' is okay */
         FREE((void *) MuttVars[idx].var);
         *((char **) MuttVars[idx].var) = mutt_str_strdup(scratch);
         break;
@@ -455,7 +455,7 @@ int mutt_option_set(const struct Option *val, struct Buffer *err)
       case DT_STRING:
       {
         /* MuttVars[idx].var is already 'char**' (or some 'void**') or...
-          * so cast to 'void*' is okay */
+         * so cast to 'void*' is okay */
         FREE((void *) MuttVars[idx].var);
         *((char **) MuttVars[idx].var) = mutt_str_strdup((char *) val->var);
       }
@@ -3073,7 +3073,7 @@ int mutt_command_complete(char *buffer, size_t len, int pos, int numtabs)
       return 0;
 
     /* NumMatched will _always_ be at least 1 since the initial
-      * user-typed string is always stored */
+     * user-typed string is always stored */
     if (numtabs == 1 && NumMatched == 2)
       snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
     else if (numtabs > 1 && NumMatched > 2)
@@ -3378,8 +3378,8 @@ bool mutt_nm_tag_complete(char *buffer, size_t len, int numtabs)
     complete_all_nm_tags(pt);
 
     /* All matches are stored. Longest non-ambiguous string is ""
-      * i.e. don't change 'buffer'. Fake successful return this time.
-      */
+     * i.e. don't change 'buffer'. Fake successful return this time.
+     */
     if (UserTyped[0] == 0)
       return true;
   }
@@ -3388,7 +3388,7 @@ bool mutt_nm_tag_complete(char *buffer, size_t len, int numtabs)
     return false;
 
   /* NumMatched will _always_ be at least 1 since the initial
-    * user-typed string is always stored */
+   * user-typed string is always stored */
   if (numtabs == 1 && NumMatched == 2)
     snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
   else if (numtabs > 1 && NumMatched > 2)
@@ -4242,7 +4242,7 @@ int mutt_label_complete(char *buffer, size_t len, int numtabs)
     return 0;
 
   /* NumMatched will _always_ be at least 1 since the initial
-    * user-typed string is always stored */
+   * user-typed string is always stored */
   if (numtabs == 1 && NumMatched == 2)
     snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
   else if (numtabs > 1 && NumMatched > 2)
diff --git a/init.h b/init.h
index 07bfee1cf6c98977b2290acc1f67ffe60cf5e0aa..3c13f4501020ccd4303b9d570f09a9d713997154 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1536,29 +1536,29 @@ struct Option MuttVars[] = {
   ** .dt %A .dd Reply-to address (if present; otherwise: address of author)
   ** .dt %b .dd Filename of the original message folder (think mailbox)
   ** .dt %B .dd The list to which the letter was sent, or else the folder name (%b).
-  ** .dt %c .dd Number of characters (bytes) in the message
   ** .dt %C .dd Current message number
-  ** .dt %d .dd Date and time of the message in the format specified by
-  **            $$date_format converted to sender's time zone
-  ** .dt %D .dd Date and time of the message in the format specified by
-  **            $$date_format converted to the local time zone
+  ** .dt %c .dd Number of characters (bytes) in the message
+  ** .dt %D .dd Date and time of message using $date_format and local timezone
+  ** .dt %d .dd Date and time of message using $date_format and sender's timezone
   ** .dt %e .dd Current message number in thread
   ** .dt %E .dd Number of messages in current thread
-  ** .dt %f .dd Sender (address + real name), either From: or Return-Path:
   ** .dt %F .dd Author name, or recipient name if the message is from you
+  ** .dt %f .dd Sender (address + real name), either From: or Return-Path:
   ** .dt %g .dd Newsgroup name (if compiled with NNTP support)
-  ** .dt %g .dd Message labels (e.g. notmuch tags)
+  ** .dt %g .dd Message tags (e.g. notmuch tags/imap flags)
+  ** .dt %Gx .dd Individual message tag (e.g. notmuch tags/imap flags)
   ** .dt %H .dd Spam attribute(s) of this message
   ** .dt %I .dd Initials of author
   ** .dt %i .dd Message-id of the current message
+  ** .dt %J .dd Message tags (if present, tree unfolded, and != parent's tags)
   ** .dt %K .dd The list to which the letter was sent (if any; otherwise: empty)
-  ** .dt %l .dd Number of lines in the message (does not work with maildir,
-  **            Mh, and possibly IMAP folders)
   ** .dt %L .dd If an address in the ``To:'' or ``Cc:'' header field matches an address
   **            Defined by the users ``$subscribe'' command, this displays
   **            "To <list-name>", otherwise the same as %F
-  ** .dt %m .dd Total number of message in the mailbox
+  ** .dt %l .dd Number of lines in the message (does not work with maildir,
+  **            Mh, and possibly IMAP folders)
   ** .dt %M .dd Number of hidden messages if the thread is collapsed
+  ** .dt %m .dd Total number of message in the mailbox
   ** .dt %N .dd Message score
   ** .dt %n .dd Author's real name (or address if missing)
   ** .dt %O .dd Original save folder where NeoMutt would formerly have
@@ -1566,29 +1566,29 @@ struct Option MuttVars[] = {
   **            If not sent to a list
   ** .dt %P .dd Progress indicator for the built-in pager (how much of the file has been displayed)
   ** .dt %q .dd Newsgroup name (if compiled with NNTP support)
-  ** .dt %r .dd Comma separated list of ``To:'' recipients
   ** .dt %R .dd Comma separated list of ``Cc:'' recipients
-  ** .dt %s .dd Subject of the message
+  ** .dt %r .dd Comma separated list of ``To:'' recipients
   ** .dt %S .dd Single character status of the message (``N''/``O''/``D''/``d''/``!''/``r''/``\(as'')
-  ** .dt %t .dd ``To:'' field (recipients)
+  ** .dt %s .dd Subject of the message
   ** .dt %T .dd The appropriate character from the $$to_chars string
+  ** .dt %t .dd ``To:'' field (recipients)
   ** .dt %u .dd User (login) name of the author
   ** .dt %v .dd First name of the author, or the recipient if the message is from you
   ** .dt %W .dd Name of organization of author (``Organization:'' field)
   ** .dt %x .dd ``X-Comment-To:'' field (if present and compiled with NNTP support)
-  ** .dt %X .dd Number of attachments
+  ** .dt %X .dd Number of MIME attachments
   **            (please see the ``$attachments'' section for possible speed effects)
-  ** .dt %y .dd ``X-Label:'' field, if present
   ** .dt %Y .dd ``X-Label:'' field, if present, and \fI(1)\fP not at part of a thread tree,
   **            \fI(2)\fP at the top of a thread, or \fI(3)\fP ``X-Label:'' is different from
   **            Preceding message's ``X-Label:''
+  ** .dt %y .dd ``X-Label:'' field, if present
   ** .dt %Z .dd A three character set of message status flags.
   **            The first character is new/read/replied flags (``n''/``o''/``r''/``O''/``N'').
   **            The second is deleted or encryption flags (``D''/``d''/``S''/``P''/``s''/``K'').
   **            The third is either tagged/flagged (``\(as''/``!''), or one of the characters
   **            Listed in $$to_chars.
-  ** .dt %zs .dd Message status flags
   ** .dt %zc .dd Message crypto flags
+  ** .dt %zs .dd Message status flags
   ** .dt %zt .dd Message tag flags
   ** .dt %{fmt} .dd the date and time of the message is converted to sender's
   **                time zone, and ``fmt'' is expanded by the library function
index c1e0e5c4ca2e1dbd956b3b481b71714b8d4278ba..72e63ff350454b43aacdac75c87fe261e78ab431 100644 (file)
@@ -1720,8 +1720,8 @@ int pgp_send_menu(struct Header *msg)
   else if (CryptOpportunisticEncrypt)
   {
     /* When the message is not selected for signing or encryption, the toggle
-    * between PGP/MIME and Traditional doesn't make sense.
-    */
+     * between PGP/MIME and Traditional doesn't make sense.
+     */
     if (msg->security & (ENCRYPT | SIGN))
     {
       snprintf(promptbuf, sizeof(promptbuf),
index 01e658f689cb1b5cab3dd3de4744cb07e64fabf2..132196c09d51904e37ebf586309499c8348c7064 100644 (file)
@@ -348,10 +348,10 @@ int mutt_get_postponed(struct Context *ctx, struct Header *hdr,
       mutt_pretty_mailbox(fcc, fcclen);
 
       /* note that x-mutt-fcc was present.  we do this because we want to add a
-      * default fcc if the header was missing, but preserve the request of the
-      * user to not make a copy if the header field is present, but empty.
-      * see http://dev.mutt.org/trac/ticket/3653
-      */
+       * default fcc if the header was missing, but preserve the request of the
+       * user to not make a copy if the header field is present, but empty.
+       * see http://dev.mutt.org/trac/ticket/3653
+       */
       code |= SENDPOSTPONEDFCC;
     }
     else if (((WithCrypto & APPLICATION_PGP) != 0) &&
diff --git a/smtp.c b/smtp.c
index 7f8b05a5925136d09db23602203e74d7ceb0bced..09279170de70bf90be43bb960cca69514cb7efbc 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -346,9 +346,9 @@ static int smtp_helo(struct Connection *conn)
 
   snprintf(buf, sizeof(buf), "%s %s\r\n", Esmtp ? "EHLO" : "HELO", fqdn);
   /* XXX there should probably be a wrapper in mutt_socket.c that
-    * repeatedly calls conn->write until all data is sent.  This
-    * currently doesn't check for a short write.
-    */
+   * repeatedly calls conn->write until all data is sent.  This
+   * currently doesn't check for a short write.
+   */
   if (mutt_socket_write(conn, buf) == -1)
     return SMTP_ERR_WRITE;
   return smtp_get_resp(conn);
diff --git a/tags.c b/tags.c
index 8c71b2173be80379f83b3666f0fc492974874251..1c401ea9ec47c204912d25060c96c5543438f492 100644 (file)
--- a/tags.c
+++ b/tags.c
  * @page tags Driver based email tags
  *
  * Driver based email tags
- *
- * | Data           | Description
- * | :------------- | :--------------------------------------------------
- * | #HiddenTags    | Private tags which should not be displayed
- * | #TagTransforms | Lookup table of alternative tag names
- *
- * | Function                          | Description
- * | :-------------------------------- | :-----------------------------------------------
- * | driver_tags_free()                | Free tags from a header
- * | driver_tags_getter()              | Get transformed tags
- * | driver_tags_get_transformed()     | Get transformed tags
- * | driver_tags_get()                 | Get tags
- * | driver_tags_get_with_hidden()     | Get tags with hiddens
- * | driver_tags_get_transformed_for() | Get transformed tag for a tag name from a header
- * | driver_tags_add()                 | Add a tag to header
- * | driver_tags_replace()             | Replace all tags
  */
 
 #include "config.h"