62 while ((ch = *tok->
dptr))
90 else if (!qc && ((ch ==
'\'') || (ch ==
'"')) && !(flags &
TOKEN_QUOTE))
94 else if ((ch ==
'\\') && (qc !=
'\''))
96 if (tok->
dptr[0] ==
'\0')
98 switch (ch = *tok->
dptr++)
102 if (tok->
dptr[0] ==
'\0')
104 buf_addch(dest, (toupper((
unsigned char) tok->
dptr[0]) -
'@') & 0x7f);
123 if (isdigit((
unsigned char) ch) && isdigit((
unsigned char) tok->
dptr[0]) &&
124 isdigit((
unsigned char) tok->
dptr[1]))
137 if (tok->
dptr[0] ==
'\0')
148 else if (isalpha((
unsigned char) ch))
150 buf_addch(dest, toupper((
unsigned char) ch) -
'@');
158 else if ((ch ==
'`') && (!qc || (qc ==
'"')))
166 pc = strpbrk(pc,
"\\`");
178 }
while (pc && (pc[0] !=
'`'));
243 else if ((ch ==
'$') && (!qc || (qc ==
'"')) &&
244 ((tok->
dptr[0] ==
'{') || isalpha((
unsigned char) tok->
dptr[0])))
246 const char *env = NULL;
249 if (tok->
dptr[0] ==
'{')
251 pc = strchr(tok->
dptr,
'}');
269 for (pc = tok->
dptr; isalnum((
unsigned char) *pc) || (pc[0] ==
'_'); pc++)
void buf_seek(struct Buffer *buf, size_t offset)
Set current read/write position to offset from beginning.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t buf_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Convenience wrapper for the config headers.
#define CSR_SUCCESS
Action completed successfully.
Convenience wrapper for the core headers.
char * mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, ReadLineFlags flags)
Read a line from a file.
#define mutt_file_fclose(FP)
#define MUTT_RL_NO_FLAGS
No flags are set.
char ** EnvList
Private copy of the environment variables.
#define mutt_debug(LEVEL,...)
@ LL_DEBUG1
Log at debug level 1.
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
pid_t filter_create(const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err, char **envlist)
Set up filter program.
Convenience wrapper for the library headers.
char * mutt_strn_dup(const char *begin, size_t len)
Duplicate a sub-string.
const char * mutt_str_getenv(const char *name)
Get an environment variable.
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.
String manipulation buffer.
char * dptr
Current read/write position.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
int cs_subset_str_string_get(const struct ConfigSubset *sub, const char *name, struct Buffer *result)
Get a config item as a string.