Commit b802d64fa1d83ca695519cdf9d119bfb235493a9
1 parent
629ab559
Exists in
master
and in
5 other branches
Ajustes no módulo de transferência de arquivos
Showing
2 changed files
with
26 additions
and
2 deletions
Show diff stats
src/lib3270/ft.c
@@ -226,7 +226,21 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | @@ -226,7 +226,21 @@ 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 | - ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "ab" : "wb") : "rb"); | 229 | + |
230 | + char openmode[5] = ""; | ||
231 | + int opensize = 0; | ||
232 | + | ||
233 | + openmode[opensize++] = flags & LIB3270_FT_OPTION_RECEIVE ? "r" : "w"; | ||
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 | + ft_local_file = fopen(local,openmode); | ||
243 | + | ||
230 | #else | 244 | #else |
231 | ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "a" : "w") : "r"); | 245 | ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "a" : "w") : "r"); |
232 | #endif // _WIN32 | 246 | #endif // _WIN32 |
@@ -289,7 +303,7 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | @@ -289,7 +303,7 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | ||
289 | 303 | ||
290 | LIB3270_EXPORT int lib3270_ft_start(H3270 *hSession) | 304 | LIB3270_EXPORT int lib3270_ft_start(H3270 *hSession) |
291 | { | 305 | { |
292 | - static const char * rec = "fvu"; | 306 | + static const char * rec = "FVU"; |
293 | static const char * un[] = { "tracks", "cylinders", "avblock" }; | 307 | static const char * un[] = { "tracks", "cylinders", "avblock" }; |
294 | 308 | ||
295 | char op[4096]; | 309 | char op[4096]; |
src/pw3270/ft/ftdialog.c
@@ -457,8 +457,13 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) | @@ -457,8 +457,13 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) | ||
457 | { | 457 | { |
458 | LIB3270_FT_OPTION_CRLF, | 458 | LIB3270_FT_OPTION_CRLF, |
459 | BUTTON_CRLF, | 459 | BUTTON_CRLF, |
460 | +#ifdef _WIN32 | ||
460 | N_( "Terminate records with _CR/LF." ), | 461 | N_( "Terminate records with _CR/LF." ), |
461 | N_( "Following the convention for ASCII text files, <CR> <LF> pairs are used to terminate records in the PC file.") | 462 | N_( "Following the convention for ASCII text files, <CR> <LF> pairs are used to terminate records in the PC file.") |
463 | +#else | ||
464 | + N_( "Terminate records with _LF." ), | ||
465 | + N_( "Following the convention for ASCII text files, <LF> is used to terminate records in the PC file.") | ||
466 | +#endif // _WIN32 | ||
462 | }, | 467 | }, |
463 | { | 468 | { |
464 | LIB3270_FT_OPTION_APPEND, | 469 | LIB3270_FT_OPTION_APPEND, |
@@ -547,8 +552,13 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) | @@ -547,8 +552,13 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) | ||
547 | { | 552 | { |
548 | LIB3270_FT_OPTION_CRLF, | 553 | LIB3270_FT_OPTION_CRLF, |
549 | BUTTON_CRLF, | 554 | BUTTON_CRLF, |
555 | +#ifdef _WIN32 | ||
550 | N_( "Terminate records with _CR/LF." ), | 556 | N_( "Terminate records with _CR/LF." ), |
551 | N_( "Following the convention for ASCII text files, <CR> <LF> pairs are used to terminate records in the PC file.") | 557 | N_( "Following the convention for ASCII text files, <CR> <LF> pairs are used to terminate records in the PC file.") |
558 | +#else | ||
559 | + N_( "Terminate records with _LF." ), | ||
560 | + N_( "Following the convention for ASCII text files, <LF> is used to terminate records in the PC file.") | ||
561 | +#endif // _WIN32 | ||
552 | }, | 562 | }, |
553 | { | 563 | { |
554 | LIB3270_FT_OPTION_APPEND, | 564 | LIB3270_FT_OPTION_APPEND, |