]> granicus.if.org Git - neomutt/commitdiff
add comments
authorRichard Russon <rich@flatcap.org>
Tue, 28 Nov 2017 22:48:08 +0000 (22:48 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 29 Nov 2017 00:29:10 +0000 (00:29 +0000)
address.c
address.h
doxygen/layout.xml
envelope.c
envelope.h
imap/imap.c
mutt/debug.c
mutt/mutt.h
parameter.c
tags.c
tags.h

index f95865c9606075f50fe008d900c81094fefbf9cc..aca851a4fffebaa8234fc1c14d53be344aa710b6 100644 (file)
--- a/address.c
+++ b/address.c
  *
  * | Function                     | Description
  * | :--------------------------- | :---------------------------------------------------------
- * | mutt_addr_cmp()                    | compare two e-mail addresses
- * | mutt_addr_search()                    | Search for an e-mail address in a list
- * | mutt_addr_has_recips()                 | Count the number of Addresses with valid recipients
- * | mutt_addr_parse_list2()         | Parse a list of email addresses
  * | mutt_addr_append()           | Append one list of addresses onto another
  * | mutt_addr_cat()              | Copy a string and escape the specified characters
- * | mutt_addr_copy_list()        | Copy an Address
- * | mutt_addr_copy               | Copy the real address
+ * | mutt_addr_cmp()              | Compare two e-mail addresses
+ * | mutt_addr_cmp_strict()       | Strictly compare two Address lists
+ * | mutt_addr_copy()             | Copy the real address
+ * | mutt_addr_copy_list()        | Copy a list of addresses
  * | mutt_addr_free()             | Free a list of Addresses
+ * | mutt_addr_has_recips()       | Count the number of Addresses with valid recipients
+ * | mutt_addr_new()              | Create a new Address
  * | mutt_addr_parse_list()       | Parse a list of email addresses
+ * | mutt_addr_parse_list2()      | Parse a list of email addresses
  * | mutt_addr_qualify()          | Expand local names in an Address list using a hostname
  * | mutt_addr_remove_from_list() | Remove an Address from a list
+ * | mutt_addr_search()           | Search for an e-mail address in a list
  * | mutt_addr_valid_msgid()      | Is this a valid Message ID?
  */
 
@@ -736,8 +738,6 @@ void mutt_addr_cat(char *buf, size_t buflen, const char *value, const char *spec
  * mutt_addr_copy - Copy the real address
  * @param addr Address to copy
  * @retval ptr New Address
- *
- * this should be mutt_addr_copy_list
  */
 struct Address *mutt_addr_copy(struct Address *addr)
 {
@@ -756,8 +756,6 @@ struct Address *mutt_addr_copy(struct Address *addr)
  * @param addr  Address list
  * @param prune Skip groups if there are more addresses
  * @retval ptr New Address list
- *
- * this should be rfc822_cpy_adrlist
  */
 struct Address *mutt_addr_copy_list(struct Address *addr, int prune)
 {
@@ -903,7 +901,7 @@ int mutt_addr_has_recips(struct Address *a)
 }
 
 /**
- * mutt_addr_cmp - compare two e-mail addresses
+ * mutt_addr_cmp - Compare two e-mail addresses
  * @param a Address 1
  * @param b Address 2
  * @retval true if they are equivalent
index 04ba47597237be850a6a33f2357a83bd040d476a..c5f42642ef4878b668abe0c905c10329dfcd400d 100644 (file)
--- a/address.h
+++ b/address.h
@@ -51,6 +51,12 @@ enum AddressError
   ERR_BAD_ADDR_SPEC
 };
 
+extern int RFC822Error;
+extern const char *const RFC822Errors[];
+extern const char RFC822Specials[];
+
+#define rfc822_error(x) RFC822Errors[x]
+
 struct Address *mutt_addr_append(struct Address **a, struct Address *b, int prune);
 void            mutt_addr_cat(char *buf, size_t buflen, const char *value, const char *specials);
 int             mutt_addr_cmp_strict(const struct Address *a, const struct Address *b);
@@ -67,10 +73,4 @@ int             mutt_addr_remove_from_list(struct Address **a, const char *mailb
 int             mutt_addr_search(struct Address *a, struct Address *lst);
 bool            mutt_addr_valid_msgid(const char *msgid);
 
-extern int RFC822Error;
-extern const char *const RFC822Errors[];
-extern const char RFC822Specials[];
-
-#define rfc822_error(x) RFC822Errors[x]
-
 #endif /* _MUTT_ADDRESS_H */
index ce7d3da7110e414826112907f57f5df5fdd592e0..8709565a9b16e0e3ec585c7caf420251573eb0e1 100644 (file)
@@ -14,7 +14,7 @@
       <tab type="globals" visible="yes" title="" intro=""/>
     </tab>
     <tab type="examples" visible="yes" title="" intro=""/>
-    <tab type="usergroup" url="pages.html" title="Libaries">
+    <tab type="usergroup" url="pages.html" title="Libraries">
        <tab type="pages" visible="yes" title="Libraries" intro="These libraries contain are an attempt to make NeoMutt more modular."/>
     </tab>
     <tab type="modules" visible="yes" title="" intro=""/>
index ead2bc821cdf71b743f403f7d6e6bebfce653c39..112a661e827c007b89b75bde039bcdb920c25c1e 100644 (file)
  *
  * Representation of an email header (envelope)
  *
- * | Function         | Description
- * | :--------------- | :---------------------------------
- * | mutt_env_free()  | Free an Envelope
- * | mutt_env_merge() | Merge the headers of two Envelopes
- * | mutt_env_new()   | Create a new Envelope
+ * | Function              | Description
+ * | :-------------------- | :---------------------------------
+ * | mutt_env_cmp_strict() | Strictly compare two Envelopes
+ * | mutt_env_free()       | Free an Envelope
+ * | mutt_env_merge()      | Merge the headers of two Envelopes
+ * | mutt_env_new()        | Create a new Envelope
  */
 
 #include "config.h"
@@ -165,7 +166,13 @@ void mutt_env_merge(struct Envelope *base, struct Envelope **extra)
   mutt_env_free(extra);
 }
 
-int mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2)
+/**
+ * mutt_env_cmp_strict - Strictly compare two Envelopes
+ * @param e1 First Envelope
+ * @param e2 Second Envelope
+ * @retval true Envelopes are strictly identical
+ */
+bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2)
 {
   if (e1 && e2)
   {
@@ -177,15 +184,15 @@ int mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2)
         !mutt_addr_cmp_strict(e1->reply_to, e2->reply_to) ||
         !mutt_addr_cmp_strict(e1->to, e2->to) || !mutt_addr_cmp_strict(e1->cc, e2->cc) ||
         !mutt_addr_cmp_strict(e1->return_path, e2->return_path))
