NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
dispatcher.c File Reference

Dispatcher of functions. More...

#include "config.h"
#include <stddef.h>
#include "mutt/lib.h"
#include "dispatcher.h"
+ Include dependency graph for dispatcher.c:

Go to the source code of this file.


const char * dispacher_get_retval_name (int rv)
 Get the name of a return value. More...


const struct Mapping RetvalNames []
 Lookup for function results. More...

Detailed Description

Dispatcher of functions.

  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Definition in file dispatcher.c.

Function Documentation

◆ dispacher_get_retval_name()

const char * dispacher_get_retval_name ( int  rv)

Get the name of a return value.

rvReturn value, e.g. FR_ERROR
Return values
strName of the retval

Definition at line 54 of file dispatcher.c.

56 const char *result = mutt_map_get_name(rv, RetvalNames);
57 return NONULL(result);
const struct Mapping RetvalNames[]
Lookup for function results.
Definition: dispatcher.c:35
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Definition: mapping.c:42
#define NONULL(x)
Definition: string2.h:37
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ RetvalNames

const struct Mapping RetvalNames[]
Initial value:
= {
{ "continue", FR_CONTINUE },
{ "done", FR_DONE },
{ "error", FR_ERROR },
{ "no action", FR_NO_ACTION },
{ "not impl", FR_NOT_IMPL },
{ "success", FR_SUCCESS },
{ "unknown", FR_UNKNOWN },
{ NULL, 0 },
Valid function - successfully performed.
Definition: dispatcher.h:39
Exit the Dialog.
Definition: dispatcher.h:35
Unknown function.
Definition: dispatcher.h:33
Valid function - error occurred.
Definition: dispatcher.h:38
Invalid function - feature not enabled.
Definition: dispatcher.h:36
Remain in the Dialog.
Definition: dispatcher.h:34
Valid function - no action performed.
Definition: dispatcher.h:37

Lookup for function results.

Definition at line 35 of file dispatcher.c.