Lines Matching defs:line

215 static bool imap_matchresp(const char *line, size_t len, const char *cmd)
217 const char *end = line + len;
221 line += 2;
224 if(line < end && ISDIGIT(*line)) {
227 line++;
228 while(line < end && ISDIGIT(*line));
231 if(line == end || *line != ' ')
234 line++;
238 the end of line? */
239 if(line + cmd_len <= end && strncasecompare(line, cmd, cmd_len) &&
240 (line[cmd_len] == ' ' || line + cmd_len + 2 == end))
254 char *line, size_t len, int *resp)
262 if(len >= id_len + 1 && !memcmp(id, line, id_len) && line[id_len] == ' ') {
263 line += id_len + 1;
266 if(len >= 2 && !memcmp(line, "OK", 2))
268 else if(len >= 7 && !memcmp(line, "PREAUTH", 7))
277 if(len >= 2 && !memcmp("* ", line, 2)) {
281 if(!imap_matchresp(line, len, "CAPABILITY"))
286 if((!imap->custom && !imap_matchresp(line, len, "LIST")) ||
287 (imap->custom && !imap_matchresp(line, len, imap->custom) &&
289 !imap_matchresp(line, len, "FETCH")) &&
307 if(!imap_matchresp(line, len, "FETCH"))
312 if(!imap_matchresp(line, len, "SEARCH"))
329 if(imap && !imap->custom && ((len == 3 && line[0] == '+') ||
330 (len >= 2 && !memcmp("+ ", line, 2)))) {
899 const char *line = Curl_dyn_ptr(&imapc->pp.recvbuf);
905 line += 2;
907 /* Loop through the data line */
910 while(*line &&
911 (*line == ' ' || *line == '\t' ||
912 *line == '\r' || *line == '\n')) {
914 line++;
917 if(!*line)
921 for(wordlen = 0; line[wordlen] && line[wordlen] != ' ' &&
922 line[wordlen] != '\t' && line[wordlen] != '\r' &&
923 line[wordlen] != '\n';)
927 if(wordlen == 8 && !memcmp(line, "STARTTLS", 8))
931 else if(wordlen == 13 && !memcmp(line, "LOGINDISABLED", 13))
935 else if(wordlen == 7 && !memcmp(line, "SASL-IR", 7))
939 else if(wordlen > 5 && !memcmp(line, "AUTH=", 5)) {
943 line += 5;
947 mechbit = Curl_sasl_decode_mech(line, wordlen, &llen);
952 line += wordlen;
1061 char *line = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf);
1067 result = Curl_client_write(data, CLIENTWRITE_BODY, line, len);
1085 const char *line = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf);
1091 if(checkprefix("OK [UIDVALIDITY ", line + 2)) {
1093 const char *p = &line[2] + strlen("OK [UIDVALIDITY ");
1136 /* For the (first line of the) FETCH responses */
1225 /* We don't know how to parse this line */
1321 /* Was there an error parsing the response line? */
1522 /* End the APPEND command first by sending an empty line */
1817 struct dynbuf line;
1830 Curl_dyn_init(&line, 2000);
1832 if(!escape_only && Curl_dyn_addn(&line, "\"", 1))
1837 Curl_dyn_addn(&line, "\\", 1))
1839 if(Curl_dyn_addn(&line, str, 1))
1844 if(!escape_only && Curl_dyn_addn(&line, "\"", 1))
1847 return Curl_dyn_ptr(&line);