From ca7e2591b79d77dc2a118e8f5e96dfec963c5f4e Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sat, 30 Dec 2017 16:51:13 +0000 Subject: [PATCH] iwyu / comments --- browser.c | 2 +- mutt/base64.c | 16 ++++++++-------- mutt/buffer.c | 25 +++++++++++++------------ mutt/date.c | 10 +++++----- mutt/file.c | 10 +++++----- mutt/list.c | 1 + mutt/list.h | 1 - mutt/mapping.c | 1 + mutt/mapping.h | 2 -- mutt/mbyte.c | 6 +++--- mutt/regex.c | 5 ++++- mutt/signal.c | 5 ++--- mutt_address.c | 1 - protos.h | 4 +--- tags.c | 1 + 15 files changed, 45 insertions(+), 45 deletions(-) diff --git a/browser.c b/browser.c index 9d1de391c..b932798e4 100644 --- a/browser.c +++ b/browser.c @@ -1796,7 +1796,7 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi { Mask = mutt_mem_calloc(1, sizeof(struct Regex *)); } - mutt_str_replace(&Mask->pattern, buf); //QWQ + mutt_str_replace(&Mask->pattern, buf); Mask->regex = rx; Mask->not = not; diff --git a/mutt/base64.c b/mutt/base64.c index 01bbe6f4d..2f77fadf0 100644 --- a/mutt/base64.c +++ b/mutt/base64.c @@ -30,14 +30,14 @@ * @note RFC3548 obsoletes RFC2045. * @note RFC4648 obsoletes RFC3548. * - * | Data | Description - * | :----------------- | :-------------------------------------------------- + * | Data | Description + * | :---------------- | :-------------------------------------------------- * | #Index64 | Lookup table for Base64 encoding characters * - * | Function | Description - * | :----------------- | :------------------------------------------------- - * | mutt_b64_decode() | convert null-terminated base64 string to raw bytes - * | mutt_b64_encode() | convert raw bytes to null-terminated base64 string + * | Function | Description + * | :---------------- | :------------------------------------------------- + * | mutt_b64_encode() | Convert raw bytes to null-terminated base64 string + * | mutt_b64_decode() | Convert null-terminated base64 string to raw bytes */ #include "config.h" @@ -79,7 +79,7 @@ const int Index64[128] = { // clang-format on /** - * mutt_b64_encode - convert raw bytes to null-terminated base64 string + * mutt_b64_encode - Convert raw bytes to null-terminated base64 string * @param out Output buffer for the base64 encoded string * @param cin Input buffer for the raw bytes * @param len Length of the input buffer @@ -125,7 +125,7 @@ size_t mutt_b64_encode(char *out, const char *cin, size_t len, size_t olen) } /** - * mutt_b64_decode - convert null-terminated base64 string to raw bytes + * mutt_b64_decode - Convert null-terminated base64 string to raw bytes * @param out Output buffer for the raw bytes * @param in Input buffer for the null-terminated base64-encoded string * @retval n Number of bytes written on success diff --git a/mutt/buffer.c b/mutt/buffer.c index af153fc73..5d15bbd19 100644 --- a/mutt/buffer.c +++ b/mutt/buffer.c @@ -26,17 +26,19 @@ * * The Buffer object make parsing and manipulating strings easier. * - * | Function | Description - * | :------------------- | :-------------------------------------------------- - * | mutt_buffer_add() | Add a string to a Buffer, expanding it if necessary - * | mutt_buffer_addch() | Add a single character to a Buffer - * | mutt_buffer_addstr() | Add a string to a Buffer - * | mutt_buffer_free() | Release a Buffer and its contents - * | mutt_buffer_from() | Create Buffer from an existing string - * | mutt_buffer_init() | Initialise a new Buffer - * | mutt_buffer_new() | Create and initialise a Buffer - * | mutt_buffer_printf() | Format a string into a Buffer - * | mutt_buffer_reset() | Reset an existing Buffer + * | Function | Description + * | :--------------------- | :-------------------------------------------------- + * | mutt_buffer_add() | Add a string to a Buffer, expanding it if necessary + * | mutt_buffer_addch() | Add a single character to a Buffer + * | mutt_buffer_addstr() | Add a string to a Buffer + * | mutt_buffer_alloc() | Create a new Buffer + * | mutt_buffer_free() | Release a Buffer and its contents + * | mutt_buffer_from() | Create Buffer from an existing string + * | mutt_buffer_init() | Initialise a new Buffer + * | mutt_buffer_is_empty() | Is the Buffer empty? + * | mutt_buffer_new() | Create and initialise a Buffer + * | mutt_buffer_printf() | Format a string into a Buffer + * | mutt_buffer_reset() | Reset an existing Buffer */ #include "config.h" @@ -44,7 +46,6 @@ #include #include #include "buffer.h" -#include "debug.h" #include "memory.h" #include "string2.h" diff --git a/mutt/date.c b/mutt/date.c index 6f456244b..fa510cb52 100644 --- a/mutt/date.c +++ b/mutt/date.c @@ -25,11 +25,11 @@ * * Some commonly used time and date functions. * - * | Data | Description - * | :-------------------- | :-------------------------------------------------- - * | #Months | Months of the year (abbreviated) - * | #TimeZones | Lookup table of Time Zones - * | #Weekdays | Day of the week (abbreviated) + * | Data | Description + * | :------------------------ | :-------------------------------------------------- + * | #Months | Months of the year (abbreviated) + * | #TimeZones | Lookup table of Time Zones + * | #Weekdays | Day of the week (abbreviated) * * | Function | Description * | :------------------------- | :-------------------------------------------------- diff --git a/mutt/file.c b/mutt/file.c index 6a1209fe7..1e0a2d1a1 100644 --- a/mutt/file.c +++ b/mutt/file.c @@ -971,7 +971,7 @@ void mutt_file_touch_atime(int f) } /** - * mutt_file_chmod - change permissions of a file + * mutt_file_chmod - Set permissions of a file * @param path Filename * @param mode the permissions to set * @retval int same as chmod(2) @@ -984,7 +984,7 @@ int mutt_file_chmod(const char *path, mode_t mode) } /** - * mutt_file_chmod_add - add permissions to a file + * mutt_file_chmod_add - Add permissions to a file * @param path Filename * @param mode the permissions to add * @retval int same as chmod(2) @@ -1005,7 +1005,7 @@ int mutt_file_chmod_add(const char *path, mode_t mode) } /** - * mutt_file_chmod_add_stat - add permissions to a file + * mutt_file_chmod_add_stat - Add permissions to a file * @param path Filename * @param mode the permissions to add * @param st struct stat for the file (optional) @@ -1036,7 +1036,7 @@ int mutt_file_chmod_add_stat(const char *path, mode_t mode, struct stat *st) } /** - * mutt_file_chmod_rm - remove permissions from a file + * mutt_file_chmod_rm - Remove permissions from a file * @param path Filename * @param mode the permissions to remove * @retval int same as chmod(2) @@ -1057,7 +1057,7 @@ int mutt_file_chmod_rm(const char *path, mode_t mode) } /** - * mutt_file_chmod_rm_stat - remove permissions from a file + * mutt_file_chmod_rm_stat - Remove permissions from a file * @param path Filename * @param mode the permissions to remove * @param st struct stat for the file (optional) diff --git a/mutt/list.c b/mutt/list.c index 010ac971e..b0a361b0b 100644 --- a/mutt/list.c +++ b/mutt/list.c @@ -39,6 +39,7 @@ */ #include "config.h" +#include #include "list.h" #include "memory.h" #include "string2.h" diff --git a/mutt/list.h b/mutt/list.h index 2f47116ff..714b0013c 100644 --- a/mutt/list.h +++ b/mutt/list.h @@ -24,7 +24,6 @@ #ifndef _MUTT_LIST_H #define _MUTT_LIST_H -#include #include #include "mutt/queue.h" diff --git a/mutt/mapping.c b/mutt/mapping.c index c76d22b28..98821df8a 100644 --- a/mutt/mapping.c +++ b/mutt/mapping.c @@ -33,6 +33,7 @@ */ #include "mapping.h" +#include #include "string2.h" /** diff --git a/mutt/mapping.h b/mutt/mapping.h index f636a0975..d8b3ccd01 100644 --- a/mutt/mapping.h +++ b/mutt/mapping.h @@ -23,8 +23,6 @@ #ifndef _MUTT_MAPPING_H #define _MUTT_MAPPING_H -#include - /** * struct Mapping - Mapping between user-readable string and a constant */ diff --git a/mutt/mbyte.c b/mutt/mbyte.c index e164517e6..daa4f74a3 100644 --- a/mutt/mbyte.c +++ b/mutt/mbyte.c @@ -25,9 +25,9 @@ * * Some commonly-used multi-byte string manipulation routines. * - * | Data | Description - * | :--------------- | :-------------------------------------------------- - * | #ReplacementChar | When a Unicode character can't be displayed, use this instead + * | Data | Description + * | :---------------------- | :-------------------------------------------------- + * | #ReplacementChar | When a Unicode character can't be displayed, use this instead * * | Function | Description * | :---------------------- | :--------------------------------------------------------- diff --git a/mutt/regex.c b/mutt/regex.c index 7c737b5cb..557244514 100644 --- a/mutt/regex.c +++ b/mutt/regex.c @@ -38,12 +38,15 @@ * | mutt_replacelist_add() | Add a pattern and a template to a list * | mutt_replacelist_apply() | Apply replacements to a buffer * | mutt_replacelist_free() | Free a ReplaceList object - * | mutt_replacelist_match() | Does a string match a spam pattern + * | mutt_replacelist_match() | Does a string match a pattern? * | mutt_replacelist_new() | Create a new ReplaceList * | mutt_replacelist_remove() | Remove a pattern from a list */ #include "config.h" +#include +#include +#include #include #include #include diff --git a/mutt/signal.c b/mutt/signal.c index 11317bce8..422c21933 100644 --- a/mutt/signal.c +++ b/mutt/signal.c @@ -27,11 +27,11 @@ * * | Function | Description * | :------------------------- | :--------------------------------------------------------- - * | mutt_sig_exit_handler() | Notify the user and shutdown gracefully - * | mutt_sig_empty_handler() | Dummy signal handler * | mutt_sig_allow_interrupt() | Allow/disallow Ctrl-C (SIGINT) * | mutt_sig_block() | Block signals during critical operations * | mutt_sig_block_system() | Block signals before calling exec() + * | mutt_sig_empty_handler() | Dummy signal handler + * | mutt_sig_exit_handler() | Notify the user and shutdown gracefully * | mutt_sig_init() | Initialise the signal handling * | mutt_sig_unblock() | Restore previously blocked signals * | mutt_sig_unblock_system() | Restore previously blocked signals @@ -44,7 +44,6 @@ #include #include #include -#include "debug.h" #include "message.h" #include "signal2.h" diff --git a/mutt_address.c b/mutt_address.c index e5f155d41..14e223721 100644 --- a/mutt_address.c +++ b/mutt_address.c @@ -23,7 +23,6 @@ #include "config.h" #include -#include #include "mutt/mutt.h" #include "address.h" diff --git a/protos.h b/protos.h index fa1c6c9a4..961a4b8ee 100644 --- a/protos.h +++ b/protos.h @@ -360,9 +360,7 @@ int wcscasecmp(const wchar_t *a, const wchar_t *b); bool message_is_tagged(struct Context *ctx, int index); bool message_is_visible(struct Context *ctx, int index); -int mutt_addrlist_to_local(struct Address *a); int mutt_addrlist_to_intl(struct Address *a, char **err); -int mutt_env_to_intl(struct Envelope *env, char **tag, char **err); -void mutt_env_to_local(struct Envelope *e); +int mutt_addrlist_to_local(struct Address *a); #endif /* _MUTT_PROTOS_H */ diff --git a/tags.c b/tags.c index 8a62e78e1..3549eec88 100644 --- a/tags.c +++ b/tags.c @@ -44,6 +44,7 @@ #include "config.h" #include +#include #include "mutt/hash.h" #include "mutt/queue.h" #include "mutt/string2.h" -- 2.40.0