-      return 0;
+      return false;
     else
-      return 1;
+      return true;
   }
   else
   {
     if (!e1 && !e2)
-      return 1;
+      return true;
     else
-      return 0;
+      return false;
   }
 }
index 59dd959a15a42209a2140dbda0c124fd48c21e55..ff11ceba28b135becf2e2d4f8971af2085e5f014 100644 (file)
@@ -64,7 +64,7 @@ struct Envelope
   bool refs_changed : 1; /**< References changed to break thread */
 };
 
-int              mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2);
+bool             mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2);
 void             mutt_env_free(struct Envelope **p);
 void             mutt_env_merge(struct Envelope *base, struct Envelope **extra);
 struct Envelope *mutt_env_new(void);
index 9f251ddc795daae0292d0297f6cd214ee19efb45..b9ccb583194406f5f67cb01e915b94546068a590 100644 (file)
@@ -1461,9 +1461,7 @@ int imap_check(struct ImapData *idata, int force)
 
 /**
  * imap_buffy_check - Check for new mail in subscribed folders
- * @param force       Force an update
  * @param check_stats Check for message stats too
- * @retval num Number of mailboxes with new mail
  * @retval 0   Failure
  *
  * @note Returns 0 on failure
index a6e93848ef24f39b3692aa952be218099d4ccdb4..ef50380ade2db530374403e2071348d74c01d736 100644 (file)
 
 /**
  * mutt_debug_real - Output some debugging information
- * @param level Debug level
- * @param fmt   printf-like formatting string
- * @param ...   Arguments to be formatted
+ * @param function Function
+ * @param file     File
+ * @param line     Line number
+ * @param level    Debug level
+ * @param ...      Arguments to be formatted
  *
  * This stub function ignores the logging level and outputs all information to
  * stderr.
index e63cea9ca118ec5d93df260f031656006dcd2bc8..5125f52d0e8f2be33bbd280f4754d85a6ca43827 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /**
- * @page lib Library of shared functions
+ * @page mutt Shared functions
  *
  * Each source file in the library provides a group of related functions.
  *
index 086661a6038bae2182cd8059db7bbac377854546..1f087a91ced7c9f5b4c5cef0c9b6d9ec18e5ad32 100644 (file)
  *
  * Store attributes associated with a MIME part
  *
- * | Function                     | Description
- * | :--------------------------- | :---------------------------------------------------------
- * | mutt_param_delete()      | Delete a matching Parameter
- * | mutt_param_free()        | Free a Parameter
- * | mutt_param_get()         | Find a matching Parameter
- * | mutt_param_set()         | Set a Parameter
+ * | Function                | Description
+ * | :---------------------- | :------------------------------
+ * | mutt_param_cmp_strict() | Strictly compare two Parameters
+ * | mutt_param_delete()     | Delete a matching Parameter
+ * | mutt_param_free()       | Free a Parameter
+ * | mutt_param_get()        | Find a matching Parameter
+ * | mutt_param_new()        | Create a new Parameter
+ * | mutt_param_set()        | Set a Parameter
  */
 
 #include "config.h"
