Unverified Commit 073332b5 authored by Gisle Vanem's avatar Gisle Vanem Committed by Daniel Stenberg
Browse files

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
parent f859b05c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ if(curl) {
    long error;
    res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error);
    if(res && error) {
      printf("Errno: %ld\n", error);
      printf("Errno: %ld\\n", error);
    }
  }
  curl_easy_cleanup(curl);
+3 −3
Original line number Diff line number Diff line
@@ -46,20 +46,20 @@ static long file_is_coming(struct curl_fileinfo *finfo,

  switch(finfo->filetype) {
  case CURLFILETYPE_DIRECTORY:
    printf(" DIR\n");
    printf(" DIR\\n");
    break;
  case CURLFILETYPE_FILE:
    printf("FILE ");
    break;
  default:
    printf("OTHER\n");
    printf("OTHER\\n");
    break;
  }

  if(finfo->filetype == CURLFILETYPE_FILE) {
    /* do not transfer files >= 50B */
    if(finfo->size > 50) {
      printf("SKIPPED\n");
      printf("SKIPPED\\n");
      return CURL_CHUNK_BGN_FUNC_SKIP;
    }

+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ All except file:
.nf
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;
}

+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ All
.nf
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;
}