]> granicus.if.org Git - neomutt/commitdiff
doxy: misc
authorRichard Russon <rich@flatcap.org>
Sat, 4 Aug 2018 22:24:26 +0000 (23:24 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 4 Aug 2018 22:24:36 +0000 (23:24 +0100)
color.c
email/rfc2047.c
init.c
mutt/list.h
nntp/nntp.c
sort.c
sort.h

diff --git a/color.c b/color.c
index d497589de6ab83601428ef4b154cd5f256a37467..e5d057ac7caf5749878cfc808f2d93bed9bc9620 100644 (file)
--- a/color.c
+++ b/color.c
@@ -867,22 +867,25 @@ static int parse_object(struct Buffer *buf, struct Buffer *s, int *o, int *ql,
   return 0;
 }
 
-typedef int (*parser_callback_t)(struct Buffer *buf, struct Buffer *s, int *fg,
-                                 int *bg, int *attr, struct Buffer *err);
-
-#ifdef HAVE_COLOR
-
 /**
- * parse_color_pair - Parse a pair of colours
+ * parser_callback_t - Prototype for a function to parse color config
  * @param[in]  buf Temporary Buffer space
  * @param[in]  s    Buffer containing string to be parsed
- * @param[out] fg   Foreground colour
- * @param[out] bg   Background colour
+ * @param[out] fg   Foreground colour (set to -1)
+ * @param[out] bg   Background colour (set to -1)
  * @param[out] attr Attribute flags
  * @param[out] err  Buffer for error messages
  * @retval  0 Success
  * @retval -1 Error
  */
+typedef int (*parser_callback_t)(struct Buffer *buf, struct Buffer *s, int *fg,
+                                 int *bg, int *attr, struct Buffer *err);
+
+#ifdef HAVE_COLOR
+
+/**
+ * parse_color_pair - Parse a pair of colours - Implements ::parser_callback_t
+ */
 static int parse_color_pair(struct Buffer *buf, struct Buffer *s, int *fg,
                             int *bg, int *attr, struct Buffer *err)
 {
@@ -914,15 +917,7 @@ static int parse_color_pair(struct Buffer *buf, struct Buffer *s, int *fg,
 #endif
 
 /**
- * parse_attr_spec - Parse an attribute description
- * @param[in]  buf Temporary Buffer space
- * @param[in]  s    Buffer containing string to be parsed
- * @param[out] fg   Foreground colour (set to -1)
- * @param[out] bg   Background colour (set to -1)
- * @param[out] attr Attribute flags
- * @param[out] err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_attr_spec - Parse an attribute description - Implements ::parser_callback_t
  */
 static int parse_attr_spec(struct Buffer *buf, struct Buffer *s, int *fg,
                            int *bg, int *attr, struct Buffer *err)
@@ -983,7 +978,7 @@ static int fgbgattr_to_color(int fg, int bg, int attr)
  * @param buf      Temporary Buffer space
  * @param s        Buffer containing string to be parsed
  * @param err      Buffer for error messages
- * @param callback Function to handle command
+ * @param callback Function to handle command - Implements ::parser_callback_t
  * @param dry_run  If true, test the command, but don't apply it
  * @param color    If true "color", else "mono"
  * @retval  0 Success
index 5a222ed2528d57915d942b3da0b4235a64ad63f2..dfbbcff7c6e16b5b31dcdc1c9514cbc61a299580 100644 (file)
 
 #define CONTINUATION_BYTE(c) (((c) &0xc0) == 0x80)
 
-typedef size_t (*encoder_t)(char *str, const char *buf, size_t buflen, const char *tocode);
-
 /**
- * b_encoder - Base64 Encode a string
+ * encoder_t - Prototype for an encoding function
  * @param str    String to encode
  * @param buf    Buffer for result
  * @param buflen Length of buffer
  * @param tocode Character encoding
  * @retval num Bytes written to buffer
  */
+typedef size_t (*encoder_t)(char *str, const char *buf, size_t buflen, const char *tocode);
+
+/**
+ * b_encoder - Base64 Encode a string - Implements ::encoder_t
+ */
 static size_t b_encoder(char *str, const char *buf, size_t buflen, const char *tocode)
 {
   char *s0 = str;
@@ -89,12 +92,7 @@ static size_t b_encoder(char *str, const char *buf, size_t buflen, const char *t
 }
 
 /**
- * q_encoder - Quoted-printable Encode a string
- * @param str    String to encode
- * @param buf    Buffer for result
- * @param buflen Length of buffer
- * @param tocode Character encoding
- * @retval num Bytes written to buffer
+ * q_encoder - Quoted-printable Encode a string - Implements ::encoder_t
  */
 static size_t q_encoder(char *str, const char *buf, size_t buflen, const char *tocode)
 {
@@ -653,7 +651,7 @@ void rfc2047_decode(char **pd)
   struct Buffer buf = { 0 }; /* Output buffer                          */
   char *s = *pd;             /* Read pointer                           */
   char *beg = NULL;          /* Begin of encoded word                  */
-  enum ContentEncoding enc;  /* ENC_BASE64 or ENC_QUOTED_PRINTABLE        */
+  enum ContentEncoding enc;  /* ENC_BASE64 or ENC_QUOTED_PRINTABLE     */
   char *charset = NULL;      /* Which charset                          */
   size_t charsetlen;         /* Length of the charset                  */
   char *text = NULL;         /* Encoded text                           */
diff --git a/init.c b/init.c
index 69abc60228cdd4291aafa56d72cf1e335da235ec..ce6413a92eb7879c5673c94d7c112fb3be57f4d8 100644 (file)
--- a/init.c
+++ b/init.c
@@ -2979,8 +2979,7 @@ int mutt_extract_token(struct Buffer *dest, struct Buffer *tok, int flags)
 }
 
 /**
- * mutt_free_attachmatch - Free an AttachMatch
- * @param am AttachMatch to free
+ * mutt_free_attachmatch - Free an AttachMatch - Implements ::list_free_t
  *
  * @note We don't free minor because it is either a pointer into major,
  *       or a static string.
index d1e3eb7f939cec016fb4b8cd536f88b36bc47f67..d6ed7f396b69b82dae67f3daa9c485f5accd76af 100644 (file)
@@ -44,6 +44,10 @@ struct ListNode
  */
 STAILQ_HEAD(ListHead, ListNode);
 
+/**
+ * list_free_t - Prototype for a function to free List data
+ * @param ptr Data to free
+ */
 typedef void (*list_free_t)(void **ptr);
 
 void             mutt_list_clear(struct ListHead *h);
index 0fb79a005b66ef5945c7515e4c6b6fca8b482cd6..e24901716120247fc94c1a85b054e0b1c768f13b 100644 (file)
@@ -2605,12 +2605,7 @@ int nntp_check_children(struct Context *ctx, const char *msgid)
 }
 
 /**
- * nntp_compare_order - Sort to mailbox order
- * @param a First Header to compare
- * @param b First Header to compare
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * nntp_compare_order - Sort to mailbox order - Implements ::sort_t
  */
 int nntp_compare_order(const void *a, const void *b)
 {
diff --git a/sort.c b/sort.c
index 78625b4fe43c45bedd7dae57057e76613635cf27..e279ce07d3a62889627a3f772be8b90f55ffea90 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -72,12 +72,7 @@ int perform_auxsort(int retval, const void *a, const void *b)
 }
 
 /**
- * compare_score - Compare two emails using their scores
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_score - Compare two emails using their scores - Implements ::sort_t
  */
 static int compare_score(const void *a, const void *b)
 {
@@ -89,12 +84,7 @@ static int compare_score(const void *a, const void *b)
 }
 
 /**
- * compare_size - Compare the size of two emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_size - Compare the size of two emails - Implements ::sort_t
  */
 static int compare_size(const void *a, const void *b)
 {
@@ -106,12 +96,7 @@ static int compare_size(const void *a, const void *b)
 }
 
 /**
- * compare_date_sent - Compare the sent date of two emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_date_sent - Compare the sent date of two emails - Implements ::sort_t
  */
 static int compare_date_sent(const void *a, const void *b)
 {
@@ -123,12 +108,7 @@ static int compare_date_sent(const void *a, const void *b)
 }
 
 /**
- * compare_subject - Compare the subject of two emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_subject - Compare the subject of two emails - Implements ::sort_t
  */
 static int compare_subject(const void *a, const void *b)
 {
@@ -179,12 +159,7 @@ const char *mutt_get_name(struct Address *a)
 }
 
 /**
- * compare_to - Compare the 'to' fields of two emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_to - Compare the 'to' fields of two emails - Implements ::sort_t
  */
 static int compare_to(const void *a, const void *b)
 {
@@ -200,12 +175,7 @@ static int compare_to(const void *a, const void *b)
 }
 
 /**
- * compare_from - Compare the 'from' fields of two emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_from - Compare the 'from' fields of two emails - Implements ::sort_t
  */
 static int compare_from(const void *a, const void *b)
 {
@@ -221,12 +191,7 @@ static int compare_from(const void *a, const void *b)
 }
 
 /**
- * compare_date_received - Compare the date received of two emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_date_received - Compare the date received of two emails - Implements ::sort_t
  */
 static int compare_date_received(const void *a, const void *b)
 {
@@ -238,12 +203,7 @@ static int compare_date_received(const void *a, const void *b)
 }
 
 /**
- * compare_order - Restore the 'unsorted' order of emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_order - Restore the 'unsorted' order of emails - Implements ::sort_t
  */
 static int compare_order(const void *a, const void *b)
 {
@@ -255,12 +215,7 @@ static int compare_order(const void *a, const void *b)
 }
 
 /**
- * compare_spam - Compare the spam values of two emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_spam - Compare the spam values of two emails - Implements ::sort_t
  */
 static int compare_spam(const void *a, const void *b)
 {
@@ -319,12 +274,7 @@ static int compare_spam(const void *a, const void *b)
 }
 
 /**
- * compare_label - Compare the labels of two emails
- * @param a First email
- * @param b Second email
- * @retval -1 a precedes b
- * @retval  0 a and b are identical
- * @retval  1 b precedes a
+ * compare_label - Compare the labels of two emails - Implements ::sort_t
  */
 static int compare_label(const void *a, const void *b)
 {
@@ -359,7 +309,7 @@ static int compare_label(const void *a, const void *b)
 /**
  * mutt_get_sort_func - Get the sort function for a given sort id
  * @param method Sort id, e.g. #SORT_DATE
- * @retval ptr qsort-compatible sort function
+ * @retval ptr sort function - Implements ::sort_t
  */
 sort_t *mutt_get_sort_func(int method)
 {
diff --git a/sort.h b/sort.h
index a4078833d1a270c3c132e0982fc914f0d6e6d5b4..f5838cc60e11c239f9fcfc2dced12005fb6b44fe 100644 (file)
--- a/sort.h
+++ b/sort.h
@@ -36,7 +36,16 @@ extern bool ReverseAlias;
 
 #define SORTCODE(x) (Sort & SORT_REVERSE) ? -(x) : x
 
+/**
+ * sort_t - Prototype for a function to compare two emails
+ * @param a First email
+ * @param b Second email
+ * @retval -1 a precedes b
+ * @retval  0 a and b are identical
+ * @retval  1 b precedes a
+ */
 typedef int sort_t(const void *a, const void *b);
+
 sort_t *mutt_get_sort_func(int method);
 
 void mutt_sort_headers(struct Context *ctx, int init);