source: avoid use of 'very' in comments
This commit is contained in:
parent
d1323839be
commit
9cc246401e
@ -249,12 +249,12 @@ typedef int (*curl_xferinfo_callback)(void *clientp,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CURL_MAX_WRITE_SIZE
|
#ifndef CURL_MAX_WRITE_SIZE
|
||||||
/* Tests have proven that 20K is a very bad buffer size for uploads on
|
/* Tests have proven that 20K is a bad buffer size for uploads on Windows,
|
||||||
Windows, while 16K for some odd reason performed a lot better.
|
while 16K for some odd reason performed a lot better. We do the ifndef
|
||||||
We do the ifndef check to allow this value to easier be changed at build
|
check to allow this value to easier be changed at build time for those
|
||||||
time for those who feel adventurous. The practical minimum is about
|
who feel adventurous. The practical minimum is about 400 bytes since
|
||||||
400 bytes since libcurl uses a buffer of this size as a scratch area
|
libcurl uses a buffer of this size as a scratch area (unrelated to
|
||||||
(unrelated to network send operations). */
|
network send operations). */
|
||||||
#define CURL_MAX_WRITE_SIZE 16384
|
#define CURL_MAX_WRITE_SIZE 16384
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -244,13 +244,13 @@ CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
|
|||||||
* The data the returned pointer points to will not survive calling
|
* The data the returned pointer points to will not survive calling
|
||||||
* curl_multi_cleanup().
|
* curl_multi_cleanup().
|
||||||
*
|
*
|
||||||
* The 'CURLMsg' struct is meant to be very simple and only contain
|
* The 'CURLMsg' struct is meant to be simple and only contain basic
|
||||||
* very basic information. If more involved information is wanted,
|
* information. If more involved information is wanted, we will
|
||||||
* we will provide the particular "transfer handle" in that struct
|
* provide the particular "transfer handle" in that struct and that
|
||||||
* and that should/could/would be used in subsequent
|
* should/could/would be used in subsequent curl_easy_getinfo() calls
|
||||||
* curl_easy_getinfo() calls (or similar). The point being that we
|
* (or similar). The point being that we must never expose complex
|
||||||
* must never expose complex structs to applications, as then we will
|
* structs to applications, as then we will undoubtably get backwards
|
||||||
* undoubtably get backwards compatibility problems in the future.
|
* compatibility problems in the future.
|
||||||
*
|
*
|
||||||
* Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
|
* Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
|
||||||
* of structs. It also writes the number of messages left in the
|
* of structs. It also writes the number of messages left in the
|
||||||
|
|||||||
@ -1310,7 +1310,7 @@ static CURLcode cf_tcp_connect(struct Curl_cfilter *cf,
|
|||||||
if(blocking)
|
if(blocking)
|
||||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||||
|
|
||||||
*done = FALSE; /* a very negative world view is best */
|
*done = FALSE; /* a negative world view is best */
|
||||||
if(ctx->sock == CURL_SOCKET_BAD) {
|
if(ctx->sock == CURL_SOCKET_BAD) {
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
|||||||
@ -619,7 +619,7 @@ static CURLcode is_connected(struct Curl_cfilter *cf,
|
|||||||
* If transport is QUIC, we need to shutdown the ongoing 'other'
|
* If transport is QUIC, we need to shutdown the ongoing 'other'
|
||||||
* cot ballers in a QUIC appropriate way. */
|
* cot ballers in a QUIC appropriate way. */
|
||||||
evaluate:
|
evaluate:
|
||||||
*connected = FALSE; /* a very negative world view is best */
|
*connected = FALSE; /* a negative world view is best */
|
||||||
now = Curl_now();
|
now = Curl_now();
|
||||||
ongoing = not_started = 0;
|
ongoing = not_started = 0;
|
||||||
for(i = 0; i < ARRAYSIZE(ctx->baller); i++) {
|
for(i = 0; i < ARRAYSIZE(ctx->baller); i++) {
|
||||||
|
|||||||
16
lib/ftp.c
16
lib/ftp.c
@ -302,10 +302,10 @@ static void close_secondarysocket(struct Curl_easy *data)
|
|||||||
* requests on files respond with headers passed to the client/stdout that
|
* requests on files respond with headers passed to the client/stdout that
|
||||||
* looked like HTTP ones.
|
* looked like HTTP ones.
|
||||||
*
|
*
|
||||||
* This approach is not very elegant, it causes confusion and is error-prone.
|
* This approach is not elegant, it causes confusion and is error-prone. It is
|
||||||
* It is subject for removal at the next (or at least a future) soname bump.
|
* subject for removal at the next (or at least a future) soname bump. Until
|
||||||
* Until then you can test the effects of the removal by undefining the
|
* then you can test the effects of the removal by undefining the following
|
||||||
* following define named CURL_FTP_HTTPSTYLE_HEAD.
|
* define named CURL_FTP_HTTPSTYLE_HEAD.
|
||||||
*/
|
*/
|
||||||
#define CURL_FTP_HTTPSTYLE_HEAD 1
|
#define CURL_FTP_HTTPSTYLE_HEAD 1
|
||||||
|
|
||||||
@ -2454,10 +2454,10 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data,
|
|||||||
!data->set.ignorecl &&
|
!data->set.ignorecl &&
|
||||||
(ftp->downloadsize < 1)) {
|
(ftp->downloadsize < 1)) {
|
||||||
/*
|
/*
|
||||||
* It seems directory listings either do not show the size or very
|
* It seems directory listings either do not show the size or often uses
|
||||||
* often uses size 0 anyway. ASCII transfers may very well turn out
|
* size 0 anyway. ASCII transfers may cause that the transferred amount
|
||||||
* that the transferred amount of data is not the same as this line
|
* of data is not the same as this line tells, why using this number in
|
||||||
* tells, why using this number in those cases only confuses us.
|
* those cases only confuses us.
|
||||||
*
|
*
|
||||||
* Example D above makes this parsing a little tricky */
|
* Example D above makes this parsing a little tricky */
|
||||||
char *bytes;
|
char *bytes;
|
||||||
|
|||||||
@ -49,9 +49,9 @@ struct memdebug {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note that these debug functions are very simple and they are meant to
|
* Note that these debug functions are simple and they are meant to remain so.
|
||||||
* remain so. For advanced analysis, record a log file and write perl scripts
|
* For advanced analysis, record a log file and write perl scripts to analyze
|
||||||
* to analyze them!
|
* them!
|
||||||
*
|
*
|
||||||
* Do not use these with multithreaded test programs!
|
* Do not use these with multithreaded test programs!
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -113,9 +113,9 @@ struct Curl_tree *Curl_splayinsert(struct curltime i,
|
|||||||
t = Curl_splay(i, t);
|
t = Curl_splay(i, t);
|
||||||
DEBUGASSERT(t);
|
DEBUGASSERT(t);
|
||||||
if(compare(i, t->key) == 0) {
|
if(compare(i, t->key) == 0) {
|
||||||
/* There already exists a node in the tree with the very same key. Build
|
/* There already exists a node in the tree with the same key. Build a
|
||||||
a doubly-linked circular list of nodes. We add the new 'node' struct
|
doubly-linked circular list of nodes. We add the new 'node' struct to
|
||||||
to the end of this list. */
|
the end of this list. */
|
||||||
|
|
||||||
node->key = KEY_NOTUSED; /* we set the key in the sub node to NOTUSED
|
node->key = KEY_NOTUSED; /* we set the key in the sub node to NOTUSED
|
||||||
to quickly identify this node as a subnode */
|
to quickly identify this node as a subnode */
|
||||||
@ -199,7 +199,7 @@ struct Curl_tree *Curl_splaygetbest(struct curltime i,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Deletes the very node we point out from the tree if it is there. Stores a
|
/* Deletes the node we point out from the tree if it is there. Stores a
|
||||||
* pointer to the new resulting tree in 'newroot'.
|
* pointer to the new resulting tree in 'newroot'.
|
||||||
*
|
*
|
||||||
* Returns zero on success and non-zero on errors!
|
* Returns zero on success and non-zero on errors!
|
||||||
|
|||||||
@ -348,9 +348,9 @@ curl_easy_strerror(CURLcode error)
|
|||||||
* By using gcc -Wall -Werror, you cannot forget.
|
* By using gcc -Wall -Werror, you cannot forget.
|
||||||
*
|
*
|
||||||
* A table would not have the same benefit. Most compilers will generate
|
* A table would not have the same benefit. Most compilers will generate
|
||||||
* code very similar to a table in any case, so there is little performance
|
* code similar to a table in any case, so there is little performance gain
|
||||||
* gain from a table. Something is broken for the user's application,
|
* from a table. Something is broken for the user's application, anyways, so
|
||||||
* anyways, so does it matter how fast it _does not_ work?
|
* does it matter how fast it _does not_ work?
|
||||||
*
|
*
|
||||||
* The line number for the error will be near this comment, which is why it
|
* The line number for the error will be near this comment, which is why it
|
||||||
* is here, and not at the start of the switch.
|
* is here, and not at the start of the switch.
|
||||||
|
|||||||
@ -998,7 +998,7 @@ static CURLcode tftp_connect(struct Curl_easy *data, bool *done)
|
|||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we do not keep TFTP connections up basically because there is none or very
|
/* we do not keep TFTP connections up basically because there is none or
|
||||||
* little gain for UDP */
|
* little gain for UDP */
|
||||||
connclose(conn, "TFTP");
|
connclose(conn, "TFTP");
|
||||||
|
|
||||||
|
|||||||
@ -777,8 +777,8 @@ static void xfer_setup(
|
|||||||
int sockindex, /* socket index to read from or -1 */
|
int sockindex, /* socket index to read from or -1 */
|
||||||
curl_off_t size, /* -1 if unknown at this point */
|
curl_off_t size, /* -1 if unknown at this point */
|
||||||
bool getheader, /* TRUE if header parsing is wanted */
|
bool getheader, /* TRUE if header parsing is wanted */
|
||||||
int writesockindex, /* socket index to write to, it may very well be
|
int writesockindex, /* socket index to write to, it may be the same we
|
||||||
the same we read from. -1 disables */
|
read from. -1 disables */
|
||||||
bool shutdown, /* shutdown connection at transfer end. Only
|
bool shutdown, /* shutdown connection at transfer end. Only
|
||||||
* supported when sending OR receiving. */
|
* supported when sending OR receiving. */
|
||||||
bool shutdown_err_ignore /* errors during shutdown do not fail the
|
bool shutdown_err_ignore /* errors during shutdown do not fail the
|
||||||
@ -801,7 +801,7 @@ static void xfer_setup(
|
|||||||
conn->sock[sockindex];
|
conn->sock[sockindex];
|
||||||
conn->writesockfd = conn->sockfd;
|
conn->writesockfd = conn->sockfd;
|
||||||
if(want_send)
|
if(want_send)
|
||||||
/* special and very HTTP-specific */
|
/* special and HTTP-specific */
|
||||||
writesockindex = FIRSTSOCKET;
|
writesockindex = FIRSTSOCKET;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
24
lib/url.c
24
lib/url.c
@ -506,10 +506,10 @@ CURLcode Curl_open(struct Curl_easy **curl)
|
|||||||
CURLcode result;
|
CURLcode result;
|
||||||
struct Curl_easy *data;
|
struct Curl_easy *data;
|
||||||
|
|
||||||
/* Very simple start-up: alloc the struct, init it with zeroes and return */
|
/* simple start-up: alloc the struct, init it with zeroes and return */
|
||||||
data = calloc(1, sizeof(struct Curl_easy));
|
data = calloc(1, sizeof(struct Curl_easy));
|
||||||
if(!data) {
|
if(!data) {
|
||||||
/* this is a very serious error */
|
/* this is a serious error */
|
||||||
DEBUGF(fprintf(stderr, "Error: calloc of Curl_easy failed\n"));
|
DEBUGF(fprintf(stderr, "Error: calloc of Curl_easy failed\n"));
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
@ -880,16 +880,16 @@ static bool url_match_conn(struct connectdata *conn, void *userdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(needle->localdev || needle->localport) {
|
if(needle->localdev || needle->localport) {
|
||||||
/* If we are bound to a specific local end (IP+port), we must not
|
/* If we are bound to a specific local end (IP+port), we must not reuse a
|
||||||
reuse a random other one, although if we did not ask for a
|
random other one, although if we did not ask for a particular one we
|
||||||
particular one we can reuse one that was bound.
|
can reuse one that was bound.
|
||||||
|
|
||||||
This comparison is a bit rough and too strict. Since the input
|
This comparison is a bit rough and too strict. Since the input
|
||||||
parameters can be specified in numerous ways and still end up the
|
parameters can be specified in numerous ways and still end up the same
|
||||||
same it would take a lot of processing to make it really accurate.
|
it would take a lot of processing to make it really accurate. Instead,
|
||||||
Instead, this matching will assume that reuses of bound connections
|
this matching will assume that reuses of bound connections will most
|
||||||
will most likely also reuse the exact same binding parameters and
|
likely also reuse the exact same binding parameters and missing out a
|
||||||
missing out a few edge cases should not hurt anyone very much.
|
few edge cases should not hurt anyone much.
|
||||||
*/
|
*/
|
||||||
if((conn->localport != needle->localport) ||
|
if((conn->localport != needle->localport) ||
|
||||||
(conn->localportrange != needle->localportrange) ||
|
(conn->localportrange != needle->localportrange) ||
|
||||||
@ -2006,8 +2006,8 @@ static CURLcode setup_connection_internals(struct Curl_easy *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(conn->primary.remote_port < 0)
|
if(conn->primary.remote_port < 0)
|
||||||
/* we check for -1 here since if proxy was detected already, this
|
/* we check for -1 here since if proxy was detected already, this was
|
||||||
was very likely already set to the proxy port */
|
likely already set to the proxy port */
|
||||||
conn->primary.remote_port = p->defport;
|
conn->primary.remote_port = p->defport;
|
||||||
|
|
||||||
/* Now create the destination name */
|
/* Now create the destination name */
|
||||||
|
|||||||
@ -871,9 +871,8 @@ struct connectdata {
|
|||||||
/**** curl_get() phase fields */
|
/**** curl_get() phase fields */
|
||||||
|
|
||||||
curl_socket_t sockfd; /* socket to read from or CURL_SOCKET_BAD */
|
curl_socket_t sockfd; /* socket to read from or CURL_SOCKET_BAD */
|
||||||
curl_socket_t writesockfd; /* socket to write to, it may very
|
curl_socket_t writesockfd; /* socket to write to, it may be the same we read
|
||||||
well be the same we read from.
|
from. CURL_SOCKET_BAD disables */
|
||||||
CURL_SOCKET_BAD disables */
|
|
||||||
|
|
||||||
#ifdef HAVE_GSSAPI
|
#ifdef HAVE_GSSAPI
|
||||||
BIT(sec_complete); /* if Kerberos is enabled for this connection */
|
BIT(sec_complete); /* if Kerberos is enabled for this connection */
|
||||||
@ -1896,14 +1895,12 @@ struct Curl_easy {
|
|||||||
/* First a simple identifier to easier detect if a user mix up this easy
|
/* First a simple identifier to easier detect if a user mix up this easy
|
||||||
handle with a multi handle. Set this to CURLEASY_MAGIC_NUMBER */
|
handle with a multi handle. Set this to CURLEASY_MAGIC_NUMBER */
|
||||||
unsigned int magic;
|
unsigned int magic;
|
||||||
/* once an easy handle is tied to a connection pool
|
/* once an easy handle is tied to a connection pool a non-negative number to
|
||||||
a non-negative number to distinguish this transfer from
|
distinguish this transfer from other using the same pool. For easier
|
||||||
other using the same pool. For easier tracking
|
tracking in log output. This may wrap around after LONG_MAX to 0 again,
|
||||||
in log output.
|
so it has no uniqueness guarantee for large processings. Note: it has no
|
||||||
This may wrap around after LONG_MAX to 0 again, so it
|
uniqueness either IFF more than one connection pool is used by the
|
||||||
has no uniqueness guarantee for very large processings.
|
libcurl application. */
|
||||||
Note: it has no uniqueness either IFF more than one connection pool
|
|
||||||
is used by the libcurl application. */
|
|
||||||
curl_off_t id;
|
curl_off_t id;
|
||||||
/* once an easy handle is added to a multi, either explicitly by the
|
/* once an easy handle is added to a multi, either explicitly by the
|
||||||
* libcurl application or implicitly during `curl_easy_perform()`,
|
* libcurl application or implicitly during `curl_easy_perform()`,
|
||||||
|
|||||||
@ -64,7 +64,7 @@ typedef CURLcode Curl_vquic_tls_ctx_setup(struct Curl_cfilter *cf,
|
|||||||
* @param alpn the ALPN string in protocol format ((len+bytes+)+),
|
* @param alpn the ALPN string in protocol format ((len+bytes+)+),
|
||||||
* may be NULL
|
* may be NULL
|
||||||
* @param alpn_len the overall number of bytes in `alpn`
|
* @param alpn_len the overall number of bytes in `alpn`
|
||||||
* @param cb_setup optional callback for very early TLS config
|
* @param cb_setup optional callback for early TLS config
|
||||||
± @param cb_user_data user_data param for callback
|
± @param cb_user_data user_data param for callback
|
||||||
* @param ssl_user_data optional pointer to set in TLS application context
|
* @param ssl_user_data optional pointer to set in TLS application context
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1138,9 +1138,9 @@ CURLcode Curl_gtls_ctx_init(struct gtls_ctx *gctx,
|
|||||||
Curl_ssl_sessionid_unlock(data);
|
Curl_ssl_sessionid_unlock(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convert the ALPN string from our arguments to a list of strings
|
/* convert the ALPN string from our arguments to a list of strings that
|
||||||
* that gnutls wants and will convert internally back to this very
|
* gnutls wants and will convert internally back to this string for sending
|
||||||
* string for sending to the server. nice. */
|
* to the server. nice. */
|
||||||
if(!gtls_alpns_count && alpn && alpn_len) {
|
if(!gtls_alpns_count && alpn && alpn_len) {
|
||||||
size_t i, alen = alpn_len;
|
size_t i, alen = alpn_len;
|
||||||
unsigned char *s = (unsigned char *)alpn;
|
unsigned char *s = (unsigned char *)alpn;
|
||||||
|
|||||||
@ -234,7 +234,7 @@ bool Curl_ssl_getsessionid(struct Curl_cfilter *cf,
|
|||||||
char **palpn);
|
char **palpn);
|
||||||
|
|
||||||
/* Set a TLS session ID for `peer`. Replaces an existing session ID if
|
/* Set a TLS session ID for `peer`. Replaces an existing session ID if
|
||||||
* not already the very same.
|
* not already the same.
|
||||||
* Sessionid mutex must be locked (see Curl_ssl_sessionid_lock).
|
* Sessionid mutex must be locked (see Curl_ssl_sessionid_lock).
|
||||||
* Call takes ownership of `ssl_sessionid`, using `sessionid_free_cb`
|
* Call takes ownership of `ssl_sessionid`, using `sessionid_free_cb`
|
||||||
* to deallocate it. Is called in all outcomes, either right away or
|
* to deallocate it. Is called in all outcomes, either right away or
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* get_terminal_columns() returns the number of columns in the current
|
* get_terminal_columns() returns the number of columns in the current
|
||||||
* terminal. It will return 79 on failure. Also, the number can be very big.
|
* terminal. It will return 79 on failure. Also, the number can be big.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned int get_terminal_columns(void)
|
unsigned int get_terminal_columns(void)
|
||||||
@ -87,5 +87,5 @@ unsigned int get_terminal_columns(void)
|
|||||||
}
|
}
|
||||||
if(!width)
|
if(!width)
|
||||||
width = 79;
|
width = 79;
|
||||||
return width; /* 79 for unknown, might also be very small or very big */
|
return width; /* 79 for unknown, might also be tiny or enormous */
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user