email: General code tidy up
Corrected some function argument definitions to maximize the 80 character line length limit and be in keeping with the curl coding style.
This commit is contained in:
parent
7b5be79908
commit
ece8681a60
21
lib/imap.c
21
lib/imap.c
@ -93,8 +93,7 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status,
|
|||||||
static CURLcode imap_connect(struct connectdata *conn, bool *done);
|
static CURLcode imap_connect(struct connectdata *conn, bool *done);
|
||||||
static CURLcode imap_disconnect(struct connectdata *conn, bool dead);
|
static CURLcode imap_disconnect(struct connectdata *conn, bool dead);
|
||||||
static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done);
|
static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done);
|
||||||
static int imap_getsock(struct connectdata *conn,
|
static int imap_getsock(struct connectdata *conn, curl_socket_t *socks,
|
||||||
curl_socket_t *socks,
|
|
||||||
int numsocks);
|
int numsocks);
|
||||||
static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done);
|
static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done);
|
||||||
static CURLcode imap_setup_connection(struct connectdata *conn);
|
static CURLcode imap_setup_connection(struct connectdata *conn);
|
||||||
@ -125,7 +124,6 @@ const struct Curl_handler Curl_handler_imap = {
|
|||||||
| PROTOPT_NOURLQUERY /* flags */
|
| PROTOPT_NOURLQUERY /* flags */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
/*
|
/*
|
||||||
* IMAPS protocol handler.
|
* IMAPS protocol handler.
|
||||||
@ -178,7 +176,6 @@ static const struct Curl_handler Curl_handler_imap_proxy = {
|
|||||||
PROTOPT_NONE /* flags */
|
PROTOPT_NONE /* flags */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
/*
|
/*
|
||||||
* HTTP-proxyed IMAPS protocol handler.
|
* HTTP-proxyed IMAPS protocol handler.
|
||||||
@ -423,8 +420,7 @@ static int imap_endofresp(struct pingpong *pp, int *resp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This is the ONLY way to change IMAP state! */
|
/* This is the ONLY way to change IMAP state! */
|
||||||
static void state(struct connectdata *conn,
|
static void state(struct connectdata *conn, imapstate newstate)
|
||||||
imapstate newstate)
|
|
||||||
{
|
{
|
||||||
struct imap_conn *imapc = &conn->proto.imapc;
|
struct imap_conn *imapc = &conn->proto.imapc;
|
||||||
#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||||
@ -570,8 +566,7 @@ static CURLcode imap_authenticate(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For the IMAP "protocol connect" and "doing" phases only */
|
/* For the IMAP "protocol connect" and "doing" phases only */
|
||||||
static int imap_getsock(struct connectdata *conn,
|
static int imap_getsock(struct connectdata *conn, curl_socket_t *socks,
|
||||||
curl_socket_t *socks,
|
|
||||||
int numsocks)
|
int numsocks)
|
||||||
{
|
{
|
||||||
return Curl_pp_getsock(&conn->proto.imapc.pp, socks, numsocks);
|
return Curl_pp_getsock(&conn->proto.imapc.pp, socks, numsocks);
|
||||||
@ -636,6 +631,7 @@ static CURLcode imap_state_starttls_resp(struct connectdata *conn,
|
|||||||
state(conn, IMAP_UPGRADETLS);
|
state(conn, IMAP_UPGRADETLS);
|
||||||
return imap_state_upgrade_tls(conn);
|
return imap_state_upgrade_tls(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1090,8 +1086,7 @@ static CURLcode imap_state_select_resp(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For the (first line of) FETCH BODY[TEXT] response */
|
/* For the (first line of) FETCH BODY[TEXT] response */
|
||||||
static CURLcode imap_state_fetch_resp(struct connectdata *conn,
|
static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
|
||||||
int imapcode,
|
|
||||||
imapstate instate)
|
imapstate instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -1277,8 +1272,7 @@ static CURLcode imap_statemach_act(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Called repeatedly until done from multi.c */
|
/* Called repeatedly until done from multi.c */
|
||||||
static CURLcode imap_multi_statemach(struct connectdata *conn,
|
static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done)
|
||||||
bool *done)
|
|
||||||
{
|
{
|
||||||
struct imap_conn *imapc = &conn->proto.imapc;
|
struct imap_conn *imapc = &conn->proto.imapc;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
@ -1343,8 +1337,7 @@ static CURLcode imap_init(struct connectdata *conn)
|
|||||||
* phase is done when this function returns, or FALSE is not. When called as
|
* phase is done when this function returns, or FALSE is not. When called as
|
||||||
* a part of the easy interface, it will always be TRUE.
|
* a part of the easy interface, it will always be TRUE.
|
||||||
*/
|
*/
|
||||||
static CURLcode imap_connect(struct connectdata *conn,
|
static CURLcode imap_connect(struct connectdata *conn, bool *done)
|
||||||
bool *done) /* see description above */
|
|
||||||
{
|
{
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
struct imap_conn *imapc = &conn->proto.imapc;
|
struct imap_conn *imapc = &conn->proto.imapc;
|
||||||
|
15
lib/pop3.c
15
lib/pop3.c
@ -98,8 +98,7 @@ static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
|
|||||||
static CURLcode pop3_connect(struct connectdata *conn, bool *done);
|
static CURLcode pop3_connect(struct connectdata *conn, bool *done);
|
||||||
static CURLcode pop3_disconnect(struct connectdata *conn, bool dead);
|
static CURLcode pop3_disconnect(struct connectdata *conn, bool dead);
|
||||||
static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done);
|
static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done);
|
||||||
static int pop3_getsock(struct connectdata *conn,
|
static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks,
|
||||||
curl_socket_t *socks,
|
|
||||||
int numsocks);
|
int numsocks);
|
||||||
static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done);
|
static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done);
|
||||||
static CURLcode pop3_setup_connection(struct connectdata *conn);
|
static CURLcode pop3_setup_connection(struct connectdata *conn);
|
||||||
@ -593,8 +592,7 @@ static CURLcode pop3_state_upgrade_tls(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For CAPA responses */
|
/* For CAPA responses */
|
||||||
static CURLcode pop3_state_capa_resp(struct connectdata *conn,
|
static CURLcode pop3_state_capa_resp(struct connectdata *conn, int pop3code,
|
||||||
int pop3code,
|
|
||||||
pop3state instate)
|
pop3state instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -956,8 +954,7 @@ static CURLcode pop3_state_auth_final_resp(struct connectdata *conn,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CURLcode pop3_state_apop_resp(struct connectdata *conn,
|
static CURLcode pop3_state_apop_resp(struct connectdata *conn, int pop3code,
|
||||||
int pop3code,
|
|
||||||
pop3state instate)
|
pop3state instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -977,8 +974,7 @@ static CURLcode pop3_state_apop_resp(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For USER responses */
|
/* For USER responses */
|
||||||
static CURLcode pop3_state_user_resp(struct connectdata *conn,
|
static CURLcode pop3_state_user_resp(struct connectdata *conn, int pop3code,
|
||||||
int pop3code,
|
|
||||||
pop3state instate)
|
pop3state instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -1004,8 +1000,7 @@ static CURLcode pop3_state_user_resp(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For PASS responses */
|
/* For PASS responses */
|
||||||
static CURLcode pop3_state_pass_resp(struct connectdata *conn,
|
static CURLcode pop3_state_pass_resp(struct connectdata *conn, int pop3code,
|
||||||
int pop3code,
|
|
||||||
pop3state instate)
|
pop3state instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
|
24
lib/smtp.c
24
lib/smtp.c
@ -94,8 +94,7 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
|
|||||||
static CURLcode smtp_connect(struct connectdata *conn, bool *done);
|
static CURLcode smtp_connect(struct connectdata *conn, bool *done);
|
||||||
static CURLcode smtp_disconnect(struct connectdata *conn, bool dead);
|
static CURLcode smtp_disconnect(struct connectdata *conn, bool dead);
|
||||||
static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done);
|
static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done);
|
||||||
static int smtp_getsock(struct connectdata *conn,
|
static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks,
|
||||||
curl_socket_t *socks,
|
|
||||||
int numsocks);
|
int numsocks);
|
||||||
static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done);
|
static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done);
|
||||||
static CURLcode smtp_setup_connection(struct connectdata *conn);
|
static CURLcode smtp_setup_connection(struct connectdata *conn);
|
||||||
@ -438,8 +437,7 @@ static CURLcode smtp_authenticate(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For the SMTP "protocol connect" and "doing" phases only */
|
/* For the SMTP "protocol connect" and "doing" phases only */
|
||||||
static int smtp_getsock(struct connectdata *conn,
|
static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks,
|
||||||
curl_socket_t *socks,
|
|
||||||
int numsocks)
|
int numsocks)
|
||||||
{
|
{
|
||||||
return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks);
|
return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks);
|
||||||
@ -516,8 +514,7 @@ static CURLcode smtp_state_upgrade_tls(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For EHLO responses */
|
/* For EHLO responses */
|
||||||
static CURLcode smtp_state_ehlo_resp(struct connectdata *conn,
|
static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
|
||||||
int smtpcode,
|
|
||||||
smtpstate instate)
|
smtpstate instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -547,8 +544,7 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For HELO responses */
|
/* For HELO responses */
|
||||||
static CURLcode smtp_state_helo_resp(struct connectdata *conn,
|
static CURLcode smtp_state_helo_resp(struct connectdata *conn, int smtpcode,
|
||||||
int smtpcode,
|
|
||||||
smtpstate instate)
|
smtpstate instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -882,8 +878,7 @@ static CURLcode smtp_state_auth_ntlm_type2msg_resp(struct connectdata *conn,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* For the final responses to the AUTH sequence */
|
/* For the final responses to the AUTH sequence */
|
||||||
static CURLcode smtp_state_auth_resp(struct connectdata *conn,
|
static CURLcode smtp_state_auth_resp(struct connectdata *conn, int smtpcode,
|
||||||
int smtpcode,
|
|
||||||
smtpstate instate)
|
smtpstate instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -997,8 +992,7 @@ static CURLcode smtp_rcpt_to(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For MAIL responses */
|
/* For MAIL responses */
|
||||||
static CURLcode smtp_state_mail_resp(struct connectdata *conn,
|
static CURLcode smtp_state_mail_resp(struct connectdata *conn, int smtpcode,
|
||||||
int smtpcode,
|
|
||||||
smtpstate instate)
|
smtpstate instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -1022,8 +1016,7 @@ static CURLcode smtp_state_mail_resp(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For RCPT responses */
|
/* For RCPT responses */
|
||||||
static CURLcode smtp_state_rcpt_resp(struct connectdata *conn,
|
static CURLcode smtp_state_rcpt_resp(struct connectdata *conn, int smtpcode,
|
||||||
int smtpcode,
|
|
||||||
smtpstate instate)
|
smtpstate instate)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
@ -1061,8 +1054,7 @@ static CURLcode smtp_state_rcpt_resp(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For DATA response */
|
/* For DATA response */
|
||||||
static CURLcode smtp_state_data_resp(struct connectdata *conn,
|
static CURLcode smtp_state_data_resp(struct connectdata *conn, int smtpcode,
|
||||||
int smtpcode,
|
|
||||||
smtpstate instate)
|
smtpstate instate)
|
||||||
{
|
{
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user