diff --git a/src/lib3270/ft.c b/src/lib3270/ft.c index 7190246..868a028 100644 --- a/src/lib3270/ft.c +++ b/src/lib3270/ft.c @@ -226,7 +226,21 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); // Open local file #ifdef _WIN32 - ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "ab" : "wb") : "rb"); + + char openmode[5] = ""; + int opensize = 0; + + openmode[opensize++] = flags & LIB3270_FT_OPTION_RECEIVE ? "r" : "w"; + openmode[opensize++] = flags & LIB3270_FT_OPTION_CRLF ? "t" : "b"; + + // É para adicionar? + if(flags & LIB3270_FT_OPTION_APPEND) { + openmode[opensize++] = 'a'; + } + + openmode[opensize++] = 0; + ft_local_file = fopen(local,openmode); + #else ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "a" : "w") : "r"); #endif // _WIN32 @@ -289,7 +303,7 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); LIB3270_EXPORT int lib3270_ft_start(H3270 *hSession) { - static const char * rec = "fvu"; + static const char * rec = "FVU"; static const char * un[] = { "tracks", "cylinders", "avblock" }; char op[4096]; diff --git a/src/pw3270/ft/ftdialog.c b/src/pw3270/ft/ftdialog.c index ddfb7dd..66c8a03 100644 --- a/src/pw3270/ft/ftdialog.c +++ b/src/pw3270/ft/ftdialog.c @@ -457,8 +457,13 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) { LIB3270_FT_OPTION_CRLF, BUTTON_CRLF, +#ifdef _WIN32 N_( "Terminate records with _CR/LF." ), N_( "Following the convention for ASCII text files, pairs are used to terminate records in the PC file.") +#else + N_( "Terminate records with _LF." ), + N_( "Following the convention for ASCII text files, is used to terminate records in the PC file.") +#endif // _WIN32 }, { LIB3270_FT_OPTION_APPEND, @@ -547,8 +552,13 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) { LIB3270_FT_OPTION_CRLF, BUTTON_CRLF, +#ifdef _WIN32 N_( "Terminate records with _CR/LF." ), N_( "Following the convention for ASCII text files, pairs are used to terminate records in the PC file.") +#else + N_( "Terminate records with _LF." ), + N_( "Following the convention for ASCII text files, is used to terminate records in the PC file.") +#endif // _WIN32 }, { LIB3270_FT_OPTION_APPEND, -- libgit2 0.21.2