NeoMutt  2022-04-29-249-gaae397
Teaching an old dog new tricks
DOXYGEN
File Mapping API

Prototype for a text handler function for mutt_file_map_lines() More...

Functions

static bool add_query_msgid (char *line, int line_num, void *user_data)
 Parse a Message-Id and add it to a list - Implements mutt_file_map_t -. More...
 

Detailed Description

Prototype for a text handler function for mutt_file_map_lines()

Parameters
lineLine of text read
line_numLine number
user_dataData to pass to the callback function
Return values
trueRead was successful
falseAbort the reading and free the string

Function Documentation

◆ add_query_msgid()

static bool add_query_msgid ( char *  line,
int  line_num,
void *  user_data 
)
static

Parse a Message-Id and add it to a list - Implements mutt_file_map_t -.

Return values
trueAlways

Definition at line 135 of file compile.c.

136{
137 struct ListHead *msgid_list = (struct ListHead *) (user_data);
138 char *nows = mutt_str_skip_whitespace(line);
139 if (*nows == '\0')
140 return true;
142 mutt_list_insert_tail(msgid_list, mutt_str_dup(nows));
143 return true;
144}
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
Definition: list.c:64
void mutt_str_remove_trailing_ws(char *s)
Trim trailing whitespace from a string.
Definition: string.c:636
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:250
char * mutt_str_skip_whitespace(const char *p)
Find the first non-whitespace character in a string.
Definition: string.c:622
+ Here is the call graph for this function:
+ Here is the caller graph for this function: