summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_cb_dbg.c2
-rw-r--r--src/tool_easysrc.c2
-rw-r--r--src/tool_getparam.c4
-rw-r--r--src/tool_parsecfg.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
index 0fe0f1347..f52714683 100644
--- a/src/tool_cb_dbg.c
+++ b/src/tool_cb_dbg.c
@@ -79,7 +79,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
/* Ok, this is somewhat hackish but we do it undocumented for now */
config->trace_stream = config->errors; /* aka stderr */
else {
- config->trace_stream = fopen(config->trace_dump, "w");
+ config->trace_stream = fopen(config->trace_dump, FOPEN_WRITETEXT);
config->trace_fopened = TRUE;
}
}
diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c
index e1336c3d9..0482ef6ae 100644
--- a/src/tool_easysrc.c
+++ b/src/tool_easysrc.c
@@ -176,7 +176,7 @@ void dumpeasysrc(struct GlobalConfig *config)
FILE *out;
bool fopened = FALSE;
if(strcmp(o, "-")) {
- out = fopen(o, "w");
+ out = fopen(o, FOPEN_WRITETEXT);
fopened = TRUE;
}
else
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 62283a5dd..c86e6b4b1 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -681,7 +681,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
case 'v': /* --stderr */
if(strcmp(nextarg, "-")) {
- FILE *newfile = fopen(nextarg, "wt");
+ FILE *newfile = fopen(nextarg, FOPEN_WRITETEXT);
if(!newfile)
warnf(global, "Failed to open %s!\n", nextarg);
else {
@@ -1748,7 +1748,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
}
else {
fname = nextarg;
- file = fopen(nextarg, "r");
+ file = fopen(nextarg, FOPEN_READTEXT);
}
err = file2string(&config->writeout, file);
if(file && (file != stdin))
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index 4c25ddbd5..39b43eef4 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -69,7 +69,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
/* Check if the file exists - if not, try CURLRC in the same
* directory as our executable
*/
- file = fopen(filebuffer, "r");
+ file = fopen(filebuffer, FOPEN_READTEXT);
if(file != NULL) {
fclose(file);
filename = filebuffer;
@@ -115,7 +115,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
}
if(strcmp(filename, "-"))
- file = fopen(filename, "r");
+ file = fopen(filename, FOPEN_READTEXT);
else
file = stdin;