Skip to content

Commit

Permalink
doxy: tidy comments
Browse files Browse the repository at this point in the history
- unify single-line comments
- fix typedef parsing
  • Loading branch information
flatcap committed Nov 30, 2019
1 parent 1dd175c commit 008b927
Show file tree
Hide file tree
Showing 44 changed files with 210 additions and 206 deletions.
4 changes: 2 additions & 2 deletions address/address.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ struct Address *mutt_addr_create(const char *personal, const char *mailbox)

/**
* mutt_addrlist_remove - Remove an Address from a list
* @param[in, out] al AddressList
* @param[in] mailbox Email address to match
* @param[in,out] al AddressList
* @param[in] mailbox Email address to match
* @retval 0 Success
* @retval -1 Error, or email not found
*/
Expand Down
12 changes: 6 additions & 6 deletions browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ struct FolderFile
char *name;
char *desc;

bool has_new_mail; /**< true if mailbox has "new mail" */
int msg_count; /**< total number of messages */
int msg_unread; /**< number of unread messages */
bool has_new_mail; ///< true if mailbox has "new mail"
int msg_count; ///< total number of messages
int msg_unread; ///< number of unread messages

#ifdef USE_IMAP
char delim;
Expand All @@ -82,7 +82,7 @@ struct FolderFile
bool inferiors : 1;
#endif
bool has_mailbox : 1;
bool local : 1; /**< folder is on local filesystem */
bool local : 1; ///< folder is on local filesystem
bool tagged : 1;
#ifdef USE_NNTP
struct NntpMboxData *nd;
Expand All @@ -95,8 +95,8 @@ struct FolderFile
struct BrowserState
{
struct FolderFile *entry;
size_t entrylen; /**< number of real entries */
unsigned int entrymax; /**< max entry */
size_t entrylen; ///< number of real entries
unsigned int entrymax; ///< max entry
#ifdef USE_IMAP
bool imap_browse;
char *folder;
Expand Down
8 changes: 4 additions & 4 deletions config/mbtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ struct ConfigSet;
*/
struct MbTable
{
char *orig_str; /**< Original string used to generate this object */
int len; /**< Number of characters */
char **chars; /**< The array of multibyte character strings */
char *segmented_str; /**< Each chars entry points inside this string */
char *orig_str; ///< Original string used to generate this object
int len; ///< Number of characters
char **chars; ///< The array of multibyte character strings
char *segmented_str; ///< Each chars entry points inside this string
};

void mbtable_init(struct ConfigSet *cs);
Expand Down
34 changes: 17 additions & 17 deletions config/set.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ enum NotifyConfig
};

/* Config Set Results */
#define CSR_SUCCESS 0 /**< Action completed successfully */
#define CSR_ERR_CODE 1 /**< Problem with the code */
#define CSR_ERR_UNKNOWN 2 /**< Unrecognised config item */
#define CSR_ERR_INVALID 3 /**< Value hasn't been set */
#define CSR_SUCCESS 0 ///< Action completed successfully
#define CSR_ERR_CODE 1 ///< Problem with the code
#define CSR_ERR_UNKNOWN 2 ///< Unrecognised config item
#define CSR_ERR_INVALID 3 ///< Value hasn't been set

/* Flags for CSR_SUCCESS */
#define CSR_SUC_INHERITED (1 << 4) /**< Value is inherited */
#define CSR_SUC_EMPTY (1 << 5) /**< Value is empty/unset */
#define CSR_SUC_WARNING (1 << 6) /**< Notify the user of a warning */
#define CSR_SUC_NO_CHANGE (1 << 7) /**< The value hasn't changed */
#define CSR_SUC_INHERITED (1 << 4) ///< Value is inherited
#define CSR_SUC_EMPTY (1 << 5) ///< Value is empty/unset
#define CSR_SUC_WARNING (1 << 6) ///< Notify the user of a warning
#define CSR_SUC_NO_CHANGE (1 << 7) ///< The value hasn't changed

/* Flags for CSR_INVALID */
#define CSR_INV_TYPE (1 << 4) /**< Value is not valid for the type */
#define CSR_INV_VALIDATOR (1 << 5) /**< Value was rejected by the validator */
#define CSR_INV_TYPE (1 << 4) ///< Value is not valid for the type
#define CSR_INV_VALIDATOR (1 << 5) ///< Value was rejected by the validator

#define CSR_RESULT_MASK 0x0F
#define CSR_RESULT(x) ((x) & CSR_RESULT_MASK)
Expand Down Expand Up @@ -167,13 +167,13 @@ struct ConfigDef
*/
struct ConfigSetType
{
const char *name; /**< Name of the type, e.g. "String" */
cst_string_set string_set; /**< Convert the variable to a string */
cst_string_get string_get; /**< Initialise a variable from a string */
cst_native_set native_set; /**< Set the variable using a C-native type */
cst_native_get native_get; /**< Get the variable's value as a C-native type */
cst_reset reset; /**< Reset the variable to its initial, or parent, value */
cst_destroy destroy; /**< Free the resources for a variable */
const char *name; ///< Name of the type, e.g. "String"
cst_string_set string_set; ///< Convert the variable to a string
cst_string_get string_get; ///< Initialise a variable from a string
cst_native_set native_set; ///< Set the variable using a C-native type
cst_native_get native_get; ///< Get the variable's value as a C-native type
cst_reset reset; ///< Reset the variable to its initial, or parent, value
cst_destroy destroy; ///< Free the resources for a variable
};

/**
Expand Down
18 changes: 9 additions & 9 deletions config/sort2.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ extern const struct Mapping SortMethods[];
extern const struct Mapping SortSidebarMethods[];

/* ... DT_SORT */
#define DT_SORT_INDEX 0x000 /**< Sort id for #SortMethods */
#define DT_SORT_ALIAS 0x040 /**< Sort id for #SortAliasMethods */
#define DT_SORT_BROWSER 0x080 /**< Sort id for #SortBrowserMethods */
#define DT_SORT_KEYS 0x100 /**< Sort id for #SortKeyMethods */
#define DT_SORT_AUX 0x200 /**< Sort id for #SortAliasMethods */
#define DT_SORT_SIDEBAR 0x400 /**< Sort id for #SortSidebarMethods */
#define DT_SORT_INDEX 0x000 ///< Sort id for #SortMethods
#define DT_SORT_ALIAS 0x040 ///< Sort id for #SortAliasMethods
#define DT_SORT_BROWSER 0x080 ///< Sort id for #SortBrowserMethods
#define DT_SORT_KEYS 0x100 ///< Sort id for #SortKeyMethods
#define DT_SORT_AUX 0x200 ///< Sort id for #SortAliasMethods
#define DT_SORT_SIDEBAR 0x400 ///< Sort id for #SortSidebarMethods

/**
* enum SortType - Methods for sorting
Expand Down Expand Up @@ -82,9 +82,9 @@ enum SortType
* if we need more, so long as we don't collide with the constants above. (Or
* we can just expand sort and sort_aux to uint32_t.)
*/
#define SORT_MASK ((1 << 8) - 1) /**< Mask for the sort id */
#define SORT_REVERSE (1 << 8) /**< Reverse the order of the sort */
#define SORT_LAST (1 << 9) /**< Sort thread by last-X, e.g. received date */
#define SORT_MASK ((1 << 8) - 1) ///< Mask for the sort id
#define SORT_REVERSE (1 << 8) ///< Reverse the order of the sort
#define SORT_LAST (1 << 9) ///< Sort thread by last-X, e.g. received date

void sort_init(struct ConfigSet *cs);

