mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 17:18:48 -05:00
docs: ESCape "\n" codes
Groff / Troff will display a: printaf("Errno: %ld\n", error); as: printf("Errno: %ld0, error); when a "\n" is not escaped. Use "\\n" instead. Closes #3246
This commit is contained in:
parent
f859b05c66
commit
073332b525
@ -44,7 +44,7 @@ if(curl) {
|
|||||||
long error;
|
long error;
|
||||||
res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error);
|
res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error);
|
||||||
if(res && error) {
|
if(res && error) {
|
||||||
printf("Errno: %ld\n", error);
|
printf("Errno: %ld\\n", error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
|
@ -46,20 +46,20 @@ static long file_is_coming(struct curl_fileinfo *finfo,
|
|||||||
|
|
||||||
switch(finfo->filetype) {
|
switch(finfo->filetype) {
|
||||||
case CURLFILETYPE_DIRECTORY:
|
case CURLFILETYPE_DIRECTORY:
|
||||||
printf(" DIR\n");
|
printf(" DIR\\n");
|
||||||
break;
|
break;
|
||||||
case CURLFILETYPE_FILE:
|
case CURLFILETYPE_FILE:
|
||||||
printf("FILE ");
|
printf("FILE ");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("OTHER\n");
|
printf("OTHER\\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(finfo->filetype == CURLFILETYPE_FILE) {
|
if(finfo->filetype == CURLFILETYPE_FILE) {
|
||||||
/* do not transfer files >= 50B */
|
/* do not transfer files >= 50B */
|
||||||
if(finfo->size > 50) {
|
if(finfo->size > 50) {
|
||||||
printf("SKIPPED\n");
|
printf("SKIPPED\\n");
|
||||||
return CURL_CHUNK_BGN_FUNC_SKIP;
|
return CURL_CHUNK_BGN_FUNC_SKIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ All except file:
|
|||||||
.nf
|
.nf
|
||||||
static int closesocket(void *clientp, curl_socket_t item)
|
static int closesocket(void *clientp, curl_socket_t item)
|
||||||
{
|
{
|
||||||
printf("libcurl wants to close %d now\n", (int)item);
|
printf("libcurl wants to close %d now\\n", (int)item);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ All
|
|||||||
.nf
|
.nf
|
||||||
static int closesocket(void *clientp, curl_socket_t item)
|
static int closesocket(void *clientp, curl_socket_t item)
|
||||||
{
|
{
|
||||||
printf("libcurl wants to close %d now\n", (int)item);
|
printf("libcurl wants to close %d now\\n", (int)item);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user