summaryrefslogtreecommitdiff
path: root/src/tool_main.c
Commit message (Collapse)AuthorAgeFilesLines
* curl.se: new homeDaniel Stenberg2020-11-041-1/+1
| | | | Closes #6172
* symbian: drop supportDaniel Stenberg2020-09-221-5/+0
| | | | | | | | | The OS is deprecated. I see no traces of anyone having actually built curl for Symbian after 2012. The public headers are unmodified. Closes #5989
* tool: support UTF-16 command line on WindowsMarcel Raad2020-05-141-1/+7
| | | | | | | | | | | | | | | | | | - use `wmain` instead of `main` when `_UNICODE` is defined [0] - define `argv_item_t` as `wchar_t *` in this case - use the curl_multibyte gear to convert the command-line arguments to UTF-8 This makes it possible to pass parameters with characters outside of the current locale on Windows, which is required for some tests, e.g. the IDN tests. Out of the box, this currently only works with the Visual Studio project files, which default to Unicode, and winbuild with the `ENABLE_UNICODE` option. [0] https://devblogs.microsoft.com/oldnewthing/?p=40643 Ref: https://github.com/curl/curl/issues/3747 Closes https://github.com/curl/curl/pull/3784
* nit: Copyright year out of dateDaniel Stenberg2020-02-191-1/+1
| | | | Follow-up to 1fc0617dcc
* tool_util: Improve Windows version of tvnow()Jay Satiro2020-02-181-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | - Change tool_util.c tvnow() for Windows to match more closely to timeval.c Curl_now(). - Create a win32 init function for the tool, since some initialization is required for the tvnow() changes. Prior to this change the monotonic time function used by curl in Windows was determined at build-time and not runtime. That was a problem because when curl was built targeted for compatibility with old versions of Windows (eg _WIN32_WINNT < 0x0600) it would use GetTickCount which wraps every 49.7 days that Windows has been running. This change makes curl behave similar to libcurl's tvnow function, which determines at runtime whether the OS is Vista+ and if so calls QueryPerformanceCounter instead. (Note QueryPerformanceCounter is used because it has higher resolution than the more obvious candidate GetTickCount64). The changes to tvnow are basically a copy and paste but the types in some cases are different. Ref: https://github.com/curl/curl/issues/3309 Closes https://github.com/curl/curl/pull/4847
* curl: use errorf() betterDaniel Stenberg2019-12-101-3/+3
| | | | | | | | | | Change series of error outputs to use errorf(). Only errors that are due to mistakes in command line option usage should use helpf(), other types of errors in the tool should rather use errorf(). Closes #4691
* cleanup: s/curl_debug/curl_dbg_debug in comments and docsDaniel Stenberg2019-08-081-3/+3
| | | | | | | | | | Leftovers from the function rename back in 76b63489495 Reported-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/f3e0f071b14fcb46a453f69bdf4e062bcaacf362#com mitcomment-34601751 Closes #4203
* curl: support parallel transfersDaniel Stenberg2019-07-201-16/+4
| | | | | | | | This is done by making sure each individual transfer is first added to a linked list as then they can be performed serially, or at will, in parallel. Closes #3804
* build: fix Codacy/CppCheck warningsMarcel Raad2019-04-111-2/+2
| | | | | | | | | | - remove unused variables - declare conditionally used variables conditionally - suppress unused variable warnings in the CMake tests - remove dead variable stores - consistently use WIN32 macro to detect Windows Closes https://github.com/curl/curl/pull/3739
* memdebug: make debug-specific functions use curl_dbg_ prefixDaniel Stenberg2019-03-081-3/+3
| | | | | | | To not "collide" or use up the regular curl_ name space. Also makes them easier to detect in helper scripts. Closes #3656
* tool_main: rename function to make it unique and betterDaniel Stenberg2018-11-301-2/+2
| | | | | ... there's already another function in the curl tool named free_config_fields!
* tool: add undocumented option --dump-module-paths for win32Jay Satiro2018-11-061-0/+16
| | | | | | | | | | | | | | | | - Add an undocumented diagnostic option for Windows to show the full paths of all loaded modules regardless of whether or not libcurl initialization succeeds. This is needed so that in the CI we can get a list of all DLL dependencies after initialization (when they're most likely to have finished loading) and then package them as artifacts so that a functioning build can be downloaded. Also I imagine it may have some use as a diagnostic for help requests. Ref: https://github.com/curl/curl/pull/3103 Closes https://github.com/curl/curl/pull/3208
* curl: fixed UTF-8 in current console code page (Windows)Yasuhiro Matsumoto2018-11-051-6/+1
| | | | | | Fixes #3211 Fixes #3175 Closes #3212
* tool_main: make TerminalSettings staticDaniel Stenberg2018-10-261-5/+5
| | | | | | Reported-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/becfe1233ff2b6b0c3e1b6a10048b55b68c2539f#commitcomment-31008819 Closes #3161
* curl: enabled Windows VT Support and UTF-8 outputRich Turner2018-09-291-0/+56
| | | | | | | Enabled Console VT support (if running OS supports VT) in tool_main.c. Fixes #3008 Closes #3011
* curl: added --styled-outputDaniel Stenberg2018-05-211-1/+2
| | | | | | | It is enabled by default, so --no-styled-output will switch off the detection/use of bold headers. Closes #2538
* tool_main: turn off MinGW CRT's globbingMarcel Raad2017-08-221-0/+9
| | | | | | | | | By default, the MinGW CRT globs command-line arguments. This prevents getting a single asterisk into an argument as test 1299 does. Turn off globbing by setting the global variable _CRT_glob to 0 for MinGW. Fixes https://github.com/curl/curl/issues/1751 Closes https://github.com/curl/curl/pull/1813
* curl: prevent binary output spewed to terminalDaniel Stenberg2017-06-161-1/+1
| | | | | | | | | ... 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
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* VMS: Updates for 0740-0D1220John E. Malmberg2014-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | lib/setup-vms.h : VAX HP OpenSSL port is ancient, needs help. More defines to set symbols to uppercase. src/tool_main.c : Fix parameter to vms_special_exit() call. packages/vms/ : backup_gnv_curl_src.com : Fix the error message to have the correct package. build_curl-config_script.com : Rewrite to be more accurate. build_libcurl_pc.com : Use tool_version.h now. build_vms.com : Fix to handle lib/vtls directory. curl_gnv_build_steps.txt : Updated build procedure documentation. generate_config_vms_h_curl.com : * VAX does not support 64 bit ints, so no NTLM support for now. * VAX HP SSL port is ancient, needs some help. * Disable NGHTTP2 for now, not ported to VMS. * Disable UNIX_SOCKETS, not available on VMS yet. * HP GSSAPI port does not have gss_nt_service_name. gnv_link_curl.com : Update for new curl structure. pcsi_product_gnv_curl.com : Set up to optionally do a complete build.
* tool: oops, forgot to include <plarenas.h>Kamil Dudka2014-07-031-0/+1
| | | | ... that contains the declaration of PL_ArenaFinish()
* tool: call PL_ArenaFinish() on exit if NSPR is usedKamil Dudka2014-07-031-1/+4
| | | | | | | This prevents valgrind from reporting still reachable memory allocated by NSPR arenas (mainly the freelist). Reported-by: Hubert Kario
* tool: call PR_Cleanup() on exit if NSPR is usedKamil Dudka2014-07-021-0/+9
| | | | | | This prevents valgrind from reporting possibly lost memory that NSPR uses for file descriptor cache and other globally allocated internal data structures.
* tool: Moved --libcurl to the global configSteve Holme2014-03-011-0/+2
|
* tool: Moved --stderr to the global configSteve Holme2014-03-011-0/+5
|
* tool_main: Fixed a memory leak on main_init errorDan Fandrich2014-02-281-2/+7
|
* tool: Moved --trace and --verbose to the global configSteve Holme2014-02-271-0/+10
|
* tool_main: Forgot to initialise the first operation's global pointerSteve Holme2014-02-271-0/+1
|
* tool: Moved --showerror to the global configSteve Holme2014-02-251-1/+4
| | | | | Other global options such as --libcurl, --trace and --verbose to follow.
* tool_operate: Moved easy handle cleanup into tool_mainSteve Holme2014-02-241-1/+5
|
* tool_main: Moved easy handle into global config structureSteve Holme2014-02-241-4/+13
|
* tool_main: Corrected typo from commit d6b9f054e9 in Symbian codeSteve Holme2014-02-231-1/+1
|
* tool_main: Moved OperateConfig cleanup into main_free()Steve Holme2014-02-231-9/+9
|
* tool_main: Moved initial OperateConfig creation into main_init()Steve Holme2014-02-231-36/+36
|
* tool_cfgable: Added global config structureSteve Holme2014-02-231-1/+4
|
* tool_cfgable: Renamed Configurable structure to OperationConfigSteve Holme2014-02-231-3/+3
| | | | | To allow for the addition of a global config structure and prevent confusion between the two.
* tool_operate: Start to use CURLcode rather than int for return codesSteve Holme2014-02-221-6/+6
| | | | | | To help assist with the detection of incorrect return codes, as per commits ee23d13a79, 33b8960dc8 and aba98991a5, updated the operate based functions to return CURLcode error codes.
* tool_getparam: Added support for parsing of specific URL optionsSteve Holme2014-02-081-1/+1
|
* tool_cfgable: For consistency renamed init_config() to config_init()Steve Holme2014-02-071-1/+1
|
* tool_cfgable: Introduced config_free() functionSteve Holme2014-02-071-2/+2
|
* tool_operate: Moved libcurl information gathering to tool_mainSteve Holme2014-02-031-7/+19
|
* tool_operate: Moved main initialisation and cleanup code into tool_mainSteve Holme2014-02-031-2/+39
|
* tool_main: Fixed compilation warning from commit 0104678c79Steve Holme2014-02-031-1/+1
| | | | no previous prototype for function 'memory_tracking_init'
* tool_main: Changed stack based config struct to be heap basedSteve Holme2014-02-031-9/+21
|
* tool_operate: Moved memory tracking initialisation into tool_mainSteve Holme2014-02-021-0/+36
|
* tool_main: Moved config struct initialisation into a separate functionSteve Holme2014-02-011-4/+3
| | | | | In preparation for adding URL specific options moved the initialisation of the Configurable structure into a separate function in tool_cfgable.
* src/Makefile.am: build static lib for unit tests if enabledKamil Dudka2013-05-061-0/+4
|
* tool_main.c: remove redundant vms_show storage-class specifierYang Tse2013-03-131-1/+1
| | | | | | | | | | | vms_show 'extern' storage-class specifier removed from tool_main.c due to... - Advice from Tor Arntsen: http://curl.haxx.se/mail/lib-2013-03/0164.html - HP OpenVMS docs stating that 'Extern is the default storage class for variables declared outside a function.' http://h71000.www7.hp.com/commercial/c/docs/dec_c_help_5.html (Storage_Classes section)
* tool_main.c: fix VMS global variable storage-class specifierTom Grace2013-03-131-1/+1
| | | | | | | | | An extern submits a psect and a global reference to the linker to point to it. Using "extern int vms_show = 0" also creates a globaldef. The use of the extern by itself does declare a psect but does not declare a globalsymbol. It does declare a globalref. But the linker needs one and only one globaldef or there is an error.
* vms_show: post VMS patch cleanup - IIYang Tse2013-02-061-0/+10
| | | | - remove multiple declarations of vms_show and add comments