From: Damien Riegel Date: Sat, 18 Jun 2016 20:36:18 +0000 (-0700) Subject: prepend maildir_commit_message function name with an underscore X-Git-Tag: neomutt-20160822~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6691d778d7a50383121683dd50b7bc877e022efd;p=neomutt 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. --- diff --git a/mh.c b/mh.c index d4e9c1dde..5e997f194 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 9b5cd11dc..c5416c702 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 2c12d707d..2277268ea 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 *);