#define BAD -1
+/**
+ * B64Chars - Characters of the Base64 encoding
+ */
static const char B64Chars[64] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
#define MoreArgs(p) (*p->dptr && (*p->dptr != ';') && (*p->dptr != '#'))
-struct Buffer *mutt_buffer_new(void);
-struct Buffer *mutt_buffer_init(struct Buffer *b);
-void mutt_buffer_reset(struct Buffer *b);
+void mutt_buffer_addch(struct Buffer *buf, char c);
+void mutt_buffer_addstr(struct Buffer *buf, const char *s);
+void mutt_buffer_free(struct Buffer **p);
struct Buffer *mutt_buffer_from(char *seed);
-void mutt_buffer_free(struct Buffer **p);
-int mutt_buffer_printf(struct Buffer *buf, const char *fmt, ...);
-void mutt_buffer_addstr(struct Buffer *buf, const char *s);
-void mutt_buffer_addch(struct Buffer *buf, char c);
+struct Buffer *mutt_buffer_init(struct Buffer *b);
+struct Buffer *mutt_buffer_new(void);
+int mutt_buffer_printf(struct Buffer *buf, const char *fmt, ...);
+void mutt_buffer_reset(struct Buffer *b);
#endif /* _LIB_BUFFER_H */
/**
* mutt_check_month - Is the string a valid month name
- * @param s - String to check
+ * @param s String to check
* @retval num Index into Months array (0-based)
* @retval -1 Error
*
/**
* is_day_name - Is the string a valid day name
- * @param s - String to check
+ * @param s String to check
* @retval boolean
*
* @note Only the first three characters are checked
#define MUTT_HASH_STRDUP_KEYS (1 << 1) /**< make a copy of the keys */
#define MUTT_HASH_ALLOW_DUPS (1 << 2) /**< allow duplicate keys to be inserted */
-struct Hash *hash_create(int nelem, int flags);
-struct Hash *int_hash_create(int nelem, int flags);
-
-int hash_insert(struct Hash *table, const char *strkey, void *data);
-int int_hash_insert(struct Hash *table, unsigned int intkey, void *data);
-
-void *hash_find(const struct Hash *table, const char *strkey);
-struct HashElem *hash_find_elem(const struct Hash *table, const char *strkey);
-void *int_hash_find(const struct Hash *table, unsigned int intkey);
-
+struct Hash * hash_create(int nelem, int flags);
+void hash_delete(struct Hash *table, const char *strkey, const void *data, void (*destroy)(void *));
+void hash_destroy(struct Hash **ptr, void (*destroy)(void *));
struct HashElem *hash_find_bucket(const struct Hash *table, const char *strkey);
-
-void hash_delete(struct Hash *table, const char *strkey, const void *data,
- void (*destroy)(void *));
-void int_hash_delete(struct Hash *table, unsigned int intkey, const void *data,
- void (*destroy)(void *));
-
-void hash_destroy(struct Hash **ptr, void (*destroy)(void *));
+void * hash_find(const struct Hash *table, const char *strkey);
+struct HashElem *hash_find_elem(const struct Hash *table, const char *strkey);
+int hash_insert(struct Hash *table, const char *strkey, void *data);
+struct Hash * int_hash_create(int nelem, int flags);
+void int_hash_delete(struct Hash *table, unsigned int intkey, const void *data, void (*destroy)(void *));
+void * int_hash_find(const struct Hash *table, unsigned int intkey);
+int int_hash_insert(struct Hash *table, unsigned int intkey, void *data);
/**
* struct HashWalkState - Cursor to iterate through a Hash Table
};
const char *mutt_getnamebyvalue(int val, const struct Mapping *map);
-int mutt_getvaluebyname(const char *name, const struct Mapping *map);
+int mutt_getvaluebyname(const char *name, const struct Mapping *map);
#endif /* _MUTT_MAPPING_H */
md5_uint32 buffer[32];
};
+void *md5_buffer(const char *buffer, size_t len, void *resblock);
+void *md5_finish_ctx(struct Md5Ctx *ctx, void *resbuf);
void md5_init_ctx(struct Md5Ctx *ctx);
void md5_process_block(const void *buffer, size_t len, struct Md5Ctx *ctx);
void md5_process_bytes(const void *buffer, size_t len, struct Md5Ctx *ctx);
-void *md5_finish_ctx(struct Md5Ctx *ctx, void *resbuf);
void *md5_read_ctx(const struct Md5Ctx *ctx, void *resbuf);
int md5_stream(FILE *stream, void *resblock);
-void *md5_buffer(const char *buffer, size_t len, void *resblock);
#endif /* _LIB_MD5_H */