Commit b56087dbaaa0208c1763a01e0a91e97354c1897e
1 parent
a0c5e4bd
Exists in
master
and in
5 other branches
Debuggando transferência de arquivos.
Showing
3 changed files
with
5 additions
and
20 deletions
Show diff stats
src/lib3270/ft.c
@@ -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 |
src/lib3270/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; |
src/pw3270/v3270/mouse.c
@@ -71,11 +71,11 @@ static void single_click(v3270 *widget, int baddr) | @@ -71,11 +71,11 @@ static void single_click(v3270 *widget, int baddr) | ||
71 | { | 71 | { |
72 | case 0x00: | 72 | case 0x00: |
73 | // Unselected area, move cursor and remove selection | 73 | // Unselected area, move cursor and remove selection |
74 | - v3270_disable_updates(widget); | 74 | + v3270_disable_updates(GTK_WIDGET(widget)); |
75 | lib3270_set_cursor_address(widget->host,baddr); | 75 | lib3270_set_cursor_address(widget->host,baddr); |
76 | lib3270_unselect(widget->host); | 76 | lib3270_unselect(widget->host); |
77 | widget->selecting = 1; | 77 | widget->selecting = 1; |
78 | - v3270_enable_updates(widget); | 78 | + v3270_enable_updates(GTK_WIDGET(widget)); |
79 | break; | 79 | break; |
80 | 80 | ||
81 | 81 |