From: Richard Russon Date: Sun, 1 Apr 2018 02:38:33 +0000 (+0100) Subject: rename enter_state functions X-Git-Tag: neomutt-20180512~69^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f3cebefe1e085e2afc1a21cab58b15109dec913;p=neomutt rename enter_state functions --- diff --git a/curs_lib.c b/curs_lib.c index 9c1695efa..50244f29c 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -175,7 +175,7 @@ int mutt_get_field_full(const char *field, char *buf, size_t buflen, int ret; int x; - struct EnterState *es = mutt_new_enter_state(); + struct EnterState *es = mutt_enter_state_new(); do { @@ -195,7 +195,7 @@ int mutt_get_field_full(const char *field, char *buf, size_t buflen, 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); + mutt_enter_state_free(&es); return ret; } diff --git a/enter.c b/enter.c index bcf639ac8..86cd2f146 100644 --- a/enter.c +++ b/enter.c @@ -115,7 +115,7 @@ static void replace_part(struct EnterState *state, size_t from, char *buf) int mutt_enter_string(char *buf, size_t buflen, int col, int flags) { int rc; - struct EnterState *es = mutt_new_enter_state(); + struct EnterState *es = mutt_enter_state_new(); do { if (SigWinch) @@ -126,7 +126,7 @@ int mutt_enter_string(char *buf, size_t buflen, int col, int flags) } rc = mutt_enter_string_full(buf, buflen, col, flags, 0, NULL, NULL, es); } while (rc == 1); - mutt_free_enter_state(&es); + mutt_enter_state_free(&es); return rc; } @@ -758,7 +758,7 @@ bye: return rc; } -void mutt_free_enter_state(struct EnterState **esp) +void mutt_enter_state_free(struct EnterState **esp) { if (!esp) return; diff --git a/enter_state.h b/enter_state.h index b52d45ba0..8e4e551b6 100644 --- a/enter_state.h +++ b/enter_state.h @@ -39,7 +39,9 @@ struct EnterState int tabs; }; -static inline struct EnterState *mutt_new_enter_state(void) +void mutt_enter_state_free(struct EnterState **esp); + +static inline struct EnterState *mutt_enter_state_new(void) { return mutt_mem_calloc(1, sizeof(struct EnterState)); } diff --git a/protos.h b/protos.h index fd3fbe5bb..514cb1532 100644 --- a/protos.h +++ b/protos.h @@ -178,7 +178,6 @@ void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char * void mutt_forward_intro(struct Context *ctx, struct Header *cur, FILE *fp); void mutt_forward_trailer(struct Context *ctx, struct Header *cur, FILE *fp); void mutt_free_color(int fg, int bg); -void mutt_free_enter_state(struct EnterState **esp); void mutt_help(int menu); void mutt_check_lookup_list(struct Body *b, char *type, size_t len); void mutt_make_attribution(struct Context *ctx, struct Header *cur, FILE *out);