65 while ((ch = *tok->
dptr))
93 else if (!qc && ((ch ==
'\'') || (ch ==
'"')) && !(flags &
TOKEN_QUOTE))
97 else if ((ch ==
'\\') && (qc !=
'\''))
99 if (tok->
dptr[0] ==
'\0')
101 switch (ch = *tok->
dptr++)
105 if (tok->
dptr[0] ==
'\0')
107 buf_addch(dest, (toupper((
unsigned char) tok->
dptr[0]) -
'@') & 0x7f);
126 if (isdigit((
unsigned char) ch) && isdigit((
unsigned char) tok->
dptr[0]) &&
127 isdigit((
unsigned char) tok->
dptr[1]))
140 if (tok->
dptr[0] ==
'\0')
151 else if (isalpha((
unsigned char) ch))
153 buf_addch(dest, toupper((
unsigned char) ch) -
'@');
161 else if ((ch ==
'`') && (!qc || (qc ==
'"')))
169 pc = strpbrk(pc,
"\\`");
176 }
while (pc && (pc[0] !=
'`'));
240 else if ((ch ==
'$') && (!qc || (qc ==
'"')) &&
241 ((tok->
dptr[0] ==
'{') || isalpha((
unsigned char) tok->
dptr[0])))
243 const char *env = NULL;
246 if (tok->
dptr[0] ==
'{')
248 pc = strchr(tok->
dptr,
'}');
266 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.
struct Buffer buf_make(size_t size)
Make a new buffer on the stack.
void buf_fix_dptr(struct Buffer *buf)
Move the dptr to end of the Buffer.
struct Buffer * buf_init(struct Buffer *buf)
Initialise a new 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_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
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.
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
#define MUTT_RL_NO_FLAGS
No flags are set.
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)
Set up filter program.
#define mutt_debug(LEVEL,...)
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
char * mutt_strn_dup(const char *begin, size_t len)
Duplicate a sub-string.
char * mutt_str_dup(const char *str)
Copy a string, safely.
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.
size_t dsize
Length of data.
char * data
Pointer to data.
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.