Expand Down
2 changes: 1 addition & 1 deletion conn/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
struct Connection
{
struct ConnAccount account;
unsigned int ssf; /**< security strength factor, in bits */
unsigned int ssf; ///< security strength factor, in bits

char inbuf[1024];
int bufpos;
Expand Down
2 changes: 1 addition & 1 deletion curs_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
struct Buffer;

/* These Config Variables are only used in curs_lib.c */
extern bool C_MetaKey; /**< interpret ALT-x as ESC-x */
extern bool C_MetaKey; ///< interpret ALT-x as ESC-x

extern int MuttGetchTimeout; ///< Timeout in ms for mutt_getch()

Expand Down
2 changes: 1 addition & 1 deletion doxygen/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.

INPUT_FILTER = "sed -e 's/^ \+\* \(struct\|enum\|union\) [^ ]\+ - / * /' -e 's/^ \+\* [a-zA-Z0-9_]\+ - / * /' -e 's/^ \* Copyright ([Cc]) [-0-9,]\+ \([^<]*\)\( <.*>\)*/ * - \1/'"
INPUT_FILTER = "sed -e 's/^ \+\* \(enum\|struct\|typedef\|union\) [^ ]\+ - / * /' -e 's/^ \+\* [a-zA-Z0-9_]\+ - / * /' -e 's/^ \* Copyright ([Cc]) [-0-9,]\+ \([^<]*\)\( <.*>\)*/ * - \1/'"

# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the
Expand Down
2 changes: 1 addition & 1 deletion email/tags.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/* These Config Variables are only used in email/tags.c */
struct Slist *C_HiddenTags; ///< Config: Tags that shouldn't be displayed on screen

struct Hash *TagTransforms; /**< Lookup table of alternative tag names */
struct Hash *TagTransforms; ///< Lookup table of alternative tag names

/**
* driver_tags_getter - Get transformed tags
Expand Down
20 changes: 10 additions & 10 deletions imap/imap_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct ImapAccountData
ImapCapFlags capabilities;
unsigned char seqid; /* tag sequence prefix */
unsigned int seqno; ///< tag sequence number, e.g. '{seqid}0001'
time_t lastread; /**< last time we read a command for the server */
time_t lastread; ///< last time we read a command for the server
char *buf;
size_t blen;

Expand Down Expand Up @@ -212,13 +212,13 @@ struct ImapAccountData
*/
struct ImapMboxData
{
char *name; /**< Mailbox name */
char *munge_name; /**< Munged version of the mailbox name */
char *real_name; /**< Original Mailbox name, e.g.: INBOX can be just \0 */
char *name; ///< Mailbox name
char *munge_name; ///< Munged version of the mailbox name
char *real_name; ///< Original Mailbox name, e.g.: INBOX can be just \0

ImapOpenFlags reopen; /**< Flags, e.g. #IMAP_REOPEN_ALLOW */
ImapOpenFlags check_status; /**< Flags, e.g. #IMAP_NEWMAIL_PENDING */
unsigned int new_mail_count; /**< Set when EXISTS notifies of new mail */
ImapOpenFlags reopen; ///< Flags, e.g. #IMAP_REOPEN_ALLOW
ImapOpenFlags check_status; ///< Flags, e.g. #IMAP_NEWMAIL_PENDING
unsigned int new_mail_count; ///< Set when EXISTS notifies of new mail

// IMAP STATUS information
struct ListHead flags;
Expand All @@ -231,9 +231,9 @@ struct ImapMboxData

// Cached data used only when the mailbox is opened
struct Hash *uid_hash;
struct Email **msn_index; /**< look up headers by (MSN-1) */
size_t msn_index_size; /**< allocation size */
unsigned int max_msn; /**< the largest MSN fetched so far */
struct Email **msn_index; ///< look up headers by (MSN-1)
size_t msn_index_size; ///< allocation size
unsigned int max_msn; ///< the largest MSN fetched so far
struct BodyCache *bcache;

header_cache_t *hcache;
Expand Down
4 changes: 2 additions & 2 deletions imap/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ struct ImapEmailData

bool parsed : 1;

unsigned int uid; /**< 32-bit Message UID */
unsigned int msn; /**< Message Sequence Number */
unsigned int uid; ///< 32-bit Message UID
unsigned int msn; ///< Message Sequence Number

char *flags_system;
char *flags_remote;
Expand Down
2 changes: 1 addition & 1 deletion keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static struct Mapping KeyNames[] = {
{ NULL, 0 },
};

int LastKey; /**< contains the last key the user pressed */
int LastKey; ///< contains the last key the user pressed

struct Keymap *Keymaps[MENU_MAX];

Expand Down
20 changes: 10 additions & 10 deletions keymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ void init_extended_keys(void);
*/
struct Keymap
{
char *macro; /**< macro expansion (op == OP_MACRO) */
char *desc; /**< description of a macro for the help menu */
struct Keymap *next; /**< next key in map */
short op; /**< operation to perform */
short eq; /**< number of leading keys equal to next entry */
short len; /**< length of key sequence (unit: sizeof (keycode_t)) */
keycode_t *keys; /**< key sequence */
char *macro; ///< macro expansion (op == OP_MACRO)
char *desc; ///< description of a macro for the help menu
struct Keymap *next; ///< next key in map
short op; ///< operation to perform
short eq; ///< number of leading keys equal to next entry
short len; ///< length of key sequence (unit: sizeof (keycode_t))
keycode_t *keys; ///< key sequence
};

/**
Expand Down Expand Up @@ -113,9 +113,9 @@ extern const struct Mapping Menus[];
*/
struct Binding
{
const char *name; /**< name of the function */
int op; /**< function id number */
const char *seq; /**< default key binding */
const char *name; ///< name of the function
int op; ///< function id number
const char *seq; ///< default key binding
};

const struct Binding *km_get_table(enum MenuType menu);
Expand Down
6 changes: 3 additions & 3 deletions mailcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ struct MailcapEntry
char *printcommand;
char *nametemplate;
char *convert;
bool needsterminal : 1; /**< endwin() and system */
bool copiousoutput : 1; /**< needs pager, basically */
bool xneomuttkeep : 1; /**< do not remove the file on command exit */
bool needsterminal : 1; ///< endwin() and system
bool copiousoutput : 1; ///< needs pager, basically
bool xneomuttkeep : 1; ///< do not remove the file on command exit
};

/**
Expand Down
8 changes: 4 additions & 4 deletions mbox/mbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ struct stat;
*/
struct MboxAccountData
{
FILE *fp; /**< Mailbox file */
struct timespec atime; /**< File's last-access time */
FILE *fp; ///< Mailbox file
struct timespec atime; ///< File's last-access time

bool locked : 1; /**< is the mailbox locked? */
bool append : 1; /**< mailbox is opened in append mode */
bool locked : 1; ///< is the mailbox locked?
bool append : 1; ///< mailbox is opened in append mode
};

extern struct MxOps MxMboxOps;
Expand Down
2 changes: 1 addition & 1 deletion mutt/charset.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ enum LookupType
MUTT_LOOKUP_ICONV, ///< Character set conversion
};

#define MUTT_ICONV_HOOK_FROM 1 /**< apply charset-hooks to fromcode */
#define MUTT_ICONV_HOOK_FROM 1 ///< apply charset-hooks to fromcode

extern const struct MimeNames PreferredMimeNames[];

Expand Down
8 changes: 4 additions & 4 deletions mutt/date.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
*/
struct Tz
{
char tzname[5]; /**< Name, e.g. UTC */
unsigned char zhours; /**< Hours away from UTC */
unsigned char zminutes; /**< Minutes away from UTC */
bool zoccident; /**< True if west of UTC, False if East */
char tzname[5]; ///< Name, e.g. UTC
unsigned char zhours; ///< Hours away from UTC
unsigned char zminutes; ///< Minutes away from UTC
bool zoccident; ///< True if west of UTC, False if East
};

time_t mutt_date_add_timeout(time_t now, long timeout);
Expand Down
2 changes: 1 addition & 1 deletion mutt/envlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "memory.h"
#include "string2.h"

char **EnvList = NULL; /**< Private copy of the environment variables */
char **EnvList = NULL; ///< Private copy of the environment variables

/**
* mutt_envlist_free - Free the private copy of the environment
Expand Down
Loading

0 comments on commit 008b927

Please sign in to comment.