@@ -138,10 +140,10 @@ void mutt_param_delete(const char *attribute, struct Parameter **p)
 }
 
 /**
- * mutt_param_cmp_strict - strictly compare two parameters
- * @param p1 first parameter
- * @param p2 second parameter
- * @retval true parameters are strictly identical
+ * mutt_param_cmp_strict - Strictly compare two Parameters
+ * @param p1 First parameter
+ * @param p2 Second parameter
+ * @retval true Parameters are strictly identical
  */
 int mutt_param_cmp_strict(const struct Parameter *p1, const struct Parameter *p2)
 {
diff --git a/tags.c b/tags.c
index 10a464a79070835c5250883c6589ddd370357449..491d5693bfe8652e8a5f0c308a4eaedd21192f0d 100644 (file)
--- a/tags.c
+++ b/tags.c
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/**
+ * @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"
 #include <stddef.h>
 #include "mutt/hash.h"
@@ -28,8 +50,8 @@
 #include "tags.h"
 #include "globals.h"
 
-char *HiddenTags;
-struct Hash *TagTransforms;
+char *HiddenTags;           /**< Private tags which should not be displayed */
+struct Hash *TagTransforms; /**< Lookup table of alternative tag names */
 
 /**
  * driver_tags_free - Free tags from a header
@@ -55,7 +77,7 @@ void driver_tags_free(struct TagHead *head)
 }
 
 /**
- * driver_tags_get_transformed - Get transformed tags
+ * driver_tags_getter - Get transformed tags
  * @param head             List of tags
  * @param show_hidden      Show hidden tags
  * @param show_transformed Show transformed tags
@@ -174,17 +196,15 @@ static void driver_tags_add(struct TagHead *head, char *new_tag)
  * driver_tags_replace - Replace all tags
  * @param[in] head List of tags
  * @param[in] tags string of all tags separated by space
+ * @retval false No changes are made
+ * @retval true  Tags are updated
  *
- * @retval  0 If no change are made
- * @retval  1 If tags are updated
- *
- * Free current tags structures and replace it by
- * new tags
+ * Free current tags structures and replace it by new tags
  */
-int driver_tags_replace(struct TagHead *head, char *tags)
+bool driver_tags_replace(struct TagHead *head, char *tags)
 {
   if (!head)
-    return 0;
+    return false;
 
   driver_tags_free(head);
 
@@ -195,5 +215,5 @@ int driver_tags_replace(struct TagHead *head, char *tags)
       driver_tags_add(head, tag);
     FREE(&tags);
   }
-  return 1;
+  return true;
 }
diff --git a/tags.h b/tags.h
index d02613364880ed81bb62c4a26b0d8402e164ae1e..3b5624ed7b5052dae68c068ca574392fdd59997d 100644 (file)
--- a/tags.h
+++ b/tags.h
@@ -35,8 +35,6 @@ extern struct Hash *TagTransforms;
  *
  * Keep a linked list of header tags and their transformed values.
  * Textual tags can be transformed to symbols to save space.
- *
- * @sa TagNode
  */
 struct TagNode
 {
@@ -47,11 +45,11 @@ struct TagNode
 };
 STAILQ_HEAD(TagHead, TagNode);
 
-void driver_tags_free(struct TagHead *head);
+void  driver_tags_free(struct TagHead *head);
 char *driver_tags_get(struct TagHead *head);
-char *driver_tags_get_with_hidden(struct TagHead *head);
-char *driver_tags_get_transformed(struct TagHead *head);
 char *driver_tags_get_transformed_for(char *name, struct TagHead *head);
-int driver_tags_replace(struct TagHead *head, char *tags);
+char *driver_tags_get_transformed(struct TagHead *head);
+char *driver_tags_get_with_hidden(struct TagHead *head);
+bool  driver_tags_replace(struct TagHead *head, char *tags);
 
 #endif /* _MUTT_TAG_H */