From: Daniel Stenberg Date: Mon, 19 Jun 2006 21:39:57 +0000 (+0000) Subject: make -K on a bad file now displays a warning X-Git-Tag: upstream/7.37.1~10308 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72f80b88f76c0af0fbaab21691a313da95d5be6d;p=platform%2Fupstream%2Fcurl.git make -K on a bad file now displays a warning --- diff --git a/CHANGES b/CHANGES index 8c02ebb..8330c5b 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,15 @@ Changelog +Daniel (19 June 2006) +- Made -K on a file that couldn't be read cause a warning to be displayed. + +Daniel (13 June 2006) +- Dan Fandrich implemented --enable-hidden-symbols configure option to enable + -fvisibility=hidden on gcc >= 4.0. This reduces the size of the libcurl + binary and speeds up dynamic linking by hiding all the internal symbols from + the symbol table. + Version 7.15.4 (12 June 2006) Daniel (8 June 2006) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e8cb06d..fa207b2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -7,19 +7,19 @@ Curl and libcurl 7.15.5 Number of public functions in libcurl: 49 Amount of public web site mirrors: 33 Number of known libcurl bindings: 32 - Number of contributors: 492 + Number of contributors: 506 This release includes the following changes: - o + o configure --enable-hidden-symbols This release includes the following bugfixes: - o + o Made -K on a file that couldn't be read cause a warning to be displayed. Other curl-related news: - o + o pycurl-7.15.4 was released: http://pycurl.sf.net New curl mirrors: @@ -28,6 +28,6 @@ New curl mirrors: This release would not have looked like this without help, code, reports and advice from friends like these: - + Dan Fandrich Thanks! (and sorry if I forgot to mention someone) diff --git a/src/main.c b/src/main.c index cf40b0e..5e9340a 100644 --- a/src/main.c +++ b/src/main.c @@ -633,8 +633,8 @@ struct LongShort { /* global variable to hold info about libcurl */ static curl_version_info_data *curlinfo; -static void parseconfig(const char *filename, - struct Configurable *config); +static int parseconfig(const char *filename, + struct Configurable *config); static char *my_get_line(FILE *fp); static int create_dir_hierarchy(char *outfile); @@ -2069,7 +2069,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ config->insecure_ok ^= TRUE; break; case 'K': /* parse config file */ - parseconfig(nextarg, config); + if(parseconfig(nextarg, config)) + warnf(config, "error trying read config from the '%s' file\n", + nextarg); break; case 'l': config->conf ^= CONF_FTPLISTONLY; /* only list the names of the FTP dir */ @@ -2402,9 +2404,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ return PARAM_OK; } - -static void parseconfig(const char *filename, - struct Configurable *config) +/* return 0 on everything-is-fine, and non-zero otherwise */ +static int parseconfig(const char *filename, + struct Configurable *config) { int res; FILE *file; @@ -2613,6 +2615,9 @@ static void parseconfig(const char *filename, if(file != stdin) fclose(file); } + else + return 1; /* couldn't open the file */ + return 0; } static void go_sleep(long ms) @@ -3392,7 +3397,7 @@ operate(struct Configurable *config, int argc, char *argv[]) ; } else { - parseconfig(NULL, config); + parseconfig(NULL, config); /* ignore possible failure */ } if ((argc < 2) && !config->url_list) {