Skip to content

Commit

Permalink
doxy: tidy naming / comments
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Oct 22, 2021
1 parent 169fa4c commit 20d1da5
Show file tree
Hide file tree
Showing 56 changed files with 216 additions and 195 deletions.
2 changes: 1 addition & 1 deletion address/address.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extern const char AddressSpecials[];
#define address_error(num) AddressErrors[num]

/**
* typedef addr_predicate_t - Test an Address for some condition
* typedef addr_predicate_t - Prototype for an Address Test function
* @param a Address to test
* @retval true Address matches the test
*/
Expand Down
5 changes: 2 additions & 3 deletions alias/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct Alias;
struct MuttWindow;

/**
* AliasView - GUI data wrapping an Alias
* struct AliasView - GUI data wrapping an Alias
*/
struct AliasView
{
Expand All @@ -43,11 +43,10 @@ struct AliasView
bool is_visible : 1; ///< Is visible?
struct Alias *alias; ///< Alias
};

ARRAY_HEAD(AliasViewArray, struct AliasView);

/**
* AliasMenuData - AliasView array wrapper with Pattern information - @extends Menu
* struct AliasMenuData - AliasView array wrapper with Pattern information - @extends Menu
*/
struct AliasMenuData
{
Expand Down
2 changes: 1 addition & 1 deletion bcache/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct ConnAccount;
struct BodyCache;

/**
* typedef bcache_list_t - Prototype for mutt_bcache_list() callback
* typedef bcache_list_t - Prototype for a mutt_bcache_list() callback function
* @param id Cache id
* @param bcache Body Cache from mutt_bcache_open()
* @param data Data to pass to the callback function
Expand Down
3 changes: 1 addition & 2 deletions compose/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ struct ComposeSharedData;
/**
* @defgroup compose_function_api Compose Function API
*
* Perform a Compose Function
* Prototype for a Compose Function
*
* typedef compose_function_t - Perform an Index Function
* @param shared Shared Compose data
* @param op Operation to perform, e.g. OP_COMPOSE_WRITE_MESSAGE
* @retval enum #IndexRetval
Expand Down
8 changes: 4 additions & 4 deletions compress/compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#include "lib.h"

/**
* compr_ops - Backend implementations
* CompressOps - Backend implementations
*/
static const struct ComprOps *compr_ops[] = {
static const struct ComprOps *CompressOps[] = {
#ifdef HAVE_LZ4
&compr_lz4_ops,
#endif
Expand All @@ -57,7 +57,7 @@ static const struct ComprOps *compr_ops[] = {
const char *compress_list(void)
{
char tmp[256] = { 0 };
const struct ComprOps **ops = compr_ops;
const struct ComprOps **ops = CompressOps;
size_t len = 0;

for (; *ops; ops++)
Expand All @@ -79,7 +79,7 @@ const char *compress_list(void)
*/
const struct ComprOps *compress_get_ops(const char *compr)
{
const struct ComprOps **ops = compr_ops;
const struct ComprOps **ops = CompressOps;

if (!compr || !*compr)
return *ops;
Expand Down
2 changes: 0 additions & 2 deletions compress/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
* @defgroup compress_api Compression API
*
* The Compression API
*
* struct ComprOps - Header Cache Compression API
*/
struct ComprOps
{
Expand Down
6 changes: 3 additions & 3 deletions config/address.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* - Empty address is stored as `NULL`
* - Validator is passed `struct Address *`, which may be `NULL`
* - Data is freed when `ConfigSet` is freed
* - Implementation: #cst_address
* - Implementation: #CstAddress
*/

#include "config.h"
Expand Down Expand Up @@ -257,9 +257,9 @@ void address_free(struct Address **addr)
}

/**
* cst_address - Config type representing an Email Address
* CstAddress - Config type representing an Email Address
*/
const struct ConfigSetType cst_address = {
const struct ConfigSetType CstAddress = {
DT_ADDRESS,
"address",
address_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/bool.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* - Backed by `bool`
* - Validator is passed `bool`
* - Valid user entry: #BoolValues
* - Implementation: #cst_bool
* - Implementation: #CstBool
*/

#include "config.h"
Expand Down Expand Up @@ -219,9 +219,9 @@ int bool_str_toggle(struct ConfigSubset *sub, const char *name, struct Buffer *e
}

/**
* cst_bool - Config type representing an boolean
* CstBool - Config type representing an boolean
*/
const struct ConfigSetType cst_bool = {
const struct ConfigSetType CstBool = {
DT_BOOL,
"boolean",
bool_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/enum.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* - Backed by `unsigned char`
* - Validator is passed `unsigned char`
* - Implementation: #cst_enum
* - Implementation: #CstEnum
*/

#include "config.h"
Expand Down Expand Up @@ -185,9 +185,9 @@ static int enum_reset(const struct ConfigSet *cs, void *var,
}

/**
* cst_enum - Config type representing an enumeration
* CstEnum - Config type representing an enumeration
*/
const struct ConfigSetType cst_enum = {
const struct ConfigSetType CstEnum = {
DT_ENUM,
"enum",
enum_string_set,
Expand Down
2 changes: 1 addition & 1 deletion config/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
/**
* @defgroup cfg_module_api Config Module API
*
* Prototype for a config definition function
* Prototype for a Config Definition Function
*
* @param cs Config items
* @retval true All the config variables were registered
Expand Down
6 changes: 3 additions & 3 deletions config/long.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* - Backed by `long`
* - Validator is passed `long`
* - Implementation: #cst_long
* - Implementation: #CstLong
*/

#include "config.h"
Expand Down Expand Up @@ -232,9 +232,9 @@ static int long_reset(const struct ConfigSet *cs, void *var,
}

/**
* cst_long - Config type representing a long
* CstLong - Config type representing a long
*/
const struct ConfigSetType cst_long = {
const struct ConfigSetType CstLong = {
DT_LONG,
"long",
long_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/mbtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* - Empty multibyte character table is stored as `NULL`
* - Validator is passed `struct MbTable`, which may be `NULL`
* - Data is freed when `ConfigSet` is freed
* - Implementation: #cst_mbtable
* - Implementation: #CstMbtable
*/

#include "config.h"
Expand Down Expand Up @@ -290,9 +290,9 @@ void mbtable_free(struct MbTable **table)
}

/**
* cst_mbtable - Config type representing a multi-byte table
* CstMbtable - Config type representing a multi-byte table
*/
const struct ConfigSetType cst_mbtable = {
const struct ConfigSetType CstMbtable = {
DT_MBTABLE,
"mbtable",
mbtable_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/number.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* - Backed by `short`
* - Validator is passed `short`
* - Implementation: #cst_number
* - Implementation: #CstNumber
*/

#include "config.h"
Expand Down Expand Up @@ -252,9 +252,9 @@ static int number_reset(const struct ConfigSet *cs, void *var,
}

/**
* cst_number - Config type representing a number
* CstNumber - Config type representing a number
*/
const struct ConfigSetType cst_number = {
const struct ConfigSetType CstNumber = {
DT_NUMBER,
"number",
number_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* - Empty path is stored as `NULL`
* - Validator is passed `char *`, which may be `NULL`
* - Data is freed when `ConfigSet` is freed
* - Implementation: #cst_path
* - Implementation: #CstPath
*/

#include "config.h"
Expand Down Expand Up @@ -242,9 +242,9 @@ static int path_reset(const struct ConfigSet *cs, void *var,
}

/**
* cst_path - Config type representing a path
* CstPath - Config type representing a path
*/
const struct ConfigSetType cst_path = {
const struct ConfigSetType CstPath = {
DT_PATH,
"path",
path_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/quad.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* - Backed by `unsigned char`
* - Validator is passed `unsigned char`
* - Valid user entry: #QuadValues
* - Implementation: #cst_quad
* - Implementation: #CstQuad
*/

#include "config.h"
Expand Down Expand Up @@ -239,9 +239,9 @@ int quad_str_toggle(struct ConfigSubset *sub, const char *name, struct Buffer *e
}

/**
* cst_quad - Config type representing a quad-option
* CstQuad - Config type representing a quad-option
*/
const struct ConfigSetType cst_quad = {
const struct ConfigSetType CstQuad = {
DT_QUAD,
"quad",
quad_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* - Empty regular expression is stored as `NULL`
* - Validator is passed `struct Regex`, which may be `NULL`
* - Data is freed when `ConfigSet` is freed
* - Implementation: #cst_regex
* - Implementation: #CstRegex
*/

#include "config.h"
Expand Down Expand Up @@ -296,9 +296,9 @@ static int regex_reset(const struct ConfigSet *cs, void *var,
}

/**
* cst_regex - Config type representing a regular expression
* CstRegex - Config type representing a regular expression
*/
const struct ConfigSetType cst_regex = {
const struct ConfigSetType CstRegex = {
DT_REGEX,
"regex",
regex_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/slist.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* - Empty string list is stored as `NULL`
* - Validator is passed `struct Slist`, which may be `NULL`
* - Data is freed when `ConfigSet` is freed
* - Implementation: #cst_slist
* - Implementation: #CstSlist
*/

#include "config.h"
Expand Down Expand Up @@ -299,9 +299,9 @@ static int slist_reset(const struct ConfigSet *cs, void *var,
}

/**
* cst_slist - Config type representing a list of strings
* CstSlist - Config type representing a list of strings
*/
const struct ConfigSetType cst_slist = {
const struct ConfigSetType CstSlist = {
DT_SLIST,
"slist",
slist_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* - Backed by `short`
* - Validator is passed `short`
* - Implementation: #cst_sort
* - Implementation: #CstSort
*/

#include "config.h"
Expand Down Expand Up @@ -208,9 +208,9 @@ static int sort_reset(const struct ConfigSet *cs, void *var,
}

/**
* cst_sort - Config type representing a sort option
* CstSort - Config type representing a sort option
*/
const struct ConfigSetType cst_sort = {
const struct ConfigSetType CstSort = {
DT_SORT,
"sort",
sort_string_set,
Expand Down
6 changes: 3 additions & 3 deletions config/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* - Empty string is stored as `NULL`
* - Validator is passed `char *`, which may be `NULL`
* - Data is freed when `ConfigSet` is freed
* - Implementation: #cst_string
* - Implementation: #CstString
*/

#include "config.h"
Expand Down Expand Up @@ -253,9 +253,9 @@ static int string_reset(const struct ConfigSet *cs, void *var,
}

/**
* cst_string - Config type representing a string
* CstString - Config type representing a string
*/
const struct ConfigSetType cst_string = {
const struct ConfigSetType CstString = {
DT_STRING,
"string",
string_string_set,
Expand Down
8 changes: 4 additions & 4 deletions conn/sasl.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ struct SaslSockData
};

/**
* sasl_authenticators - Authenticaion methods supported by Cyrus SASL
* SaslAuthenticators - Authenticaion methods supported by Cyrus SASL
*/
static const char *const sasl_authenticators[] = {
static const char *const SaslAuthenticators[] = {
"ANONYMOUS", "CRAM-MD5", "DIGEST-MD5", "EXTERNAL",
"GS2-IAKERB", "GS2-KRB5", "GSS-SPNEGO", "GSSAPI",
"LOGIN", "NTLM", "OTP-MD4", "OTP-MD5",
Expand Down Expand Up @@ -129,9 +129,9 @@ static sasl_secret_t *secret_ptr = NULL;
*/
bool sasl_auth_validator(const char *authenticator)
{
for (size_t i = 0; i < mutt_array_size(sasl_authenticators); i++)
for (size_t i = 0; i < mutt_array_size(SaslAuthenticators); i++)
{
const char *auth = sasl_authenticators[i];
const char *auth = SaslAuthenticators[i];
if (mutt_istr_equal(auth, authenticator))
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion core/neomutt.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct NeoMutt
extern struct NeoMutt *NeoMutt;

/**
* NotifyGlobal - Events not associated with an object
* enum NotifyGlobal - Events not associated with an object
*/
enum NotifyGlobal
{
Expand Down
3 changes: 1 addition & 2 deletions format_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ typedef uint8_t MuttFormatFlags; ///< Flags for mutt_expando_format(), e
/**
* @defgroup expando_api Expando API
*
* Callback functions for mutt_expando_format().
* Prototype for a mutt_expando_format() Callback Function
*
* typedef format_t - Prototype for a mutt_expando_format() callback function
* @param[out] buf Buffer in which to save string
* @param[in] buflen Buffer length
* @param[in] col Starting column
Expand Down
Loading

0 comments on commit 20d1da5

Please sign in to comment.