aboutsummaryrefslogtreecommitdiff
path: root/src/tool_cb_wrt.c
AgeCommit message (Collapse)Author
2018-11-13tool_cb_wrt: Silence function cast compiler warningDaniel Gustafsson
Commit 5bfaa86ceb3c2a9ac474a928e748c4a86a703b33 introduced a new compiler warning on Windows cross compilation with GCC. See below for an example of the warning from the autobuild logs (whitespace edited to fit): /src/tool_cb_wrt.c:175:9: warning: cast from function call of type 'intptr_t {aka long long int}' to non-matching type 'void *' [-Wbad-function-cast] (HANDLE) _get_osfhandle(fileno(outs->stream)), ^ Store the return value from _get_osfhandle() in an intermediate variable and cast the variable in WriteConsoleW() rather than the function call directly to avoid a compiler warning. In passing, also add inspection of the MultiByteToWideChar() return value and return failure in case an error is reported. Closes #3263 Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com> Reviewed-by: Viktor Szakats <commit@vszakats.net>
2018-11-05curl: fixed UTF-8 in current console code page (Windows)Yasuhiro Matsumoto
Fixes #3211 Fixes #3175 Closes #3212
2018-05-21curl: show headers in boldDaniel Stenberg
The feature is only enabled if the output is believed to be a tty. -J: There's some minor differences and improvements in -J handling, as now J should work with -i and it actually creates a file first using the initial name and then *renames* that to the one found in Content-Disposition (if any). -i: only shows headers for HTTP transfers now (as documented). Previously it would also show for pieces of the transfer that were HTTP (for example when doing FTP over a HTTP proxy). -i: now shows trailers as well. Previously they were not shown at all. --libcurl: the CURLOPT_HEADER is no longer set, as the header output is now done in the header callback.
2017-07-09tool_cb_wrt: fix variable shadowing warningMarcel Raad
GCC 4.4 complains: tool_cb_wrt.c:81: error: declaration of ‘isatty’ shadows a global declaration /usr/include/unistd.h:782: error: shadowed declaration is here Fix this by renaming the variable. Closes https://github.com/curl/curl/pull/1661
2017-06-17tool_wrte_cb: remove check for config == NULLDaniel Stenberg
... as it really cannot have reached this far with config being NULL, thus this is unnecesary and misleading. Bug: https://news.ycombinator.com/item?id=14577585 and https://daniel.haxx.se/blog/2017/06/17/curl-doesnt-spew-binary-anymore/comment-page-1/#comment-18356 Forwarded-to-us-by: Jakub Wilk
2017-06-16curl: prevent binary output spewed to terminalDaniel Stenberg
... unless "--output -" is used. Binary detection is done by simply checking for a binary zero in early data. Added test 1425 1426 to verify. Closes #1512
2017-03-30gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead ↵Alexis La Goutte
[-Wint-in-bool-context] Closes #1371
2017-03-29curl: fix callback argument inconsistencyHanno Böck
As you can see the callback definition uses a char* for the first argument, while the function uses a void*. URL: https://curl.haxx.se/mail/lib-2017-03/0116.html
2016-02-03URLs: change all http:// URLs to https://Daniel Stenberg
2015-04-08src/tool_cb_wrt: separate fnc for output file creationKamil Dudka
2015-02-28tool: wrap lines longer than 79 columnsKamil Dudka
... to avoid a build failure when configured with --enable-debug
2015-02-27tool: Updated the warnf() function to use the GlobalConfig structureSteve Holme
As the 'error' and 'mute' options are now part of the GlobalConfig, rather than per Operation, updated the warnf() function to use this structure rather than the OperationConfig.
2014-02-23tool_cfgable: Renamed Configurable structure to OperationConfigSteve Holme
To allow for the addition of a global config structure and prevent confusion between the two.
2013-01-06Revert changes relative to lib/*.[ch] recent renamingYang Tse
This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bbfde follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
2012-12-28build: make use of 76 lib/*.h renamed filesYang Tse
76 private header files renamed to use our standard naming scheme. This change affects 322 files in libcurl's source tree.
2012-06-07Fixes allowing HTTP test cases 1338, 1339, 1368 and 1369 to succeedYang Tse
2012-04-08curl tool: make curl.h first header included in tool_setup.hYang Tse
2012-04-06curl tool: use configuration files from lib directoryYang Tse
Configuration files such as curl_config.h and all config-*.h no longer exist nor are generated/copied into 'src' directory, now these only exist in 'lib' directory from where curl tool sources uses them. Additionally old src/setup.h has been refactored into src/tool_setup.h which now pulls lib/setup.h The possibility of a makefile needing an include path adjustment exists.
2011-11-03tool_cb_wrt.c: disambiguate warning messageYang Tse
2011-10-24large headers: have curl accept >16K headersDaniel Stenberg
As commit 5850cc4808ab clarifies, libcurl can deliver header lines that are longer than CURL_MAX_WRITE_SIZE, only body data is limited to that size. The curl tool has check (when built debug-enabled) that made the wrong checks and this new test 1205 verifies that larger headers work.
2011-09-30curl tool: fix some more OOM handlingYang Tse
2011-09-26curl tool: fix some OOM handlingYang Tse
2011-09-26remove short-lived CURL_WRITEFUNC_OUT_OF_MEMORYYang Tse
2011-09-25allow write callbacks to indicate OOM to libcurlYang Tse
Allow (*curl_write_callback) write callbacks to return CURL_WRITEFUNC_OUT_OF_MEMORY to properly indicate libcurl of OOM conditions inside the callback itself.
2011-09-24curl tool: reviewed code moved to tool_*.[ch] filesYang Tse