Commit e7f314c898316b7544800b9838271f5588af5b11
1 parent
4e490b41
Exists in
master
and in
3 other branches
Debuggando transferência de arquivos.
Showing
2 changed files
with
3 additions
and
18 deletions
Show diff stats
@@ -226,24 +226,7 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | @@ -226,24 +226,7 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | ||
226 | 226 | ||
227 | // Open local file | 227 | // Open local file |
228 | #ifdef _WIN32 | 228 | #ifdef _WIN32 |
229 | - | ||
230 | - char openmode[5] = ""; | ||
231 | - int opensize = 0; | ||
232 | - | ||
233 | - openmode[opensize++] = (flags & LIB3270_FT_OPTION_RECEIVE) ? 'w' : 'r'; | ||
234 | - openmode[opensize++] = (flags & LIB3270_FT_OPTION_CRLF) ? 't' : 'b'; | ||
235 | - | ||
236 | - // É para adicionar? | ||
237 | - if(flags & LIB3270_FT_OPTION_APPEND) { | ||
238 | - openmode[opensize++] = 'a'; | ||
239 | - } | ||
240 | - | ||
241 | - openmode[opensize++] = 0; | ||
242 | - | ||
243 | - debug("Opening \"%s\" with \"%s\"",local,openmode); | ||
244 | - | ||
245 | - ft_local_file = fopen(local,openmode); | ||
246 | - | 229 | + ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "ab" : "wb") : "rb"); |
247 | #else | 230 | #else |
248 | ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "a" : "w") : "r"); | 231 | ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "a" : "w") : "r"); |
249 | #endif // _WIN32 | 232 | #endif // _WIN32 |
ft_cut.c
@@ -191,8 +191,10 @@ static int upload_convert(H3270 *hSession, unsigned char *buf, int len) | @@ -191,8 +191,10 @@ static int upload_convert(H3270 *hSession, unsigned char *buf, int len) | ||
191 | 191 | ||
192 | /* Map it. */ | 192 | /* Map it. */ |
193 | c = conv[ft->quadrant].xlate[ix]; | 193 | c = conv[ft->quadrant].xlate[ix]; |
194 | + | ||
194 | if (ft->ascii_flag && ft->cr_flag && (c == '\r' || c == 0x1a)) | 195 | if (ft->ascii_flag && ft->cr_flag && (c == '\r' || c == 0x1a)) |
195 | continue; | 196 | continue; |
197 | + | ||
196 | if (ft->ascii_flag && ft->remap_flag) | 198 | if (ft->ascii_flag && ft->remap_flag) |
197 | c = ft->charset.ebc2asc[c]; | 199 | c = ft->charset.ebc2asc[c]; |
198 | *ob++ = c; | 200 | *ob++ = c; |