* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
/* Check if the file exists - if not, try CURLRC in the same
* directory as our executable
*/
- file = fopen(filebuffer, FOPEN_READTEXT);
+ file = fopen(filebuffer, "r");
if(file != NULL) {
fclose(file);
filename = filebuffer;
#endif
}
- if(strcmp(filename, "-"))
- file = fopen(filename, FOPEN_READTEXT);
+ if(strcmp(filename,"-"))
+ file = fopen(filename, "r");
else
file = stdin;
param = line; /* parameter starts here */
while(*line && !ISSPACE(*line))
line++;
+ *line = '\0'; /* zero terminate */
- if(*line) {
- *line = '\0'; /* zero terminate */
-
- /* to detect mistakes better, see if there's data following */
+ /* to detect mistakes better, see if there's data following */
+ line++;
+ /* pass all spaces */
+ while(*line && ISSPACE(*line))
line++;
- /* pass all spaces */
- while(*line && ISSPACE(*line))
- line++;
-
- switch(*line) {
- case '\0':
- case '\r':
- case '\n':
- case '#': /* comment */
- break;
- default:
- warnf(operation->global, "%s:%d: warning: '%s' uses unquoted "
- "white space in the line that may cause side-effects!\n",
- filename, lineno, option);
- }
+
+ switch(*line) {
+ case '\0':
+ case '\r':
+ case '\n':
+ case '#': /* comment */
+ break;
+ default:
+ warnf(operation, "%s:%d: warning: '%s' uses unquoted white space in"
+ " the line that may cause side-effects!\n",
+ filename, lineno, option);
}
}
res != PARAM_VERSION_INFO_REQUESTED &&
res != PARAM_ENGINES_REQUESTED) {
const char *reason = param2text(res);
- warnf(operation->global, "%s:%d: warning: '%s' %s\n",
+ warnf(operation, "%s:%d: warning: '%s' %s\n",
filename, lineno, option, reason);
}
}