}
/**
- * address_sort_address - Compare two Addresses
+ * alias_sort_address - Compare two Addresses
* @param a First Address to compare
* @param b Second Address to compare
* @retval -1 a precedes b
}
/**
- * recode_buf - XXX
+ * recode_buf - Convert some text between two character sets
* @param buf Buffer to convert
* @param buflen Length of buffer
+ *
+ * The 'from' charset is controlled by the 'charset' config variable.
+ * The 'to' charset is controlled by the 'config_charset' config variable.
*/
static void recode_buf(char *buf, size_t buflen)
{
}
/**
- * mutt_expand_aliases_env - XXX
+ * mutt_expand_aliases_env - Expand aliases in all the fields of an Envelope
* @param env Envelope to expand
*/
void mutt_expand_aliases_env(struct Envelope *env)
}
#endif
+/**
+ * mutt_timeout_hook - Execute any timeout hooks
+ *
+ * The user can configure hooks to be run on timeout.
+ * This function finds all the matching hooks and executes them.
+ */
void mutt_timeout_hook(void)
{
struct Hook *hook = NULL;
}
// clang-format on
+/**
+ * start_curses - Start the curses or slang UI
+ * @retval 0 Success
+ * @retval 1 Failure
+ */
static int start_curses(void)
{
km_init(); /* must come before mutt_init */
return r;
}
+/**
+ * mbox_unlock_mailbox - Unlock a mailbox
+ * @param ctx Context to unlock
+ */
static void mbox_unlock_mailbox(struct Context *ctx)
{
if (ctx->locked)
}
}
+/**
+ * mmdf_parse_mailbox - Read a mailbox in MMDF format
+ * @param ctx Mailbox
+ * @retval 0 Success
+ * @retval -1 Failure
+ * @retval -2 Aborted
+ */
static int mmdf_parse_mailbox(struct Context *ctx)
{
char buf[HUGE_STRING];
/**
* mutt_file_touch_atime - Set the access time to current time
- * @param f File descriptor of the file to alter
+ * @param fd File descriptor of the file to alter
*
* This is just as read() would do on !noatime.
* Silently ignored if futimens() isn't supported.
/**
* @page crypt_cryptglue Wrapper around crypto functions
*
- * This file dispatches the generic crypto functions to the implemented backend
- * or provides dummy stubs. Note, that some generic functions are handled in
- * crypt.c.
+ * This file dispatches the generic crypto functions to the implemented
+ * backend or provides dummy stubs.
+ *
+ * @note Some generic functions are handled in crypt.c
*
* @note This file has been changed to make use of the new module system.
* Consequently there's a 1:1 mapping between the functions contained in this
* - signature class
*/
-/* decode the backslash-escaped user ids. */
-
static char *chs = NULL;
+/**
+ * fix_uid - Decode backslash-escaped user ids (in place)
+ * @param uid String to decode
+ */
static void fix_uid(char *uid)
{
char *s = NULL, *d = NULL;
}
}
+/**
+ * parse_pub_line - Parse the 'pub' line from the pgp output
+ * @param[in] buf Buffer containing string to parse
+ * @param[out] is_subkey Is this a subkey of another key?
+ * @param[in] k Key to from which to merge info (optional)
+ * @retval ptr PgpKeyInfo containing the (merged) results
+ * @retval NULL Error
+ */
static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKeyInfo *k)
{
struct PgpUid *uid = NULL;
* @page crypt_pgp PGP sign, encrypt, check routines
*
* This file contains all of the PGP routines necessary to sign, encrypt,
- * verify and decrypt PGP messages in either the new PGP/MIME format, or in the
- * older Application/Pgp format. It also contains some code to cache the
+ * verify and decrypt PGP messages in either the new PGP/MIME format, or in
+ * the older Application/Pgp format. It also contains some code to cache the
* user's passphrase for repeat use when decrypting or signing a message.
*/
#include <stdlib.h>
#include "mutt/mutt.h"
-#define CHUNKSIZE 1024
+#define CHUNKSIZE 1024 /**< Amount of data to read at once */
-static unsigned char *pbuf = NULL;
-static size_t plen = 0;
+static unsigned char *pbuf = NULL; /**< Cache PGP data packet */
+static size_t plen = 0; /**< Length of cached packet */
+/**
+ * read_material - Read PGP data into a buffer
+ * @param[in] material Number of bytes to read
+ * @param[in,out] used Number of bytes already read
+ * @param[in] fp File to read from
+ * @retval 0 Success
+ * @retval -1 Failure (see errno)
+ *
+ * This function uses a cache to store the data: #pbuf, #plen.
+ */
static int read_material(size_t material, size_t *used, FILE *fp)
{
if (*used + material >= plen)
return 0;
}
+/**
+ * pgp_read_packet - Read a PGP packet from a file
+ * @param[in] fp File to read from
+ * @param[out] len Number of bytes read
+ *
+ * This function uses a cache to store the data: #pbuf, #plen.
+ */
unsigned char *pgp_read_packet(FILE *fp, size_t *len)
{
size_t used = 0;
return NULL;
}
+/**
+ * pgp_release_packet - Free the cached PGP packet
+ *
+ * Free the data stored in #pbuf.
+ */
void pgp_release_packet(void)
{
plen = 0;
#include <string.h>
+/**
+ * rfc2047_encode_addrlist - Encode any RFC2047 headers, where required, in an Address list
+ * @param addr Address list
+ * @param tag Header tag (used for wrapping calculation)
+ */
void rfc2047_encode_addrlist(struct Address *addr, const char *tag)
{
struct Address *ptr = addr;
}
}
+/**
+ * rfc2047_decode_addrlist - Decode any RFC2047 headers in an Address list
+ * @param a Address list
+ */
void rfc2047_decode_addrlist(struct Address *a)
{
while (a)
static struct Score *ScoreList = NULL;
+/**
+ * mutt_check_rescore - Do the emails need to have their scores recalculated?
+ * @param ctx Mailbox
+ */
void mutt_check_rescore(struct Context *ctx)
{
if (OptNeedRescore && Score)
#include <stddef.h>
#include <wctype.h>
+/**
+ * wcscasecmp - Compare two wide-character strings, ignoring case
+ * @param a First string
+ * @param b Second string
+ * @retval -1 a precedes b
+ * @retval 0 a and b are identical
+ * @retval 1 b precedes a
+ */
int wcscasecmp(const wchar_t *a, const wchar_t *b)
{
if (!a && !b)