Skip to content

Commit

Permalink
doxygen: add struct/enum/union templates
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Jul 17, 2017
1 parent 8696db0 commit 491f954
Show file tree
Hide file tree
Showing 101 changed files with 567 additions and 69 deletions.
7 changes: 6 additions & 1 deletion account.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

struct CissUrl;

/* account types */
/**
* enum AccountType - account types
*/
enum AccountType
{
MUTT_ACCT_TYPE_NONE = 0,
Expand All @@ -44,6 +46,9 @@ enum AccountType
#define MUTT_ACCT_PASS (1 << 3)
#define MUTT_ACCT_SSL (1 << 4)

/**
* struct Account - Login details for a remote server
*/
struct Account
{
char user[64];
Expand Down
3 changes: 3 additions & 0 deletions address.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

#include <stdbool.h>

/**
* struct Address - An email address
*/
struct Address
{
char *personal; /**< real name of address */
Expand Down
3 changes: 3 additions & 0 deletions alias.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
struct Envelope;
struct Address;

/**
* struct Alias - A shortcut for an email address
*/
struct Alias
{
struct Alias *self; /* XXX - ugly hack */
Expand Down
3 changes: 3 additions & 0 deletions attach.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ struct Menu;
struct Header;
struct Body;

/**
* struct AttachPtr - An email to which things will be attached
*/
struct AttachPtr
{
struct Body *content;
Expand Down
3 changes: 3 additions & 0 deletions bcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@

static int mutt_bcache_move(struct BodyCache *bcache, const char *id, const char *newid);

/**
* struct BodyCache - Local cache of email bodies
*/
struct BodyCache
{
char path[_POSIX_PATH_MAX];
Expand Down
2 changes: 1 addition & 1 deletion bcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ FILE *mutt_bcache_get(struct BodyCache *bcache, const char *id);
* mutt_bcache_put - Create a file in the Body Cache
* @param bcache Body Cache from mutt_bcache_open()
* @param id Per-mailbox unique identifier for the message
* @param tmp Returned FILE* is in a temporary location.
* @param tmp Returned FILE* is in a temporary location
* If set, use mutt_bcache_commit to put it into place
* @return FILE* on success, NULL on failure
*/
Expand Down
3 changes: 3 additions & 0 deletions body.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <time.h>
#include <sys/types.h>

/**
* struct Body - The body of an email
*/
struct Body
{
char *xtype; /**< content-type if x-unknown */
Expand Down
3 changes: 3 additions & 0 deletions browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ static struct Mapping FolderNewsHelp[] = {
};
#endif

/**
* struct Folder - A folder/dir in the browser
*/
struct Folder
{
struct FolderFile *ff;
Expand Down
6 changes: 6 additions & 0 deletions browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <sys/types.h>
#include <time.h>

/**
* struct FolderFile - Browser entry representing a folder/dir
*/
struct FolderFile
{
mode_t mode;
Expand Down Expand Up @@ -58,6 +61,9 @@ struct FolderFile
bool tagged : 1;
};

/**
* struct BrowserState - State of the file/mailbox browser
*/
struct BrowserState
{
struct FolderFile *entry;
Expand Down
3 changes: 3 additions & 0 deletions buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

#include <stddef.h>

/**
* struct Buffer - String manipulation buffer
*/
struct Buffer
{
char *data; /**< pointer to data */
Expand Down
3 changes: 3 additions & 0 deletions buffy.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ struct stat;
#define MUTT_NAMED 1
#define MUTT_VIRTUAL 2

/**
* struct Buffy - A mailbox
*/
struct Buffy
{
char path[_POSIX_PATH_MAX];
Expand Down
6 changes: 6 additions & 0 deletions charset.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ int mutt_convert_string(char **ps, const char *from, const char *to, int flags)
* Used in sendlib.c for converting from mutt's Charset
*/

/**
* struct FgetConv - Cursor for converting a file's encoding
*/
struct FgetConv
{
FILE *file;
Expand All @@ -491,6 +494,9 @@ struct FgetConv
ICONV_CONST char **inrepls;
};

/**
* struct FgetConvNot - A dummy converter
*/
struct FgetConvNot
{
FILE *file;
Expand Down
3 changes: 3 additions & 0 deletions color.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ static int ColorQuoteSize;

#define COLOR_DEFAULT (-2)

/**
* struct ColorList - A set of colors
*/
struct ColorList
{
short fg;
Expand Down
7 changes: 6 additions & 1 deletion compose.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ static const char *There_are_no_attachments = N_("There are no attachments.");
break; \
}


/**
* enum HeaderField - Ordered list of headers for the compose screen
*/
enum HeaderField
{
HDR_FROM = 0,
Expand Down Expand Up @@ -526,6 +528,9 @@ static void update_idx(struct Menu *menu, struct AttachPtr **idx, short idxlen)
return;
}

/**
* struct ComposeRedrawData - Keep track when the compose screen needs redrawing
*/
struct ComposeRedrawData
{
struct Header *msg;
Expand Down
6 changes: 5 additions & 1 deletion content.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@

#include <stdbool.h>

/* Information that helps in determining the Content-* of an attachment */
/**
* struct Content - Info about an attachment
*
* Information that helps in determining the Content-* of an attachment
*/
struct Content
{
long hibin; /**< 8-bit characters */
Expand Down
7 changes: 6 additions & 1 deletion context.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
#include <sys/types.h>
#include <time.h>

/* ACL Rights */
/**
* enum AclRights - ACL Rights
*/
enum AclRights
{
MUTT_ACL_LOOKUP = 0,
Expand All @@ -46,6 +48,9 @@ enum AclRights
RIGHTSMAX
};

/**
* struct Context - The "current" mailbox
*/
struct Context
{
char *path;
Expand Down
11 changes: 10 additions & 1 deletion doc/makedoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ extern int optind;

#define BUFFSIZE 2048

/**
* enum OutputFormats - Documentation output formats
*/
enum OutputFormats
{
F_CONF,
Expand All @@ -66,6 +69,9 @@ enum OutputFormats
#define D_IL (1 << 10)
#define D_TT (1 << 11)

/**
* enum SpecialChars - All specially-treated characters
*/
enum SpecialChars
{
SP_START_EM,
Expand Down Expand Up @@ -935,6 +941,9 @@ static int handle_docline(char *l, FILE *out, int docstat)
* following string definitions!
*/

/**
* enum DataType - User-variable types
*/
enum DataType
{
DT_NONE = 0,
Expand All @@ -951,7 +960,7 @@ enum DataType
DT_MBCHARTBL
};

struct
struct VariableTypes
{
char *machine;
char *human;
Expand Down
4 changes: 3 additions & 1 deletion enter.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
#include "options.h"
#include "protos.h"

/* redraw flags for mutt_enter_string() */
/**
* enum RedrawFlags - redraw flags for mutt_enter_string()
*/
enum RedrawFlags
{
MUTT_REDRAW_INIT = 1, /**< go to end of line and redraw */
Expand Down
3 changes: 3 additions & 0 deletions enter_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
#include <stddef.h>
#include "lib.h"

/**
* struct EnterState - Keep our place when entering a string
*/
struct EnterState
{
wchar_t *wbuf;
Expand Down
3 changes: 3 additions & 0 deletions envelope.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
#include <stdbool.h>
#include "lib.h"

/**
* struct Envelope - The header of an email
*/
struct Envelope
{
struct Address *return_path;
Expand Down
4 changes: 3 additions & 1 deletion format_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

#include <stddef.h>

/* flags for mutt_FormatString() */
/**
* enum FormatFlag - Control the behaviour of mutt_FormatString()
*/
enum FormatFlag
{
MUTT_FORMAT_FORCESUBJ = (1 << 0), /**< print the subject even if unchanged */
Expand Down
6 changes: 6 additions & 0 deletions group.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@ struct Buffer;
#define MUTT_GROUP 0
#define MUTT_UNGROUP 1

/**
* struct Group - A set of email addresses
*/
struct Group
{
struct Address *as;
struct RxList *rs;
char *name;
};

/**
* struct GroupContext - A set of Groups
*/
struct GroupContext
{
struct Group *g;
Expand Down
6 changes: 6 additions & 0 deletions handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@ static void decode_uuencoded(struct State *s, long len, int istext, iconv_t cd)

#define IndentSize (4)

/**
* enum RichAttribs - Rich text attributes
*/
enum RichAttribs
{
RICH_PARAM = 0,
Expand Down Expand Up @@ -513,6 +516,9 @@ static const struct
{ NULL, -1 },
};

/**
* struct EnrichedState - State of enriched-text parser
*/
struct EnrichedState
{
wchar_t *buffer;
Expand Down
12 changes: 12 additions & 0 deletions hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,27 @@

#include <stdbool.h>

/**
* union HashKey - The data item stored in a HashElem
*/
union HashKey {
const char *strkey;
unsigned int intkey;
};

/**
* struct HashElem - The item stored in a Hash Table
*/
struct HashElem
{
union HashKey key;
void *data;
struct HashElem *next;
};

/**
* struct Hash - A Hash Table
*/
struct Hash
{
int nelem;
Expand Down Expand Up @@ -71,6 +80,9 @@ void int_hash_delete(struct Hash *table, unsigned int intkey, const void *data,

void hash_destroy(struct Hash **ptr, void (*destroy)(void *));

/**
* struct HashWalkState - Cursor to iterate through a Hash Table
*/
struct HashWalkState
{
int index;
Expand Down
3 changes: 3 additions & 0 deletions hcache/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ typedef void (*hcache_close_t)(void **ctx);
*/
typedef const char *(*hcache_backend_t)(void);

/**
* struct HcacheOps - Header Cache API
*/
struct HcacheOps
{
const char *name;
Expand Down
3 changes: 3 additions & 0 deletions hcache/bdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include "lib.h"
#include "mx.h"

/**
* struct HcacheDbCtx - Berkeley DB context
*/
struct HcacheDbCtx
{
DB_ENV *env;
Expand Down
Loading

0 comments on commit 491f954

Please sign in to comment.