Skip to content

Commit

Permalink
fixup disable bold output on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed May 14, 2018
1 parent 239f0cb commit a62c18d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/tool_cb_hdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@

static char *parse_filename(const char *ptr, size_t len);

#ifdef WIN32
#define BOLD
#define BOLDOFF
#else
#define BOLD "\x1b[1m"
#define BOLDOFF "\x1b[21m"
#endif

/*
** callback for CURLOPT_HEADERFUNCTION
*/
Expand Down Expand Up @@ -150,8 +158,6 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
if(hdrcbdata->config->show_headers &&
(protocol & (CURLPROTO_HTTP|CURLPROTO_HTTPS|CURLPROTO_RTSP))) {
/* bold headers only happen for HTTP(S) and RTSP */
#define BOLD "\x1b[1m"
#define BOLDOFF "\x1b[21m"
char *value = NULL;

if(!outs->stream && !tool_create_output_file(outs, FALSE))
Expand Down

0 comments on commit a62c18d

Please sign in to comment.