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:
Daniel Stenberg 2024-07-01 16:47:21 +02:00
parent 9b683577e1
commit c074ba64a8
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
213 changed files with 1719 additions and 1715 deletions

View file

@ -50,7 +50,7 @@ static char *parse_filename(const char *ptr, size_t len);
#else
#define BOLD "\x1b[1m"
/* Switch off bold by setting "all attributes off" since the explicit
bold-off code (21) isn't supported everywhere - like in the mac
bold-off code (21) is not supported everywhere - like in the mac
Terminal. */
#define BOLDOFF "\x1b[0m"
/* OSC 8 hyperlink escape sequence */
@ -273,7 +273,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
}
/*
* Copies a file name part and returns an ALLOCATED data buffer.
* Copies a filename part and returns an ALLOCATED data buffer.
*/
static char *parse_filename(const char *ptr, size_t len)
{
@ -314,7 +314,7 @@ static char *parse_filename(const char *ptr, size_t len)
}
/* If the filename contains a backslash, only use filename portion. The idea
is that even systems that don't handle backslashes as path separators
is that even systems that do not handle backslashes as path separators
probably want the path removed for convenience. */
q = strrchr(p, '\\');
if(q) {
@ -325,7 +325,7 @@ static char *parse_filename(const char *ptr, size_t len)
}
}
/* make sure the file name doesn't end in \r or \n */
/* make sure the filename does not end in \r or \n */
q = strchr(p, '\r');
if(q)
*q = '\0';
@ -349,7 +349,7 @@ static char *parse_filename(const char *ptr, size_t len)
#endif /* _WIN32 || MSDOS */
/* in case we built debug enabled, we allow an environment variable
* named CURL_TESTDIR to prefix the given file name to put it into a
* named CURL_TESTDIR to prefix the given filename to put it into a
* specific directory
*/
#ifdef DEBUGBUILD
@ -359,7 +359,7 @@ static char *parse_filename(const char *ptr, size_t len)
char buffer[512]; /* suitably large */
msnprintf(buffer, sizeof(buffer), "%s/%s", tdir, copy);
Curl_safefree(copy);
copy = strdup(buffer); /* clone the buffer, we don't use the libcurl
copy = strdup(buffer); /* clone the buffer, we do not use the libcurl
aprintf() or similar since we want to use the
same memory code as the "real" parse_filename
function */
@ -376,9 +376,9 @@ static char *parse_filename(const char *ptr, size_t len)
* Treat the Location: header specially, by writing a special escape
* sequence that adds a hyperlink to the displayed text. This makes
* the absolute URL of the redirect clickable in supported terminals,
* which couldn't happen otherwise for relative URLs. The Location:
* which could not happen otherwise for relative URLs. The Location:
* header is supposed to always be absolute so this theoretically
* shouldn't be needed but the real world returns plenty of relative
* should not be needed but the real world returns plenty of relative
* URLs here.
*/
static
@ -450,7 +450,7 @@ void write_linked_location(CURL *curl, const char *location, size_t loclen,
goto locdone;
}
/* Not a "safe" URL: don't linkify it */
/* Not a "safe" URL: do not linkify it */
locout:
/* Write the normal output in case of error or unsafe */