]> granicus.if.org Git - neomutt/commitdiff
lib: tidy headers
authorRichard Russon <rich@flatcap.org>
Thu, 2 Nov 2017 17:59:17 +0000 (17:59 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 2 Nov 2017 17:59:17 +0000 (17:59 +0000)
lib/base64.c
lib/buffer.h
lib/date.c
lib/hash.h
lib/mapping.h
lib/md5.h

index 462fe0d3bb3f874abd7cf3ec2e7d0e8ea5a00cf6..ab01d5c122e466184d235425ecfe6263432e60f9 100644 (file)
@@ -45,6 +45,9 @@
 
 #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',
index 0330bd099801ac6beb37fd395fbc685df4933a63..efb78e0872865ef91f09860a8abf582ba7e22b44 100644 (file)
@@ -39,13 +39,13 @@ struct Buffer
 
 #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 */
index 1ae309a921539b3a58113ee96935a2dc7e0d1ccd..ab534bae8f7ba1530d6667e9cd7924e1d408782a 100644 (file)
@@ -403,7 +403,7 @@ char *mutt_make_date(char *buf, size_t buflen)
 
 /**
  * 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
  *
@@ -421,7 +421,7 @@ int mutt_check_month(const char *s)
 
 /**
  * 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
index c87997007a34efda6518a49cca89f18015e1c4a1..8f1d7a17a8b946927aa5b248f7af02acff4c42e4 100644 (file)
@@ -61,24 +61,17 @@ struct Hash
 #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
index 7244787d0713e44dc5c59e572cf475fb42f00045..b5af668c5d1b9633e8fa9c5de68af40e59877d4f 100644 (file)
@@ -35,6 +35,6 @@ struct Mapping
 };
 
 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 */
index 66ec14dd3cb3b9d508cdf50938dda3f79aa61568..7227c0f6ecfb299d4c20359b725c5ad06916b585 100644 (file)
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -45,12 +45,12 @@ struct Md5Ctx
   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 */