]> granicus.if.org Git - neomutt/commitdiff
rename public functions with a leading underscore
authorRichard Russon <rich@flatcap.org>
Tue, 7 Nov 2017 15:11:18 +0000 (15:11 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 9 Nov 2017 23:19:00 +0000 (23:19 +0000)
34 files changed:
attach.c
browser.c
commands.c
compose.c
copy.c
copy.h
curs_lib.c
curs_main.c
enter.c
flags.c
hdrline.c
hook.c
imap/imap.c
main.c
mbox.c
mh.c
mutt.h
muttlib.c
ncrypt/crypt.c
ncrypt/pgp.c
ncrypt/pgp.h
ncrypt/pgpkey.c
ncrypt/smime.c
postpone.c
protos.h
recvattach.c
recvcmd.c
rfc2047.c
rfc2047.h
score.c
send.c
sendlib.c
thread.c
thread.h

index 68cb7c61ff5681cc16a405412f17aaa70ebba35f..c4736a0833000a410e65f6527360fc08994ef941 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -795,7 +795,7 @@ int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, struct
       if (ctx.magic == MUTT_MBOX || ctx.magic == MUTT_MMDF)
         chflags = CH_FROM | CH_UPDATE_LEN;
       chflags |= (ctx.magic == MUTT_MAILDIR ? CH_NOSTATUS : CH_UPDATE);
-      if (_mutt_copy_message(msg->fp, fp, hn, hn->content, 0, chflags) == 0 &&
+      if (mutt_copy_message(msg->fp, fp, hn, hn->content, 0, chflags) == 0 &&
           mx_commit_message(msg, &ctx) == 0)
         r = 0;
       else
index 9d9a0d9e296a4891b4658338574e353f6d2196b2..c11d9c0b8fdbf9a01058dfe80e9d4f6c2c86b18b 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1066,7 +1066,7 @@ void mutt_browser_select_dir(char *f)
   mutt_get_parent_path(LastDir, OldLastDir, sizeof(LastDir));
 }
 
-void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfiles)
+void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfiles)
 {
   char buf[_POSIX_PATH_MAX];
   char prefix[_POSIX_PATH_MAX] = "";
index 3484f20e7fa4bc45346dfeea2da2df079bad04a8..652912ca667cec4c13fc83b2092938707d5797ea 100644 (file)
@@ -167,7 +167,7 @@ int mutt_display_message(struct Header *cur)
   if (Context->magic == MUTT_NOTMUCH)
     chflags |= CH_VIRTUAL;
 #endif
-  res = mutt_copy_message(fpout, Context, cur, cmflags, chflags);
+  res = mutt_open_copy_message(fpout, Context, cur, cmflags, chflags);
 
   if ((safe_fclose(&fpout) != 0 && errno != EPIPE) || res < 0)
   {
@@ -384,7 +384,7 @@ static void pipe_msg(struct Header *h, FILE *fp, int decode, int print)
   if (decode)
     mutt_parse_mime_message(Context, h);
 
-  mutt_copy_message(fp, Context, h, cmflags, chflags);
+  mutt_open_copy_message(fp, Context, h, cmflags, chflags);
 }
 
 /**
@@ -725,7 +725,8 @@ static void set_copy_flags(struct Header *hdr, int decode, int decrypt,
   }
 }
 
-int _mutt_save_message(struct Header *h, struct Context *ctx, int delete, int decode, int decrypt)
+int mutt_save_message_ctx(struct Header *h, int delete, int decode, int decrypt,
+                          struct Context *ctx)
 {
   int cmflags, chflags;
   int rc;
@@ -871,7 +872,7 @@ int mutt_save_message(struct Header *h, int delete, int decode, int decrypt)
 #endif
     if (h)
     {
-      if (_mutt_save_message(h, &ctx, delete, decode, decrypt) != 0)
+      if (mutt_save_message_ctx(h, delete, decode, decrypt, &ctx) != 0)
       {
         mx_close_mailbox(&ctx, NULL);
         return -1;
@@ -901,7 +902,7 @@ int mutt_save_message(struct Header *h, int delete, int decode, int decrypt)
           continue;
 
         mutt_message_hook(Context, Context->hdrs[i], MUTT_MESSAGEHOOK);
-        if ((rc = _mutt_save_message(Context->hdrs[i], &ctx, delete, decode, decrypt) != 0))
+        if ((rc = mutt_save_message_ctx(Context->hdrs[i], delete, decode, decrypt, &ctx) != 0))
           break;
 #ifdef USE_COMPRESSED
         if (cm)
index 08f13dbeadf21a7a71c310eb2fbf74f23d0b1fde..c5fbb1a86572cf11259cb26a619248362adf7d15 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -1017,8 +1017,8 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
         numfiles = 0;
         files = NULL;
 
-        if (_mutt_enter_fname(prompt, fname, sizeof(fname), 0, 1, &files,
-                              &numfiles, MUTT_SEL_MULTI) == -1 ||
+        if (mutt_enter_fname_full(prompt, fname, sizeof(fname), 0, 1, &files,
+                                  &numfiles, MUTT_SEL_MULTI) == -1 ||
             *fname == '\0')
           break;
 
diff --git a/copy.c b/copy.c
index c2bcdbb9920eccb619f0fe337284eadb61f971ef..ee73f2151939e08a073692d94928adbdb0f00a0b 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -523,7 +523,7 @@ static int count_delete_lines(FILE *fp, struct Body *b, LOFF_T *length, size_t d
 }
 
 /**
- * _mutt_copy_message - make a copy of a message
+ * mutt_copy_message - make a copy of a message
  * @param fpout   Where to write output
  * @param fpin    Where to get input
  * @param hdr     Header of message being copied
@@ -540,8 +540,8 @@ static int count_delete_lines(FILE *fp, struct Body *b, LOFF_T *length, size_t d
  * * #MUTT_CM_DECODE_PGP used for decoding PGP messages
  * * #MUTT_CM_CHARCONV   perform character set conversion
  */
-int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr,
-                       struct Body *body, int flags, int chflags)
+int mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr,
+                      struct Body *body, int flags, int chflags)
 {
   char prefix[SHORT_STRING];
   struct State s;
@@ -553,7 +553,7 @@ int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr,
     if (option(OPT_TEXT_FLOWED))
       strfcpy(prefix, ">", sizeof(prefix));
     else
-      _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context, hdr, 0);
+      mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString), Context, hdr, 0);
   }
 
   if (hdr->xlabel_changed)
