Run an external program to find Addresses.
190{
191 FILE *fp = NULL;
192 char *buf = NULL;
193 size_t buflen;
194 char *msg = NULL;
195 size_t msglen = 0;
196 char *tok = NULL;
197 char *next_tok = NULL;
199
202
204 if (pid < 0)
205 {
208 return -1;
209 }
211
212 if (verbose)
214
216
217
220 {
221 tok = buf;
222 next_tok = strchr(tok, '\t');
223 if (next_tok)
224 *next_tok++ = '\0';
225
226 if (*tok == '\0')
227 continue;
228
230
231 if (next_tok)
232 {
233 tok = next_tok;
234 next_tok = strchr(tok, '\t');
235 if (next_tok)
236 *next_tok++ = '\0';
237
240
242 }
243 else
244 {
246 }
247
249 }
251
255 {
257 if (verbose)
259 }
260 else
261 {
262 if (verbose)
264 }
266
267 return 0;
268}
int mutt_addrlist_parse(struct AddressList *al, const char *s)
Parse a list of email addresses.
void parse_alias_comments(struct Alias *alias, const char *com)
Parse the alias/query comment field.
struct Alias * alias_new(void)
Create a new Alias.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
char * mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, ReadLineFlags flags)
Read a line from a file.
void buf_file_expand_fmt_quote(struct Buffer *dest, const char *fmt, const char *src)
Replace s in a string with a filename.
#define mutt_file_fclose(FP)
#define MUTT_RL_NO_FLAGS
No flags are set.
char ** EnvList
Private copy of the environment variables.
#define mutt_message(...)
#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.
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.
#define TAILQ_INSERT_TAIL(head, elm, field)
A shortcut for an email address or addresses.
String manipulation buffer.