| 119 | } |
| 120 | |
| 121 | void check_batch_flags(void) |
| 122 | { |
| 123 | int i; |
| 124 | |
| 125 | if (protocol_version < 29) |
| 126 | flag_ptr[7] = NULL; |
| 127 | else if (protocol_version < 30) |
| 128 | flag_ptr[9] = NULL; |
| 129 | tweaked_append = append_mode == 1; |
| 130 | tweaked_append_verify = append_mode == 2; |
| 131 | #ifdef ICONV_OPTION |
| 132 | tweaked_iconv = iconv_opt != NULL; |
| 133 | #endif |
| 134 | for (i = 0; flag_ptr[i]; i++) { |
| 135 | int set = batch_stream_flags & (1 << i) ? 1 : 0; |
| 136 | if (*flag_ptr[i] != set) { |
| 137 | if (i == 9) { |
| 138 | rprintf(FERROR, |
| 139 | "%s specify the --iconv option to use this batch file.\n", |
| 140 | set ? "Please" : "Do not"); |
| 141 | exit_cleanup(RERR_SYNTAX); |
| 142 | } |
| 143 | if (INFO_GTE(MISC, 1)) { |
| 144 | rprintf(FINFO, |
| 145 | "%sing the %s option to match the batchfile.\n", |
| 146 | set ? "Sett" : "Clear", flag_name[i]); |
| 147 | } |
| 148 | *flag_ptr[i] = set; |
| 149 | } |
| 150 | } |
| 151 | if (protocol_version < 29) { |
| 152 | if (recurse) |
| 153 | xfer_dirs |= 1; |
| 154 | else if (xfer_dirs < 2) |
| 155 | xfer_dirs = 0; |
| 156 | } |
| 157 | |
| 158 | if (tweaked_append) |
| 159 | append_mode = 1; |
| 160 | else if (tweaked_append_verify) |
| 161 | append_mode = 2; |
| 162 | } |
| 163 | |
| 164 | static int write_arg(const char *arg) |
| 165 | { |
no test coverage detected