@@ -743,13 +743,13 @@ int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr,
 }
 
 /**
- * mutt_copy_message - Copy a message
+ * mutt_open_copy_message - Copy a message
  *
  * should be made to return -1 on fatal errors, and 1 on non-fatal errors
  * like partial decode, where it is worth displaying as much as possible
  */
-int mutt_copy_message(FILE *fpout, struct Context *src, struct Header *hdr,
-                      int flags, int chflags)
+int mutt_open_copy_message(FILE *fpout, struct Context *src, struct Header *hdr,
+                           int flags, int chflags)
 {
   struct Message *msg = NULL;
   int r;
@@ -757,10 +757,10 @@ int mutt_copy_message(FILE *fpout, struct Context *src, struct Header *hdr,
   msg = mx_open_message(src, hdr->msgno);
   if (!msg)
     return -1;
-  if ((r = _mutt_copy_message(fpout, msg->fp, hdr, hdr->content, flags, chflags)) == 0 &&
+  if ((r = mutt_copy_message(fpout, msg->fp, hdr, hdr->content, flags, chflags)) == 0 &&
       (ferror(fpout) || feof(fpout)))
   {
-    mutt_debug(1, "_mutt_copy_message failed to detect EOF!\n");
+    mutt_debug(1, "mutt_copy_message failed to detect EOF!\n");
     r = -1;
   }
   mx_close_message(src, &msg);
@@ -774,7 +774,7 @@ int mutt_copy_message(FILE *fpout, struct Context *src, struct Header *hdr,
  * @param src     source mailbox
  * @param hdr     message being copied
  * @param body    structure of message being copied
- * @param flags   mutt_copy_message() flags
+ * @param flags   mutt_open_copy_message() flags
  * @param chflags mutt_copy_header() flags
  * @retval 0 on success
  * @retval -1 on error
@@ -797,7 +797,7 @@ static int append_message(struct Context *dest, FILE *fpin, struct Context *src,
   if (dest->magic == MUTT_MBOX || dest->magic == MUTT_MMDF)
     chflags |= CH_FROM | CH_FORCE_FROM;
   chflags |= (dest->magic == MUTT_MAILDIR ? CH_NOSTATUS : CH_UPDATE);
-  r = _mutt_copy_message(msg->fp, fpin, hdr, body, flags, chflags);
+  r = mutt_copy_message(msg->fp, fpin, hdr, body, flags, chflags);
   if (mx_commit_message(msg, dest) != 0)
     r = -1;
 
diff --git a/copy.h b/copy.h
index a421d4d68dce3e8f7ffca85a257171d0eea5e66e..0eecc34d993c9b5fd1cce6904e5ef798b2dd4ddc 100644 (file)
--- a/copy.h
+++ b/copy.h
@@ -29,7 +29,7 @@ struct Body;
 struct Header;
 struct Context;
 
-/**< flags to _mutt_copy_message */
+/**< flags to mutt_copy_message */
 #define MUTT_CM_NOHEADER     (1 << 0) /**< don't copy the message header */
 #define MUTT_CM_PREFIX       (1 << 1) /**< quote the message */
 #define MUTT_CM_DECODE       (1 << 2) /**< decode the message body into text/plain */
@@ -72,10 +72,10 @@ int mutt_copy_hdr(FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end,
 
 int mutt_copy_header(FILE *in, struct Header *h, FILE *out, int flags, const char *prefix);
 
-int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr, struct Body *body,
+int mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr, struct Body *body,
                        int flags, int chflags);
 
-int mutt_copy_message(FILE *fpout, struct Context *src, struct Header *hdr, int flags, int chflags);
+int mutt_open_copy_message(FILE *fpout, struct Context *src, struct Header *hdr, int flags, int chflags);
 
 int mutt_append_message(struct Context *dest, struct Context *src, struct Header *hdr, int cmflags, int chflags);
 
index 08fbdecd8703a3e2b59437a46e40b9ccda40817f..1483e766cf66d06da983df3968be7c57eda48d98 100644 (file)
@@ -176,8 +176,8 @@ struct Event mutt_getch(void)
   return (ch == ctrl('G') ? err : ret);
 }
 
-int _mutt_get_field(const char *field, char *buf, size_t buflen, int complete,
-                    int multiple, char ***files, int *numfiles)
+int mutt_get_field_full(const char *field, char *buf, size_t buflen,
+                        int complete, int multiple, char ***files, int *numfiles)
 {
   int ret;
   int x;
@@ -201,7 +201,7 @@ int _mutt_get_field(const char *field, char *buf, size_t buflen, int complete,
     NORMAL_COLOR;
     mutt_refresh();
     mutt_window_getyx(MuttMessageWindow, NULL, &x);
-    ret = _mutt_enter_string(buf, buflen, x, complete, multiple, files, numfiles, es);
+    ret = mutt_enter_string_full(buf, buflen, x, complete, multiple, files, numfiles, es);
   } while (ret == 1);
   mutt_window_clearline(MuttMessageWindow, 0);
   mutt_free_enter_state(&es);
@@ -896,8 +896,8 @@ int mutt_do_pager(const char *banner, const char *tempfile, int do_color, struct
   return rc;
 }
 
-int _mutt_enter_fname(const char *prompt, char *buf, size_t blen, int buffy,
-                      int multiple, char ***files, int *numfiles, int flags)
+int mutt_enter_fname_full(const char *prompt, char *buf, size_t blen, int buffy,
+                          int multiple, char ***files, int *numfiles, int flags)
 {
   struct Event ch;
 
@@ -927,7 +927,7 @@ int _mutt_enter_fname(const char *prompt, char *buf, size_t blen, int buffy,
       flags |= MUTT_SEL_MULTI;
     if (buffy)
       flags |= MUTT_SEL_BUFFY;
-    _mutt_select_file(buf, blen, flags, files, numfiles);
+    mutt_select_file(buf, blen, flags, files, numfiles);
   }
   else
   {
@@ -935,8 +935,8 @@ int _mutt_enter_fname(const char *prompt, char *buf, size_t blen, int buffy,
 
     sprintf(pc, "%s: ", prompt);
     mutt_unget_event(ch.op ? 0 : ch.ch, ch.op ? ch.op : 0);
-    if (_mutt_get_field(pc, buf, blen, (buffy ? MUTT_EFILE : MUTT_FILE) | MUTT_CLEAR,
-                        multiple, files, numfiles) != 0)
+    if (mutt_get_field_full(pc, buf, blen, (buffy ? MUTT_EFILE : MUTT_FILE) | MUTT_CLEAR,
+                            multiple, files, numfiles) != 0)
       buf[0] = '\0';
     FREE(&pc);
 #ifdef USE_NOTMUCH
index 970a308911dfcb4edf5ac62c6966bbd2d0e08680..03446a2be21851cc2500bea18d81854190fb0407 100644 (file)
@@ -655,7 +655,7 @@ void index_make_entry(char *s, size_t l, struct Menu *menu, int num)
     }
   }
 
-  _mutt_make_string(s, l, NONULL(IndexFormat), Context, h, flag);
+  mutt_make_string_flags(s, l, NONULL(IndexFormat), Context, h, flag);
 }
 
 int index_color(int index_no)
diff --git a/enter.c b/enter.c
index c23b2a5d66c50c1dde67e4b0ce70c405a5818d4d..1a5afd8aa4a20308cd55852170f537aada96a550 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -40,7 +40,7 @@
 #include "protos.h"
 
 /**
- * enum RedrawFlags - redraw flags for mutt_enter_string()
+ * enum RedrawFlags - redraw flags for mutt_enter_string_full()
  */
 enum RedrawFlags
 {
@@ -251,14 +251,14 @@ int mutt_enter_string(char *buf, size_t buflen, int col, int flags)
       clearok(stdscr, TRUE);
     }
 #endif
-    rv = _mutt_enter_string(buf, buflen, col, flags, 0, NULL, NULL, es);
+    rv = mutt_enter_string_full(buf, buflen, col, flags, 0, NULL, NULL, es);
   } while (rv == 1);
   mutt_free_enter_state(&es);
   return rv;
 }
 
 /**
- * _mutt_enter_string - Ask the user for a string
+ * mutt_enter_string_full - Ask the user for a string
  * @param[in]  buf      Buffer to store the string
  * @param[in]  buflen   Buffer length
  * @param[in]  col      Initial cursor position
@@ -271,8 +271,8 @@ int mutt_enter_string(char *buf, size_t buflen, int col, int flags)
  * @retval 0  if input was given
  * @retval -1 if abort
  */
-int _mutt_enter_string(char *buf, size_t buflen, int col, int flags, int multiple,
-                       char ***files, int *numfiles, struct EnterState *state)
+int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int multiple,
+                      char ***files, int *numfiles, struct EnterState *state)
 {
   int width = MuttMessageWindow->cols - col - 1;
   int redraw;
@@ -591,7 +591,8 @@ int _mutt_enter_string(char *buf, size_t buflen, int col, int flags, int multipl
             if (tempbuf && templen == state->lastchar - i &&
                 !memcmp(tempbuf, state->wbuf + i, (state->lastchar - i) * sizeof(wchar_t)))
             {
-              mutt_select_file(buf, buflen, (flags & MUTT_EFILE) ? MUTT_SEL_FOLDER : 0);
+              mutt_select_file(buf, buflen,
+                               (flags & MUTT_EFILE) ? MUTT_SEL_FOLDER : 0, NULL, NULL);
               if (*buf)
                 replace_part(state, i, buf);
               rv = 1;
@@ -698,10 +699,10 @@ int _mutt_enter_string(char *buf, size_t buflen, int col, int flags, int multipl
                 (tempbuf && templen == state->lastchar &&
                  !memcmp(tempbuf, state->wbuf, state->lastchar * sizeof(wchar_t))))
             {
-              _mutt_select_file(buf, buflen,
-                                ((flags & MUTT_EFILE) ? MUTT_SEL_FOLDER : 0) |
-                                    (multiple ? MUTT_SEL_MULTI : 0),
-                                files, numfiles);
+              mutt_select_file(buf, buflen,
+                               ((flags & MUTT_EFILE) ? MUTT_SEL_FOLDER : 0) |
+                                   (multiple ? MUTT_SEL_MULTI : 0),
+                               files, numfiles);
               if (*buf)
               {
                 mutt_pretty_mailbox(buf, buflen);
diff --git a/flags.c b/flags.c
index 1419b3553089589022b910ba18dca051681d0a3a..3b3c198a4f08011bc39149dd5ba97ee5132d2df0 100644 (file)
--- a/flags.c
+++ b/flags.c
@@ -36,7 +36,7 @@
 #include "sort.h"
 #include "thread.h"
 
-void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int upd_ctx)
+void mutt_set_flag_update(struct Context *ctx, struct Header *h, int flag, int bf, int upd_ctx)
 {
   if (!ctx || !h)
     return;
index 2443f82310633acb7bdf6ec709f97a36a27272ac..af87f038c52d628cf6542581f1d229d2056e5345 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -1385,8 +1385,8 @@ static const char *hdr_format_str(char *dest, size_t destlen, size_t col, int co
   return src;
 }
 
-void _mutt_make_string(char *dest, size_t destlen, const char *s,
-                       struct Context *ctx, struct Header *hdr, enum FormatFlag flags)
+void mutt_make_string_flags(char *dest, size_t destlen, const char *s,
+                            struct Context *ctx, struct Header *hdr, enum FormatFlag flags)
 {
   struct HdrFormatInfo hfi;
 
diff --git a/hook.c b/hook.c
index be058fec54f451c746d6b7799c7f513defd48b85..034bd583181251710ea5737b8ea004f30ccc8a48 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -121,7 +121,7 @@ int mutt_parse_hook(struct Buffer *buf, struct Buffer *s, unsigned long data,
     }
 
     strfcpy(path, pattern.data, sizeof(path));
-    _mutt_expand_path(path, sizeof(path), 1);
+    mutt_expand_path_regex(path, sizeof(path), 1);
 
     /* Check for other mailbox shortcuts that expand to the empty string.
      * This is likely a mistake too */
index 9721772fbceadbc663ddd7a3689a3c7cbe074a25..3aadb33d2e90504cbdd8b095cf589d73ebbb435e 100644 (file)
@@ -2485,7 +2485,7 @@ int imap_sync_mailbox(struct Context *ctx, int expunge)
           mutt_debug(
               1, "imap_sync_mailbox: Error opening mailbox in append mode\n");
         else
-          _mutt_save_message(h, appendctx, 1, 0, 0);
+          mutt_save_message_ctx(h, 1, 0, 0, appendctx);
         h->xlabel_changed = false;
       }
     }
diff --git a/main.c b/main.c
index ebfe63b9c81c1dd04cc3f7977584b611c78468c6..7e8f3d531713d41bfb246eb162b79aa0da9ef65a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -882,7 +882,7 @@ int main(int argc, char **argv, char **env)
         exit(1);
       }
       folder[0] = 0;
-      mutt_select_file(folder, sizeof(folder), MUTT_SEL_FOLDER | MUTT_SEL_BUFFY);
+      mutt_select_file(folder, sizeof(folder), MUTT_SEL_FOLDER | MUTT_SEL_BUFFY, NULL, NULL);
       if (!folder[0])
       {
         mutt_endwin(NULL);
diff --git a/mbox.c b/mbox.c
index 40245b7fcdd5661b89fdebfb30a72ab588b8da9b..8093c51851e7ddcfe6dca327b85697ba6e8fcb92 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -1167,8 +1167,8 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint)
        */
       newOffset[i - first].hdr = ftello(fp) + offset;
 
-      if (mutt_copy_message(fp, ctx, ctx->hdrs[i], MUTT_CM_UPDATE,
-                            CH_FROM | CH_UPDATE | CH_UPDATE_LEN) != 0)
+      if (mutt_open_copy_message(fp, ctx, ctx->hdrs[i], MUTT_CM_UPDATE,
+                                 CH_FROM | CH_UPDATE | CH_UPDATE_LEN) != 0)
       {
         mutt_perror(tempfile);
         mutt_sleep(5);
diff --git a/mh.c b/mh.c
index 6367c1bcf12436b967eb37f5471b09f270350ff9..845f91bfe544d0b9cfd81114b1c229fb52ddb3ac 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -1767,7 +1767,7 @@ static int mh_rewrite_message(struct Context *ctx, int msgno)
   if (!dest)
     return -1;
 
-  rc = mutt_copy_message(dest->fp, ctx, h, MUTT_CM_UPDATE, CH_UPDATE | CH_UPDATE_LEN);
+  rc = mutt_open_copy_message(dest->fp, ctx, h, MUTT_CM_UPDATE, CH_UPDATE | CH_UPDATE_LEN);
   if (rc == 0)
   {
     snprintf(oldpath, _POSIX_PATH_MAX, "%s/%s", ctx->path, h->path);
diff --git a/mutt.h b/mutt.h
index be0850cf6681793d93a86779ccf6222d3fe2e1e9..2452ab577238951127453211d72c04f9698f03ab 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -57,7 +57,7 @@ struct Mapping;
 #define fgetc fgetc_unlocked
 #endif
 
-/* flags for mutt_enter_string() */
+/* flags for mutt_enter_string_full() */
 #define MUTT_ALIAS    (1 << 0)  /**< do alias "completion" by calling up the alias-menu */
 #define MUTT_FILE     (1 << 1)  /**< do file completion */
 #define MUTT_EFILE    (1 << 2)  /**< do file completion, plus incoming folders */
@@ -293,7 +293,7 @@ enum QuadOptionVars
 /* flags for mutt_compose_menu() */
 #define MUTT_COMPOSE_NOFREEHEADER (1 << 0)
 
-/* flags to _mutt_select_file() */
+/* flags to mutt_select_file() */
 #define MUTT_SEL_BUFFY   (1 << 0)
 #define MUTT_SEL_MULTI   (1 << 1)
 #define MUTT_SEL_FOLDER  (1 << 2)
index 9cbeee730ebb46be03a1341fe13129d463644bec..c1eead99b73e5296fa18710d8f93652de36c513a 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -187,10 +187,10 @@ bool mutt_matches_ignore(const char *s)
 
 char *mutt_expand_path(char *s, size_t slen)
 {
-  return _mutt_expand_path(s, slen, 0);
+  return mutt_expand_path_regex(s, slen, 0);
 }
 
-char *_mutt_expand_path(char *s, size_t slen, int regex)
+char *mutt_expand_path_regex(char *s, size_t slen, int regex)
 {
   char p[_POSIX_PATH_MAX] = "";
   char q[_POSIX_PATH_MAX] = "";
@@ -528,8 +528,8 @@ uint64_t mutt_rand64(void)
   return ret;
 }
 
-void _mutt_mktemp(char *s, size_t slen, const char *prefix, const char *suffix,
-                  const char *src, int line)
+void mutt_mktemp_full(char *s, size_t slen, const char *prefix,
+                      const char *suffix, const char *src, int line)
 {
   size_t n = snprintf(s, slen, "%s/%s-%s-%d-%d-%" PRIu64 "%s%s", NONULL(Tmpdir),
                       NONULL(prefix), NONULL(ShortHostname), (int) getuid(),
index 8065b72770f38d9416b6189faa8366d3b8c9d2bd..f7c482738618de4786acfcaa2d4533ca4e68f224 100644 (file)
@@ -724,7 +724,7 @@ void crypt_extract_keys_from_messages(struct Header *h)
 
       if ((WithCrypto & APPLICATION_PGP) && (hi->security & APPLICATION_PGP))
       {
-        mutt_copy_message(fpout, Context, hi, MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
+        mutt_open_copy_message(fpout, Context, hi, MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
         fflush(fpout);
 
         mutt_endwin(_("Trying to extract PGP keys...\n"));
@@ -734,11 +734,11 @@ void crypt_extract_keys_from_messages(struct Header *h)
       if ((WithCrypto & APPLICATION_SMIME) && (hi->security & APPLICATION_SMIME))
       {
         if (hi->security & ENCRYPT)
-          mutt_copy_message(fpout, Context, hi,
-                            MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
-                            0);
+          mutt_open_copy_message(fpout, Context, hi,
+                                 MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
+                                 0);
         else
-          mutt_copy_message(fpout, Context, hi, 0, 0);
+          mutt_open_copy_message(fpout, Context, hi, 0, 0);
         fflush(fpout);
 
         if (hi->env->from)
@@ -764,7 +764,7 @@ void crypt_extract_keys_from_messages(struct Header *h)
     {
       if ((WithCrypto & APPLICATION_PGP) && (h->security & APPLICATION_PGP))
       {
-        mutt_copy_message(fpout, Context, h, MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
+        mutt_open_copy_message(fpout, Context, h, MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
         fflush(fpout);
         mutt_endwin(_("Trying to extract PGP keys...\n"));
         crypt_pgp_invoke_import(tempfname);
@@ -773,11 +773,11 @@ void crypt_extract_keys_from_messages(struct Header *h)
       if ((WithCrypto & APPLICATION_SMIME) && (h->security & APPLICATION_SMIME))
       {
         if (h->security & ENCRYPT)
-          mutt_copy_message(fpout, Context, h,
-                            MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
-                            0);
+          mutt_open_copy_message(fpout, Context, h,
+                                 MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
+                                 0);
         else
-          mutt_copy_message(fpout, Context, h, 0, 0);
+          mutt_open_copy_message(fpout, Context, h, 0, 0);
 
         fflush(fpout);
         if (h->env->from)
index 0f65f8679b5377f4febe9b2f4a8a5241804f189b..942aeb78655ce549194d3ed7c517e0413f1f883f 100644 (file)
@@ -142,14 +142,7 @@ char *pgp_short_keyid(struct PgpKeyInfo *k)
   return k->keyid + 8;
 }
 
-char *pgp_keyid(struct PgpKeyInfo *k)
-{
-  k = key_parent(k);
-
-  return _pgp_keyid(k);
-}
-
-char *_pgp_keyid(struct PgpKeyInfo *k)
+char *pgp_this_keyid(struct PgpKeyInfo *k)
 {
   if (option(OPT_PGP_LONG_IDS))
     return k->keyid;
@@ -157,6 +150,13 @@ char *_pgp_keyid(struct PgpKeyInfo *k)
     return (k->keyid + 8);
 }
 
+char *pgp_keyid(struct PgpKeyInfo *k)
+{
+  k = key_parent(k);
+
+  return pgp_this_keyid(k);
+}
+
 static char *pgp_fingerprint(struct PgpKeyInfo *k)
 {
   k = key_parent(k);
index e3a8e225b81bf1cf4a5260ab019f268ad8b7b559..7a7d2e8e93bafa8a22779fbbb272763d67711d73 100644 (file)
@@ -42,8 +42,8 @@ bool pgp_use_gpg_agent(void);
 
 int pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only);
 
-char *_pgp_keyid(struct PgpKeyInfo *);
-char *pgp_keyid(struct PgpKeyInfo *);
+char *pgp_this_keyid(struct PgpKeyInfo *k);
+char *pgp_keyid(struct PgpKeyInfo *k);
 char *pgp_short_keyid(struct PgpKeyInfo * k);
 char *pgp_long_keyid(struct PgpKeyInfo * k);
 char *pgp_fpr_or_lkeyid(struct PgpKeyInfo * k);
index ccd7daff6f09b502ef43aff2c77c7b7e2adfb61a..bc2c56bef4c082775841139f7d64482a353c018a 100644 (file)
@@ -232,7 +232,7 @@ static const char *pgp_entry_fmt(char *dest, size_t destlen, size_t col, int col
       if (!optional)
       {
         snprintf(fmt, sizeof(fmt), "%%%ss", prefix);
-        snprintf(dest, destlen, fmt, _pgp_keyid(key));
+        snprintf(dest, destlen, fmt, pgp_this_keyid(key));
       }
       break;
     case 'u':
index 3195db0ec57218efcba740ba5a63712955bfbeef..0ce8a119220130a172adf73fc1a9cb5505d90f60 100644 (file)
@@ -1250,10 +1250,10 @@ int smime_verify_sender(struct Header *h)
   }
 
   if (h->security & ENCRYPT)
-    mutt_copy_message(fpout, Context, h, MUTT_CM_DECODE_CRYPT & MUTT_CM_DECODE_SMIME,
-                      CH_MIME | CH_WEED | CH_NONEWLINE);
+    mutt_open_copy_message(fpout, Context, h, MUTT_CM_DECODE_CRYPT & MUTT_CM_DECODE_SMIME,
+                           CH_MIME | CH_WEED | CH_NONEWLINE);
   else
-    mutt_copy_message(fpout, Context, h, 0, 0);
+    mutt_open_copy_message(fpout, Context, h, 0, 0);
 
   fflush(fpout);
   safe_fclose(&fpout);
index 8be27c2e763551c4de63f3783ea3824859559056..f81330129d76c695d1fe398b29ac2d89a6a05950 100644 (file)
@@ -176,7 +176,8 @@ static void post_entry(char *s, size_t slen, struct Menu *menu, int entry)
 {
   struct Context *ctx = (struct Context *) menu->data;
 
-  _mutt_make_string(s, slen, NONULL(IndexFormat), ctx, ctx->hdrs[entry], MUTT_FORMAT_ARROWCURSOR);
+  mutt_make_string_flags(s, slen, NONULL(IndexFormat), ctx, ctx->hdrs[entry],
+                         MUTT_FORMAT_ARROWCURSOR);
 }
 
 static struct Header *select_msg(void)
index 23774505b55bd14c353796c20dc6964f4fae1ccf..a4867749a7e44032c3870c4483b1e357d58da154 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -53,8 +53,8 @@ struct ListHead;
 struct stat;
 struct passwd;
 
-#define mutt_make_string(A, B, C, D, E) _mutt_make_string(A, B, C, D, E, 0)
-void _mutt_make_string(char *dest, size_t destlen, const char *s, struct Context *ctx,
+#define mutt_make_string(A, B, C, D, E) mutt_make_string_flags(A, B, C, D, E, 0)
+void mutt_make_string_flags(char *dest, size_t destlen, const char *s, struct Context *ctx,
                        struct Header *hdr, enum FormatFlag flags);
 
 /**
@@ -128,7 +128,7 @@ const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols,
 char *mutt_charset_hook(const char *chs);
 char *mutt_iconv_hook(const char *chs);
 char *mutt_expand_path(char *s, size_t slen);
-char *_mutt_expand_path(char *s, size_t slen, int regex);
+char *mutt_expand_path_regex(char *s, size_t slen, int regex);
 char *mutt_find_hook(int type, const char *pat);
 char *mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw);
 char *mutt_get_body_charset(char *d, size_t dlen, struct Body *b);
@@ -203,10 +203,9 @@ void mutt_make_help(char *d, size_t dlen, const char *txt, int menu, int op);
 void mutt_make_misc_reply_headers(struct Envelope *env, struct Context *ctx, struct Header *cur, struct Envelope *curenv);
 void mutt_make_post_indent(struct Context *ctx, struct Header *cur, FILE *out);
 void mutt_message_to_7bit(struct Body *a, FILE *fp);
+void mutt_mktemp_full(char *s, size_t slen, const char *prefix, const char *suffix, const char *src, int line);
+#define mutt_mktemp_pfx_sfx(a, b, c, d) mutt_mktemp_full(a, b, c, d, __FILE__, __LINE__)
 #define mutt_mktemp(a, b) mutt_mktemp_pfx_sfx(a, b, "neomutt", NULL)
-#define mutt_mktemp_pfx_sfx(a, b, c, d) _mutt_mktemp(a, b, c, d, __FILE__, __LINE__)
-void _mutt_mktemp(char *s, size_t slen, const char *prefix, const char *suffix,
-                  const char *src, int line);
 void mutt_paddstr(int n, const char *s);
 void mutt_parse_mime_message(struct Context *ctx, struct Header *cur);
 void mutt_parse_part(FILE *fp, struct Body *b);
@@ -223,11 +222,10 @@ void mutt_safe_path(char *s, size_t l, struct Address *a);
 void mutt_save_path(char *d, size_t dsize, struct Address *a);
 void mutt_score_message(struct Context *ctx, struct Header *hdr, int upd_ctx);
 void mutt_select_fcc(char *path, size_t pathlen, struct Header *hdr);
-#define mutt_select_file(A, B, C) _mutt_select_file(A, B, C, NULL, NULL)
-void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfiles);
+void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfiles);
 void mutt_message_hook(struct Context *ctx, struct Header *hdr, int type);
-void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int upd_ctx);
-#define mutt_set_flag(a, b, c, d) _mutt_set_flag(a, b, c, d, 1)
+void mutt_set_flag_update(struct Context *ctx, struct Header *h, int flag, int bf, int upd_ctx);
+#define mutt_set_flag(a, b, c, d) mutt_set_flag_update(a, b, c, d, 1)
 void mutt_set_followup_to(struct Envelope *e);
 void mutt_shell_escape(void);
 void mutt_show_error(void);
@@ -281,15 +279,15 @@ int mutt_chscmp(const char *s, const char *chs);
 int mutt_prepare_template(FILE *fp, struct Context *ctx, struct Header *newhdr, struct Header *hdr, short resend);
 int mutt_resend_message(FILE *fp, struct Context *ctx, struct Header *cur);
 int mutt_compose_to_sender(struct Header *hdr);
-#define mutt_enter_fname(A, B, C, D) _mutt_enter_fname(A, B, C, D, 0, NULL, NULL, 0)
-#define mutt_enter_vfolder(A, B, C, D) _mutt_enter_fname(A, B, C, D, 0, NULL, NULL, MUTT_SEL_VFOLDER)
-int _mutt_enter_fname(const char *prompt, char *buf, size_t blen, int buffy,
+#define mutt_enter_fname(A, B, C, D)   mutt_enter_fname_full(A, B, C, D, 0, NULL, NULL, 0)
+#define mutt_enter_vfolder(A, B, C, D) mutt_enter_fname_full(A, B, C, D, 0, NULL, NULL, MUTT_SEL_VFOLDER)
+int mutt_enter_fname_full(const char *prompt, char *buf, size_t blen, int buffy,
                       int multiple, char ***files, int *numfiles, int flags);
 int mutt_enter_string(char *buf, size_t buflen, int col, int flags);
-int _mutt_enter_string(char *buf, size_t buflen, int col, int flags, int multiple,
+int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int multiple,
                        char ***files, int *numfiles, struct EnterState *state);
-#define mutt_get_field(A, B, C, D) _mutt_get_field(A, B, C, D, 0, NULL, NULL)
-int _mutt_get_field(const char *field, char *buf, size_t buflen, int complete,
+#define mutt_get_field(A, B, C, D) mutt_get_field_full(A, B, C, D, 0, NULL, NULL)
+int mutt_get_field_full(const char *field, char *buf, size_t buflen, int complete,
                     int multiple, char ***files, int *numfiles);
 int mutt_get_hook_type(const char *name);
 int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags);
@@ -332,7 +330,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a);
 int mutt_query_complete(char *buf, size_t buflen);
 int mutt_query_variables(struct ListHead *queries);
 int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, struct Header *hdr);
-int _mutt_save_message(struct Header *h, struct Context *ctx, int delete, int decode, int decrypt);
+int mutt_save_message_ctx(struct Header *h, int delete, int decode, int decrypt, struct Context *ctx);
 int mutt_save_message(struct Header *h, int delete, int decode, int decrypt);
 #ifdef USE_SMTP
 int mutt_smtp_send(const struct Address *from, const struct Address *to, const struct Address *cc,
index 04311c9ea51ae504acc69f9a35f1ad2b4c33e912..0bcd068bb02add1d6c05c3393ed79cbbf528eedd 100644 (file)
@@ -210,8 +210,9 @@ const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols,
             MessageFormat && aptr->content->hdr)
         {
           char s[SHORT_STRING];
-          _mutt_make_string(s, sizeof(s), MessageFormat, NULL, aptr->content->hdr,
-                            MUTT_FORMAT_FORCESUBJ | MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR);
+          mutt_make_string_flags(
+              s, sizeof(s), MessageFormat, NULL, aptr->content->hdr,
+              MUTT_FORMAT_FORCESUBJ | MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR);
           if (*s)
           {
             mutt_format_s(dest, destlen, prefix, s);
index 95c23ca2b5ff7cec3b337dbce86fee5a0f94b8ad..229a26191f948d5327ffb57be431f6480896b56b 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -341,7 +341,7 @@ static void include_header(int quote, FILE *ifp, struct Header *hdr, FILE *ofp,
     if (_prefix)
       strfcpy(prefix, _prefix, sizeof(prefix));
     else if (!option(OPT_TEXT_FLOWED))
-      _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context, hdr, 0);
+      mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString), Context, hdr, 0);
     else
       strfcpy(prefix, ">", sizeof(prefix));
 
@@ -433,8 +433,8 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx
   if (option(OPT_FORWARD_QUOTE))
   {
     if (!option(OPT_TEXT_FLOWED))
-      _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context,
-                        parent_hdr, 0);
+      mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString),
+                             Context, parent_hdr, 0);
     else
       strfcpy(prefix, ">", sizeof(prefix));
   }
@@ -617,7 +617,7 @@ static void attach_forward_msgs(FILE *fp, struct Header *hdr,
     if (cur)
     {
       mutt_forward_intro(Context, cur->hdr, tmpfp);
-      _mutt_copy_message(tmpfp, fp, cur->hdr, cur->hdr->content, cmflags, chflags);
+      mutt_copy_message(tmpfp, fp, cur->hdr, cur->hdr->content, cmflags, chflags);
       mutt_forward_trailer(Context, cur->hdr, tmpfp);
     }
     else
@@ -627,8 +627,8 @@ static void attach_forward_msgs(FILE *fp, struct Header *hdr,
         if (actx->idx[i]->content->tagged)
         {
           mutt_forward_intro(Context, actx->idx[i]->content->hdr, tmpfp);
-          _mutt_copy_message(tmpfp, actx->idx[i]->fp, actx->idx[i]->content->hdr,
-                             actx->idx[i]->content->hdr->content, cmflags, chflags);
+          mutt_copy_message(tmpfp, actx->idx[i]->fp, actx->idx[i]->content->hdr,
+                            actx->idx[i]->content->hdr->content, cmflags, chflags);
           mutt_forward_trailer(Context, actx->idx[i]->content->hdr, tmpfp);
         }
       }
@@ -785,7 +785,7 @@ static void attach_include_reply(FILE *fp, FILE *tmpfp, struct Header *cur, int
     cmflags |= MUTT_CM_WEED;
   }
 
-  _mutt_copy_message(tmpfp, fp, cur, cur->content, cmflags, chflags);
+  mutt_copy_message(tmpfp, fp, cur, cur->content, cmflags, chflags);
   mutt_make_post_indent(Context, cur, tmpfp);
 }
 
@@ -882,8 +882,8 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx,
     st.fpout = tmpfp;
 
     if (!option(OPT_TEXT_FLOWED))
-      _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context,
-                        parent_hdr, 0);
+      mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString),
+                             Context, parent_hdr, 0);
     else
       strfcpy(prefix, ">", sizeof(prefix));
 
index 10c84f8cb1516fcf4f376c7398dfc4fd881aa547..c41a991bd1faca1b36bd8c59b4ed471c8094aaf7 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -611,7 +611,7 @@ static int rfc2047_encode(ICONV_CONST char *d, size_t dlen, int col, const char
   return ret;
 }
 
-void _rfc2047_encode_string(char **pd, int encode_specials, int col)
+void rfc2047_encode_string(char **pd, int encode_specials, int col)
 {
   char *e = NULL;
   size_t elen;
@@ -639,9 +639,9 @@ void rfc2047_encode_adrlist(struct Address *addr, const char *tag)
   while (ptr)
   {
     if (ptr->personal)
-      _rfc2047_encode_string(&ptr->personal, 1, col);
+      rfc2047_encode_string(&ptr->personal, 1, col);
     else if (ptr->group && ptr->mailbox)
-      _rfc2047_encode_string(&ptr->mailbox, 1, col);
+      rfc2047_encode_string(&ptr->mailbox, 1, col);
     ptr = ptr->next;
   }
 }
index f08b5eabc56577f7f660793f498e674e8cd2dbd8..5b5cf076a32000a49a1e2b9c4ff596de5c97b733 100644 (file)
--- a/rfc2047.h
+++ b/rfc2047.h
@@ -31,10 +31,10 @@ char *mutt_choose_charset(const char *fromcode, const char *charsets, char *u,
                           size_t ulen, char **d, size_t *dlen);
 int convert_nonmime_string(char **ps);
 
-void _rfc2047_encode_string(char **pd, int encode_specials, int col);
+void rfc2047_encode_string(char **pd, int encode_specials, int col);
 void rfc2047_encode_adrlist(struct Address *addr, const char *tag);
 
-#define rfc2047_encode_string(a) _rfc2047_encode_string(a, 0, 32);
+#define rfc2047_encode_string32(a) rfc2047_encode_string(a, 0, 32);
 
 void rfc2047_decode(char **pd);
 void rfc2047_decode_adrlist(struct Address *a);
diff --git a/score.c b/score.c
index 490cdbd3ac7c5c1ca9f1d4d7667d73d27508f152..44f501d8cf0e0f126ce819dd03fc117526fadab2 100644 (file)
--- a/score.c
+++ b/score.c
@@ -162,11 +162,11 @@ void mutt_score_message(struct Context *ctx, struct Header *hdr, int upd_ctx)
     hdr->score = 0;
 
   if (hdr->score <= ScoreThresholdDelete)
-    _mutt_set_flag(ctx, hdr, MUTT_DELETE, 1, upd_ctx);
+    mutt_set_flag_update(ctx, hdr, MUTT_DELETE, 1, upd_ctx);
   if (hdr->score <= ScoreThresholdRead)
-    _mutt_set_flag(ctx, hdr, MUTT_READ, 1, upd_ctx);
+    mutt_set_flag_update(ctx, hdr, MUTT_READ, 1, upd_ctx);
   if (hdr->score >= ScoreThresholdFlag)
-    _mutt_set_flag(ctx, hdr, MUTT_FLAG, 1, upd_ctx);
+    mutt_set_flag_update(ctx, hdr, MUTT_FLAG, 1, upd_ctx);
 }
 
 int mutt_parse_unscore(struct Buffer *buf, struct Buffer *s, unsigned long data,
diff --git a/send.c b/send.c
index 05b829cd47017a3a31d8e2ee0e9aa96b8e32e6b5..b346cc8c9d1579b479d4b1d04a2737b83377a285 100644 (file)
--- a/send.c
+++ b/send.c
@@ -468,7 +468,7 @@ static int include_forward(struct Context *ctx, struct Header *cur, FILE *out)
    * rather than send action */
   chflags |= CH_DISPLAY;
 
-  mutt_copy_message(out, ctx, cur, cmflags, chflags);
+  mutt_open_copy_message(out, ctx, cur, cmflags, chflags);
   mutt_forward_trailer(ctx, cur, out);
   return 0;
 }
@@ -522,7 +522,7 @@ static int include_reply(struct Context *ctx, struct Header *cur, FILE *out)
     cmflags |= MUTT_CM_WEED;
   }
 
-  mutt_copy_message(out, ctx, cur, cmflags, chflags);
+  mutt_open_copy_message(out, ctx, cur, cmflags, chflags);
 
   mutt_make_post_indent(ctx, cur, out);
 
@@ -1157,7 +1157,7 @@ void mutt_encode_descriptions(struct Body *b, short recurse)
   {
     if (t->description)
     {
-      rfc2047_encode_string(&t->description);
+      rfc2047_encode_string32(&t->description);
     }
     if (recurse && t->parts)
       mutt_encode_descriptions(t->parts, recurse);
index ce6a91e4ed2115014bcfbdbab92fb76a2bf2edc9..e417cf7a0be86403281fc5b29e91831877581447 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1415,7 +1415,7 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i
     }
   }
 
-  mutt_copy_message(fp, ctx, hdr, cmflags, chflags);
+  mutt_open_copy_message(fp, ctx, hdr, cmflags, chflags);
 
   fflush(fp);
   rewind(fp);
@@ -2247,7 +2247,7 @@ static void encode_headers(struct ListHead *h)
     if (!tmp)
       continue;
 
-    rfc2047_encode_string(&tmp);
+    rfc2047_encode_string32(&tmp);
     safe_realloc(&np->data, mutt_strlen(np->data) + 2 + mutt_strlen(tmp) + 1);
 
     sprintf(np->data + i, ": %s", NONULL(tmp));
@@ -2724,7 +2724,7 @@ void mutt_prepare_envelope(struct Envelope *env, int final)
     if (!option(OPT_NEWS_SEND) || option(OPT_MIME_SUBJECT))
 #endif
     {
-      rfc2047_encode_string(&env->subject);
+      rfc2047_encode_string32(&env->subject);
     }
   encode_headers(&env->userhdrs);
 }
index 97e67b3b758365d61eece3d846f63086f5ad7e02..41bdfaceebb63a7e5a5d2db896b6b990a0cfa753 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -1052,13 +1052,13 @@ static struct Header *find_virtual(struct MuttThread *cur, int reverse)
 }
 
 /**
- * _mutt_aside_thread - Find the next/previous (sub)thread
+ * mutt_aside_thread - Find the next/previous (sub)thread
  * @param hdr        Search from this message
  * @param dir        Direction to search: 'true' forwards, 'false' backwards
  * @param subthreads Search subthreads: 'true' subthread, 'false' not
  * @retval n Index into the virtual email table
  */
-int _mutt_aside_thread(struct Header *hdr, short dir, short subthreads)
+int mutt_aside_thread(struct Header *hdr, short dir, short subthreads)
 {
   struct MuttThread *cur = NULL;
   struct Header *tmp = NULL;
@@ -1177,7 +1177,7 @@ void mutt_set_virtual(struct Context *ctx)
   }
 }
 
-int _mutt_traverse_thread(struct Context *ctx, struct Header *cur, int flag)
+int mutt_traverse_thread(struct Context *ctx, struct Header *cur, int flag)
 {
   struct MuttThread *thread = NULL, *top = NULL;
   struct Header *roothdr = NULL;
index 29931abd659ae2e526558f64f586c1566ca73cef..c7b885af7b1ef4821a566721a8ee5324d0334ca3 100644 (file)
--- a/thread.h
+++ b/thread.h
@@ -49,19 +49,19 @@ struct MuttThread
   struct Header *sort_key;
 };
 
-int _mutt_aside_thread(struct Header *hdr, short dir, short subthreads);
-#define mutt_next_thread(x)        _mutt_aside_thread(x, 1, 0)
-#define mutt_previous_thread(x)    _mutt_aside_thread(x, 0, 0)
-#define mutt_next_subthread(x)     _mutt_aside_thread(x, 1, 1)
-#define mutt_previous_subthread(x) _mutt_aside_thread(x, 0, 1)
+int mutt_aside_thread(struct Header *hdr, short dir, short subthreads);
+#define mutt_next_thread(x)        mutt_aside_thread(x, 1, 0)
+#define mutt_previous_thread(x)    mutt_aside_thread(x, 0, 0)
+#define mutt_next_subthread(x)     mutt_aside_thread(x, 1, 1)
+#define mutt_previous_subthread(x) mutt_aside_thread(x, 0, 1)
 
-int _mutt_traverse_thread(struct Context *ctx, struct Header *cur, int flag);
-#define mutt_collapse_thread(x, y)         _mutt_traverse_thread(x, y, MUTT_THREAD_COLLAPSE)
-#define mutt_uncollapse_thread(x, y)       _mutt_traverse_thread(x, y, MUTT_THREAD_UNCOLLAPSE)
-#define mutt_get_hidden(x, y)              _mutt_traverse_thread(x, y, MUTT_THREAD_GET_HIDDEN)
-#define mutt_thread_contains_unread(x, y)  _mutt_traverse_thread(x, y, MUTT_THREAD_UNREAD)
-#define mutt_thread_contains_flagged(x, y) _mutt_traverse_thread(x, y, MUTT_THREAD_FLAGGED)
-#define mutt_thread_next_unread(x, y)      _mutt_traverse_thread(x, y, MUTT_THREAD_NEXT_UNREAD)
+int mutt_traverse_thread(struct Context *ctx, struct Header *cur, int flag);
+#define mutt_collapse_thread(x, y)         mutt_traverse_thread(x, y, MUTT_THREAD_COLLAPSE)
+#define mutt_uncollapse_thread(x, y)       mutt_traverse_thread(x, y, MUTT_THREAD_UNCOLLAPSE)
+#define mutt_get_hidden(x, y)              mutt_traverse_thread(x, y, MUTT_THREAD_GET_HIDDEN)
+#define mutt_thread_contains_unread(x, y)  mutt_traverse_thread(x, y, MUTT_THREAD_UNREAD)
+#define mutt_thread_contains_flagged(x, y) mutt_traverse_thread(x, y, MUTT_THREAD_FLAGGED)
+#define mutt_thread_next_unread(x, y)      mutt_traverse_thread(x, y, MUTT_THREAD_NEXT_UNREAD)
 
 void mutt_break_thread(struct Header *hdr);
 int mutt_link_threads(struct Header *cur, struct Header *last, struct Context *ctx);