mirror of
https://github.com/curl/curl.git
synced 2026-08-06 12:26:14 +03:00
code: language cleanup in comments
Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname - file name => filename - user name = username - man page => manpage - run-time => runtime - set-up => setup - back-end => backend - a HTTP => an HTTP - Two spaces after a period => one space after period Closes #14073
This commit is contained in:
parent
9b683577e1
commit
c074ba64a8
213 changed files with 1719 additions and 1715 deletions
|
|
@ -661,7 +661,7 @@ restart:
|
|||
|
||||
/*
|
||||
* ssh_statemach_act() runs the SSH state machine as far as it can without
|
||||
* blocking and without reaching the end. The data the pointer 'block' points
|
||||
* blocking and without reaching the end. The data the pointer 'block' points
|
||||
* to will be set to TRUE if the libssh function returns SSH_AGAIN
|
||||
* meaning it wants to be called again when the socket is ready
|
||||
*/
|
||||
|
|
@ -675,7 +675,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
int rc = SSH_NO_ERROR, err;
|
||||
int seekerr = CURL_SEEKFUNC_OK;
|
||||
const char *err_msg;
|
||||
*block = 0; /* we're not blocking by default */
|
||||
*block = 0; /* we are not blocking by default */
|
||||
|
||||
do {
|
||||
|
||||
|
|
@ -1307,7 +1307,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
failf(data, "Could not seek stream");
|
||||
return CURLE_FTP_COULDNT_USE_REST;
|
||||
}
|
||||
/* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */
|
||||
/* seekerr == CURL_SEEKFUNC_CANTSEEK (cannot seek to offset) */
|
||||
do {
|
||||
char scratch[4*1024];
|
||||
size_t readthisamountnow =
|
||||
|
|
@ -1355,7 +1355,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
/* not set by Curl_xfer_setup to preserve keepon bits */
|
||||
conn->sockfd = conn->writesockfd;
|
||||
|
||||
/* store this original bitmask setup to use later on if we can't
|
||||
/* store this original bitmask setup to use later on if we cannot
|
||||
figure out a "real" bitmask */
|
||||
sshc->orig_waitfor = data->req.keepon;
|
||||
|
||||
|
|
@ -1364,7 +1364,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
with both accordingly */
|
||||
data->state.select_bits = CURL_CSELECT_OUT;
|
||||
|
||||
/* since we don't really wait for anything at this point, we want the
|
||||
/* since we do not really wait for anything at this point, we want the
|
||||
state machine to move on as soon as possible so we set a very short
|
||||
timeout here */
|
||||
Curl_expire(data, 0, EXPIRE_RUN_NOW);
|
||||
|
|
@ -1403,7 +1403,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
++sshc->slash_pos;
|
||||
if(rc < 0) {
|
||||
/*
|
||||
* Abort if failure wasn't that the dir already exists or the
|
||||
* Abort if failure was not that the dir already exists or the
|
||||
* permission was denied (creation might succeed further down the
|
||||
* path) - retry on unspecific FAILURE also
|
||||
*/
|
||||
|
|
@ -1610,9 +1610,9 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
!(attrs->flags & SSH_FILEXFER_ATTR_SIZE) ||
|
||||
(attrs->size == 0)) {
|
||||
/*
|
||||
* sftp_fstat didn't return an error, so maybe the server
|
||||
* just doesn't support stat()
|
||||
* OR the server doesn't return a file size with a stat()
|
||||
* sftp_fstat did not return an error, so maybe the server
|
||||
* just does not support stat()
|
||||
* OR the server does not return a file size with a stat()
|
||||
* OR file size is 0
|
||||
*/
|
||||
data->req.size = -1;
|
||||
|
|
@ -1685,7 +1685,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
/* We can resume if we can seek to the resume position */
|
||||
if(data->state.resume_from) {
|
||||
if(data->state.resume_from < 0) {
|
||||
/* We're supposed to download the last abs(from) bytes */
|
||||
/* We are supposed to download the last abs(from) bytes */
|
||||
if((curl_off_t)size < -data->state.resume_from) {
|
||||
failf(data, "Offset (%"
|
||||
CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
|
||||
|
|
@ -1855,7 +1855,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
/* not set by Curl_xfer_setup to preserve keepon bits */
|
||||
conn->sockfd = conn->writesockfd;
|
||||
|
||||
/* store this original bitmask setup to use later on if we can't
|
||||
/* store this original bitmask setup to use later on if we cannot
|
||||
figure out a "real" bitmask */
|
||||
sshc->orig_waitfor = data->req.keepon;
|
||||
|
||||
|
|
@ -1945,7 +1945,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
FALLTHROUGH();
|
||||
|
||||
case SSH_SESSION_DISCONNECT:
|
||||
/* during weird times when we've been prematurely aborted, the channel
|
||||
/* during weird times when we have been prematurely aborted, the channel
|
||||
is still alive when we reach this state and we MUST kill the channel
|
||||
properly first */
|
||||
if(sshc->scp_session) {
|
||||
|
|
@ -2062,7 +2062,7 @@ static void myssh_block2waitfor(struct connectdata *conn, bool block)
|
|||
{
|
||||
struct ssh_conn *sshc = &conn->proto.sshc;
|
||||
|
||||
/* If it didn't block, or nothing was returned by ssh_get_poll_flags
|
||||
/* If it did not block, or nothing was returned by ssh_get_poll_flags
|
||||
* have the original set */
|
||||
conn->waitfor = sshc->orig_waitfor;
|
||||
|
||||
|
|
@ -2357,7 +2357,7 @@ static CURLcode scp_disconnect(struct Curl_easy *data,
|
|||
(void) dead_connection;
|
||||
|
||||
if(ssh->ssh_session) {
|
||||
/* only if there's a session still around to use! */
|
||||
/* only if there is a session still around to use! */
|
||||
|
||||
state(data, SSH_SESSION_DISCONNECT);
|
||||
|
||||
|
|
@ -2522,7 +2522,7 @@ static CURLcode sftp_disconnect(struct Curl_easy *data,
|
|||
DEBUGF(infof(data, "SSH DISCONNECT starts now"));
|
||||
|
||||
if(conn->proto.sshc.ssh_session) {
|
||||
/* only if there's a session still around to use! */
|
||||
/* only if there is a session still around to use! */
|
||||
state(data, SSH_SFTP_SHUTDOWN);
|
||||
result = myssh_block_statemach(data, TRUE);
|
||||
}
|
||||
|
|
@ -2716,7 +2716,7 @@ static void sftp_quote(struct Curl_easy *data)
|
|||
}
|
||||
|
||||
/*
|
||||
* SFTP is a binary protocol, so we don't send text commands
|
||||
* SFTP is a binary protocol, so we do not send text commands
|
||||
* to the server. Instead, we scan for commands used by
|
||||
* OpenSSH's sftp program and call the appropriate libssh
|
||||
* functions.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue