Fix madmutt for stupid terms with only 64 colors.
[apps/madmutt.git] / thread.c
index f66afba..c5cc040 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -195,10 +195,6 @@ static void calculate_visibility (CONTEXT * ctx, int *max_depth)
 /* Since the graphics characters have a value >255, I have to resort to
  * using escape sequences to pass the information to print_enriched_string().
  * These are the macros M_TREE_* defined in mutt.h.
- *
- * ncurses should automatically use the default ASCII characters instead of
- * graphics chars on terminals which don't support them (see the man page
- * for curs_addch).
  */
 void mutt_draw_tree (CONTEXT * ctx)
 {
@@ -502,7 +498,7 @@ void mutt_clear_threads (CONTEXT * ctx)
   ctx->tree = NULL;
 
   if (ctx->thread_hash)
-    hash_destroy (&ctx->thread_hash, free);
+    hash_delete (&ctx->thread_hash, free);
 }
 
 static int compare_threads (const void *a, const void *b)
@@ -689,7 +685,7 @@ void mutt_sort_threads (CONTEXT * ctx, int init)
     init = 1;
 
   if (init)
-    ctx->thread_hash = hash_create (ctx->msgcount * 2, 1);
+    ctx->thread_hash = hash_new (ctx->msgcount * 2, 1);
 
   /* we want a quick way to see if things are actually attached to the top of the
    * thread tree or if they're just dangling, so we attach everything to a top
@@ -1190,13 +1186,13 @@ int mutt_messages_in_thread (CONTEXT * ctx, HEADER * hdr, int flag)
 }
 
 
-HASH *mutt_make_id_hash (CONTEXT * ctx)
+hash_t *mutt_make_id_hash (CONTEXT * ctx)
 {
   int i;
   HEADER *hdr;
-  HASH *hash;
+  hash_t *hash;
 
-  hash = hash_create (ctx->msgcount * 2, 0);
+  hash = hash_new (ctx->msgcount * 2, 0);
 
   for (i = 0; i < ctx->msgcount; i++) {
     hdr = ctx->hdrs[i];
@@ -1207,13 +1203,13 @@ HASH *mutt_make_id_hash (CONTEXT * ctx)
   return hash;
 }
 
-HASH *mutt_make_subj_hash (CONTEXT * ctx)
+hash_t *mutt_make_subj_hash (CONTEXT * ctx)
 {
   int i;
   HEADER *hdr;
-  HASH *hash;
+  hash_t *hash;
 
-  hash = hash_create (ctx->msgcount * 2, 1);
+  hash = hash_new (ctx->msgcount * 2, 1);
 
   for (i = 0; i < ctx->msgcount; i++) {
     hdr = ctx->hdrs[i];