From 98428a086bd4e9bc68fa1f82181b8705feb85830 Mon Sep 17 00:00:00 2001 From: Damien Riegel Date: Sat, 18 Jun 2016 13:36:18 -0700 Subject: [PATCH] prepend maildir_commit_message function name with an underscore Basically, rename maildir_commit_message to _maildir_commit_message. This commit is preparatory to make the maildir_commit_message symbol available for further use. Symbols starting with underscore should be avoided but this one is long enough to prevent collision. --- mh.c | 8 ++++---- mx.c | 2 +- mx.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mh.c b/mh.c index d4e9c1dd..5e997f19 100644 --- a/mh.c +++ b/mh.c @@ -1469,7 +1469,7 @@ static int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr * */ -int maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr) +int _maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr) { char subdir[4]; char suffix[16]; @@ -1501,7 +1501,7 @@ int maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr) NONULL (Hostname), suffix); snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path); - dprint (2, (debugfile, "maildir_commit_message (): renaming %s to %s.\n", + dprint (2, (debugfile, "_maildir_commit_message (): renaming %s to %s.\n", msg->path, full)); if (safe_rename (msg->path, full) == 0) @@ -1524,7 +1524,7 @@ int maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr) ut.modtime = msg->received; if (utime (full, &ut)) { - mutt_perror (_("maildir_commit_message(): unable to set time on file")); + mutt_perror (_("_maildir_commit_message(): unable to set time on file")); return -1; } } @@ -1657,7 +1657,7 @@ static int mh_rewrite_message (CONTEXT * ctx, int msgno) strfcpy (partpath, h->path, _POSIX_PATH_MAX); if (ctx->magic == MUTT_MAILDIR) - rc = maildir_commit_message (ctx, dest, h); + rc = _maildir_commit_message (ctx, dest, h); else rc = _mh_commit_message (ctx, dest, h, 0); diff --git a/mx.c b/mx.c index 9b5cd11d..c5416c70 100644 --- a/mx.c +++ b/mx.c @@ -1365,7 +1365,7 @@ int mx_commit_message (MESSAGE *msg, CONTEXT *ctx) case MUTT_MAILDIR: { - r = maildir_commit_message (ctx, msg, NULL); + r = _maildir_commit_message (ctx, msg, NULL); break; } diff --git a/mx.h b/mx.h index 2c12d707..2277268e 100644 --- a/mx.h +++ b/mx.h @@ -57,7 +57,7 @@ int mh_check_empty (const char *); int maildir_check_empty (const char *); -int maildir_commit_message (CONTEXT *, MESSAGE *, HEADER *); +int _maildir_commit_message (CONTEXT *, MESSAGE *, HEADER *); int mh_commit_message (CONTEXT *, MESSAGE *); FILE *maildir_open_find_message (const char *, const char *); -- 2.40.0