1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 14:05:03 -05:00

tool_operate.c: fix brace placement for vi/emacs delimiter matching

This commit is contained in:
Yang Tse 2013-07-29 16:32:29 +02:00
parent 251dd03b88
commit 8693bbd8c4

View File

@ -176,8 +176,7 @@ static curl_off_t VmsSpecialSize(const char * name,
return stat_buf->st_size; return stat_buf->st_size;
} }
} }
#endif /* __VMS */
#endif
int operate(struct Configurable *config, int argc, argv_item_t argv[]) 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) { if(config->resume_from) {
/* open file for output: */ #ifdef __VMS
#ifndef __VMS /* open file for output, forcing VMS output format into stream
FILE *file = fopen(outfile, config->resume_from?"ab":"wb"); mode which is needed for stat() call above to always work. */
#else
/* Force VMS output format into stream mode which
is needed for the stat() call above to always work */
FILE *file = fopen(outfile, config->resume_from?"ab":"wb", FILE *file = fopen(outfile, config->resume_from?"ab":"wb",
"ctx=stm", "rfm=stmlf", "rat=cr", "mrs=0"); "ctx=stm", "rfm=stmlf", "rat=cr", "mrs=0");
#else
/* open file for output: */
FILE *file = fopen(outfile, config->resume_from?"ab":"wb");
#endif #endif
if(!file) { if(!file) {
helpf(config->errors, "Can't open '%s'!\n", outfile); 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 * header for VARIABLE header files only the bare record data needs
* to be considered with one appended if implied CC * to be considered with one appended if implied CC
*/ */
#ifdef __VMS
#ifndef __VMS
infd = open(uploadfile, O_RDONLY | O_BINARY);
if((infd == -1) || fstat(infd, &fileinfo)) {
#else
/* Calculate the real upload site for VMS */ /* Calculate the real upload site for VMS */
infd = -1; infd = -1;
if(stat(uploadfile, &fileinfo) == 0) { if(stat(uploadfile, &fileinfo) == 0) {
@ -794,8 +789,12 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
"rfm=stmlf", "ctx=stm"); "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 #endif
{
helpf(config->errors, "Can't open '%s'!\n", uploadfile); helpf(config->errors, "Can't open '%s'!\n", uploadfile);
if(infd != -1) { if(infd != -1) {
close(infd); close(infd);