55 return strcmp(*(
const char **) a, *(
const char **) b);
73 struct Buffer *tempfile = NULL;
109 fprintf(fp_out,
"%s\n", *env);
128 if (*line->
dptr ==
'?')
135 buf_printf(err,
_(
"Can't query option with the '%s' command"), cmd->
name);
150 if (!isalpha(name[0]) && (name[0] !=
'_'))
156 for (
size_t i = 1; name[i] !=
'\0'; i++)
158 if (!isalpha(name[i]) && !
mutt_isdigit(name[i]) && (name[i] !=
'_'))
166 if (*line->
dptr ==
'?')
170 buf_printf(err,
_(
"Can't query option with the '%s' command"), cmd->
name);
176 buf_printf(err,
_(
"Can't use a prefix when querying a variable"));
187 while (envp && *envp)
222 if (*line->
dptr ==
'=')
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
Convenience wrapper for the config headers.
bool StartupComplete
When the config has been read.
Convenience wrapper for the core headers.
bool mutt_isdigit(int arg)
Wrapper for isdigit(3)
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
void mutt_endwin(void)
Shutdown curses.
bool envlist_set(char ***envp, const char *name, const char *value, bool overwrite)
Set an environment variable.
bool envlist_unset(char ***envp, const char *name)
Unset an environment variable.
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
enum CommandResult parse_setenv(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'setenv' and 'unsetenv' commands - Implements Command::parse() -.
static int envlist_sort(const void *a, const void *b, void *sdata)
Compare two environment strings - Implements sort_t -.
Convenience wrapper for the gui headers.
#define FREE(x)
Free memory and set the pointer to NULL.
Convenience wrapper for the library headers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
void mutt_qsort_r(void *base, size_t nmemb, size_t size, sort_t compar, void *sdata)
Sort an array, where the comparator has access to opaque data rather than requiring global variables.
String manipulation buffer.
char * dptr
Current read/write position.
const char * name
Name of the Command.
enum CommandId id
ID of the Command.
Container for Accounts, Notifications.
char ** env
Private copy of the environment variables.
Context for config parsing (history/backtrace)
Detailed error information from config parsing.
struct Buffer * message
Error message.