aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2013-07-29 16:32:29 +0200
committerYang Tse <yangsita@gmail.com>2013-07-29 18:32:38 +0200
commit8693bbd8c4ff42d2ca9baeaf1108c4a11f3cf31c (patch)
tree2655992813a77f889d34657027c34f9d9bd0aea0
parent251dd03b8887ca1d76e3ba45c5f85477bba4bbb4 (diff)
tool_operate.c: fix brace placement for vi/emacs delimiter matching
-rw-r--r--src/tool_operate.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 7be5c397c..ed60e7031 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -176,8 +176,7 @@ static curl_off_t VmsSpecialSize(const char * name,
return stat_buf->st_size;
}
}
-
-#endif
+#endif /* __VMS */
int operate(struct Configurable *config, int argc, argv_item_t argv[])
@@ -724,14 +723,14 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
}
if(config->resume_from) {
- /* open file for output: */
-#ifndef __VMS
- FILE *file = fopen(outfile, config->resume_from?"ab":"wb");
-#else
- /* Force VMS output format into stream mode which
- is needed for the stat() call above to always work */
+#ifdef __VMS
+ /* open file for output, forcing VMS output format into stream
+ mode which is needed for stat() call above to always work. */
FILE *file = fopen(outfile, config->resume_from?"ab":"wb",
"ctx=stm", "rfm=stmlf", "rat=cr", "mrs=0");
+#else
+ /* open file for output: */
+ FILE *file = fopen(outfile, config->resume_from?"ab":"wb");
#endif
if(!file) {
helpf(config->errors, "Can't open '%s'!\n", outfile);
@@ -774,11 +773,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
* header for VARIABLE header files only the bare record data needs
* to be considered with one appended if implied CC
*/
-
-#ifndef __VMS
- infd = open(uploadfile, O_RDONLY | O_BINARY);
- if((infd == -1) || fstat(infd, &fileinfo)) {
-#else
+#ifdef __VMS
/* Calculate the real upload site for VMS */
infd = -1;
if(stat(uploadfile, &fileinfo) == 0) {
@@ -794,8 +789,12 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
"rfm=stmlf", "ctx=stm");
}
}
- if(infd == -1) {
+ if(infd == -1)
+#else
+ infd = open(uploadfile, O_RDONLY | O_BINARY);
+ if((infd == -1) || fstat(infd, &fileinfo))
#endif
+ {
helpf(config->errors, "Can't open '%s'!\n", uploadfile);
if(infd != -1) {
close(infd);