X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/22de44b40389f3c6ec7f5d811eb8349cc9d499bf..9cc2510:/uip/mhn.c?ds=sidebyside diff --git a/uip/mhn.c b/uip/mhn.c index 8a4ab318..39d86933 100644 --- a/uip/mhn.c +++ b/uip/mhn.c @@ -119,12 +119,6 @@ int part_ok (CT, int); int type_ok (CT, int); void flush_errors (void); -/* mhstoresbr.c */ -typedef struct mhstoreinfo *mhstoreinfo_t; -mhstoreinfo_t mhstoreinfo_create(CT *, char *, const char *, int, int); -void mhstoreinfo_free(mhstoreinfo_t); -void store_all_messages (mhstoreinfo_t); - /* mhcachesbr.c */ void cache_all_messages (CT *); @@ -446,7 +440,7 @@ do_cache: * check if message is coming from file */ if (file) { - if (!(cts = (CT *) calloc ((size_t) 2, sizeof(*cts)))) + if (!(cts = (CT *) mh_xcalloc ((size_t) 2, sizeof(*cts)))) adios (NULL, "out of memory"); ctp = cts; @@ -479,7 +473,7 @@ do_cache: done (1); seq_setprev (mp); /* set the previous-sequence */ - if (!(cts = (CT *) calloc ((size_t) (mp->numsel + 1), sizeof(*cts)))) + if (!(cts = (CT *) mh_xcalloc ((size_t) (mp->numsel + 1), sizeof(*cts)))) adios (NULL, "out of memory"); ctp = cts; @@ -542,6 +536,14 @@ do_cache: mhstoreinfo_free (info); } + /* If reading from a folder, do some updating */ + if (mp) { + context_replace (pfolder, folder);/* update current folder */ + seq_setcur (mp, mp->hghsel); /* update current message */ + seq_save (mp); /* synchronize sequences */ + context_save (); /* save the context file */ + } + /* * Cache the message content */ @@ -552,7 +554,7 @@ do_cache: * Show the message content */ if (showsw) - show_all_messages (cts, 0, 0, 0); + show_all_messages (cts, 0, 0, 0, NULL); /* Now free all the structures for the content */ for (ctp = cts; *ctp; ctp++) @@ -561,14 +563,6 @@ do_cache: free (cts); cts = NULL; - /* If reading from a folder, do some updating */ - if (mp) { - context_replace (pfolder, folder);/* update current folder */ - seq_setcur (mp, mp->hghsel); /* update current message */ - seq_save (mp); /* synchronize sequences */ - context_save (); /* save the context file */ - } - done (0); return 1; }