Commit fe506fe1a9eb67935cfee801741d396bbbbf145a
1 parent
76542fbe
Exists in
master
and in
5 other branches
Encaixando novo diálogo de transferência de arquivos.
Showing
8 changed files
with
238 additions
and
227 deletions
Show diff stats
src/pw3270/Makefile.in
... | ... | @@ -83,33 +83,44 @@ LIBS=@LIBS@ @GTK_LIBS@ @GTKMAC_LIBS@ @SOCKET_LIBS@ |
83 | 83 | |
84 | 84 | include ../include/rules.mak |
85 | 85 | |
86 | -%.png: pixmaps/%.svg | |
86 | +%.png: \ | |
87 | + pixmaps/%.svg | |
88 | + | |
87 | 89 | ifneq ($(CONVERT),no) |
88 | 90 | @echo " GEN `basename $@`" |
89 | 91 | @$(MKDIR) `dirname $@` |
90 | 92 | @$(CONVERT) $< --format=png > $@ |
91 | 93 | endif |
92 | 94 | |
93 | -%@OBJEXT@: %.rc | |
95 | +%@OBJEXT@: \ | |
96 | + %.rc | |
97 | + | |
94 | 98 | @echo " RC `basename $@`" |
95 | 99 | @mkdir -p `dirname $@` |
96 | 100 | @$(WINDRES) --include-dir=. -i $< -o $@ |
97 | 101 | |
98 | -$(OBJDBG)/%@OBJEXT@: %.rc | |
102 | +$(OBJDBG)/%@OBJEXT@: \ | |
103 | + %.rc | |
104 | + | |
99 | 105 | @echo " RC `basename $@`" |
100 | 106 | @mkdir -p `dirname $@` |
101 | 107 | @$(WINDRES) --include-dir=. -i $< -o $@ |
102 | 108 | |
103 | -$(OBJRLS)/%@OBJEXT@: %.rc | |
109 | +$(OBJRLS)/%@OBJEXT@: \ | |
110 | + %.rc | |
111 | + | |
104 | 112 | @echo " RC `basename $@`" |
105 | 113 | @mkdir -p `dirname $@` |
106 | 114 | @$(WINDRES) --include-dir=. -i $< -o $@ |
107 | 115 | |
108 | 116 | #---[ Release targets ]-------------------------------------------------------- |
109 | 117 | |
110 | -Release: $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) | |
118 | +Release: \ | |
119 | + $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) | |
120 | + | |
121 | +install: \ | |
122 | + Release $(PACKAGE_NAME).desktop $(PACKAGE_NAME)-logo.png | |
111 | 123 | |
112 | -install: Release $(PACKAGE_NAME).desktop $(PACKAGE_NAME)-logo.png | |
113 | 124 | $(MKDIR) $(DESTDIR)$(bindir) |
114 | 125 | $(INSTALL_PROGRAM) $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) $(DESTDIR)$(bindir) |
115 | 126 | |
... | ... | @@ -128,18 +139,24 @@ install: Release $(PACKAGE_NAME).desktop $(PACKAGE_NAME)-logo.png |
128 | 139 | --add-category TerminalEmulator \ |
129 | 140 | $(PACKAGE_NAME).desktop |
130 | 141 | |
131 | -$(BINRLS)/$(PACKAGE_TARNAME)$(EXEEXT): $(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@ \ | |
132 | - $(foreach SRC, $(basename $(APP_SOURCES)), $(OBJRLS)/$(SRC)$(OBJEXT)) | |
142 | +$(BINRLS)/$(PACKAGE_TARNAME)$(EXEEXT): \ | |
143 | + $(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@ \ | |
144 | + $(foreach SRC, $(basename $(APP_SOURCES)), $(OBJRLS)/$(SRC)$(OBJEXT)) | |
145 | + | |
133 | 146 | @echo " CCLD `basename $@`" |
134 | 147 | @$(MKDIR) `dirname $@` |
135 | 148 | @$(LD) @LDARCH@ @LDAPPFLAGS@ -o $@ $(foreach SRC, $(basename $(APP_SOURCES)), $(OBJRLS)/$(SRC)$(OBJEXT)) $(LIBS) $(LIB3270_LIBS) -l$(PACKAGE_TARNAME) |
136 | 149 | @$(STRIP) $@ |
137 | 150 | |
138 | -$(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@: $(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION) | |
151 | +$(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@: \ | |
152 | + $(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION) | |
153 | + | |
139 | 154 | @rm -f $@ |
140 | 155 | @cd $(LIBRLS) && $(LN_S) @DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION) @DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@ |
141 | 156 | |
142 | -$(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION): $(foreach SRC, $(basename $(LIB_SOURCES)), $(OBJRLS)/$(SRC)$(OBJEXT)) | |
157 | +$(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION): \ | |
158 | + $(foreach SRC, $(basename $(LIB_SOURCES)), $(OBJRLS)/$(SRC)$(OBJEXT)) | |
159 | + | |
143 | 160 | @echo " CCLD `basename $@`" |
144 | 161 | @$(MKDIR) `dirname $@` |
145 | 162 | @$(LD) $(DLL_FLAGS) $(LDFLAGS) @LDSOFLAGS@ @LDLIBFLAGS@ @RLS_LDFLAGS@ -o $@ $^ $(LIBS) $(LIB3270_LIBS) |
... | ... | @@ -149,20 +166,34 @@ $(LIBRLS)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION): $(foreach SR |
149 | 166 | |
150 | 167 | Debug: $(BINDBG)/$(PACKAGE_TARNAME)$(EXEEXT) |
151 | 168 | |
152 | -$(BINDBG)/$(PACKAGE_TARNAME)$(EXEEXT): $(LIBDBG)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@ \ | |
153 | - $(foreach SRC, $(basename $(APP_SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT)) | |
169 | +$(BINDBG)/$(PACKAGE_TARNAME)$(EXEEXT): \ | |
170 | + $(LIBDBG)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@ \ | |
171 | + $(foreach SRC, $(basename $(APP_SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT)) | |
172 | + | |
154 | 173 | @echo " CCLD `basename $@`" |
155 | 174 | @$(MKDIR) `dirname $@` |
156 | 175 | @$(LD) @LDARCH@ @DBGRPATH@ -o $@ $(foreach SRC, $(basename $(APP_SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT)) $(LIBS) $(LIB3270_LIBS) -l$(PACKAGE_TARNAME) |
157 | 176 | |
158 | -$(LIBDBG)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@: $(LIBDBG)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION) | |
177 | +.bin/Debug/v3270ft.a: \ | |
178 | + v3270ft/* | |
179 | + | |
180 | + $(MAKE) BINDIR=../.bin -C v3270ft Debug | |
181 | + | |
182 | + | |
183 | +$(LIBDBG)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@: \ | |
184 | + $(LIBDBG)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION) | |
185 | + | |
159 | 186 | @rm -f $@ |
160 | 187 | @cd $(LIBDBG) && $(LN_S) @DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION) @DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@ |
161 | 188 | |
162 | -$(LIBDBG)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION): $(foreach SRC, $(basename $(LIB_SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT)) | |
189 | +$(LIBDBG)/@DLLPREFIX@$(PACKAGE_TARNAME)@DLLEXT@.$(PACKAGE_VERSION): \ | |
190 | + $(foreach SRC, $(basename $(LIB_SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT)) \ | |
191 | + .bin/Debug/v3270ft.a | |
192 | + | |
163 | 193 | @echo " CCLD `basename $@`" |
164 | - @$(MKDIR) `dirname $@` | |
165 | - @$(LD) $(DLL_FLAGS) $(LDFLAGS) @LDSOFLAGS@ @DBGRPATH@ -o $@ $^ $(LIBS) $(LIB3270_LIBS) | |
194 | + @$(MKDIR) `dirname $@` AAA | |
195 | + $(LD) $(DLL_FLAGS) $(LDFLAGS) @LDSOFLAGS@ @DBGRPATH@ -o $@ $^ $(LIBS) $(LIB3270_LIBS) | |
196 | + | |
166 | 197 | |
167 | 198 | run: $(BINDIR)/Debug/$(PACKAGE_TARNAME)$(EXEEXT) |
168 | 199 | @cd "$(ROOTDIR)" ; .bin/Debug/$(PACKAGE_TARNAME)$(EXEEXT) |
... | ... | @@ -209,6 +240,7 @@ distclean: clean |
209 | 240 | @rm -f $(PACKAGE_NAME)-logo.png |
210 | 241 | |
211 | 242 | clean: clean-common |
243 | + @$(MAKE) -C v3270ft clean | |
212 | 244 | @rm -f v3270/marshal.c |
213 | 245 | @rm -f v3270/marshal.h |
214 | 246 | @rm -fr uiparser/.bin | ... | ... |
src/pw3270/actions.c
... | ... | @@ -220,16 +220,35 @@ static void copy_as_html_action(GtkAction *action, GtkWidget *widget) |
220 | 220 | |
221 | 221 | G_GNUC_INTERNAL void transfer_action(GtkAction *action, GtkWidget *widget) |
222 | 222 | { |
223 | + GtkWidget * dialog = v3270ft_new(); | |
223 | 224 | |
224 | -} | |
225 | + gtk_window_set_transient_for(GTK_WINDOW(dialog),GTK_WINDOW(gtk_widget_get_toplevel(widget))); | |
225 | 226 | |
226 | -G_GNUC_INTERNAL void download_action(GtkAction *action, GtkWidget *widget) | |
227 | -{ | |
227 | + do { | |
228 | 228 | |
229 | -} | |
229 | + gtk_widget_show_all(dialog); | |
230 | 230 | |
231 | -G_GNUC_INTERNAL void upload_action(GtkAction *action, GtkWidget *widget) | |
232 | -{ | |
231 | + switch(gtk_dialog_run(GTK_DIALOG(dialog))) { | |
232 | + case GTK_RESPONSE_APPLY: | |
233 | + case GTK_RESPONSE_OK: | |
234 | + case GTK_RESPONSE_YES: | |
235 | + gtk_widget_hide(dialog); | |
236 | + v3270ft_transfer(dialog,v3270_get_session(widget)); | |
237 | + break; | |
238 | + | |
239 | + case GTK_RESPONSE_CANCEL: | |
240 | + case GTK_RESPONSE_NO: | |
241 | + case GTK_RESPONSE_DELETE_EVENT: | |
242 | + v3270ft_remove_all(dialog); | |
243 | + break; | |
244 | + | |
245 | + default: | |
246 | + g_warning("Unexpected response from v3270ft"); | |
247 | + } | |
248 | + | |
249 | + } while(v3270ft_get_length(dialog) > 0); | |
250 | + | |
251 | + gtk_widget_destroy(dialog); | |
233 | 252 | |
234 | 253 | } |
235 | 254 | |
... | ... | @@ -273,8 +292,8 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const |
273 | 292 | { "about", about_dialog_action }, |
274 | 293 | { "kpsubtract", kp_subtract_action }, |
275 | 294 | { "kpadd", kp_add_action }, |
276 | - { "download", download_action }, | |
277 | - { "upload", upload_action }, | |
295 | + { "download", transfer_action }, | |
296 | + { "upload", transfer_action }, | |
278 | 297 | { "transfer", transfer_action }, |
279 | 298 | #ifdef DEBUG |
280 | 299 | { "copyashtml", copy_as_html_action }, | ... | ... |
src/pw3270/include/v3270ft.h
... | ... | @@ -75,6 +75,8 @@ |
75 | 75 | void v3270ft_append_file(GtkWidget *widget, const gchar *filename, gboolean text); |
76 | 76 | guint v3270ft_append_selection(GtkWidget *widget, GtkSelectionData *data); |
77 | 77 | |
78 | + gchar * v3270ft_select_file(v3270ft *dialog, const gchar *title, const gchar *button, GtkFileChooserAction action, const gchar *filename); | |
79 | + | |
78 | 80 | gint v3270ft_transfer(GtkWidget *dialog, H3270 *session); |
79 | 81 | |
80 | 82 | G_END_DECLS | ... | ... |
src/pw3270/v3270ft/Makefile.in
... | ... | @@ -28,8 +28,8 @@ MODULE_NAME=v3270ft |
28 | 28 | |
29 | 29 | #---[ Application sources ]-------------------------------------------------------------- |
30 | 30 | |
31 | -SOURCES=filelist.c load.c misc.c select.c tables.c transfer.c \ | |
32 | - v3270ftprogress.c get.c marshal.c save.c set.c testprogram.c v3270ft.c | |
31 | +SOURCES=filelist.c load.c misc.c select.c transfer.c v3270ftprogress.c get.c \ | |
32 | + marshal.c save.c set.c testprogram.c v3270ft.c | |
33 | 33 | |
34 | 34 | #---[ Configuration values ]------------------------------------------------------------- |
35 | 35 | |
... | ... | @@ -79,7 +79,7 @@ GTK_LIBS=@GTK_LIBS@ |
79 | 79 | GLIB_CFLAGS=@GLIB_CFLAGS@ |
80 | 80 | GLIB_LIBS=@GLIB_LIBS@ |
81 | 81 | |
82 | -CFLAGS=@CFLAGS@ \ | |
82 | +CFLAGS=@CFLAGS@ @DLL_CFLAGS@ \ | |
83 | 83 | -I../include \ |
84 | 84 | -DBUILD_DATE=`date +"0x%Y%m%d"` \ |
85 | 85 | $(GTK_CFLAGS) | ... | ... |
src/pw3270/v3270ft/ftdialog.cbp
src/pw3270/v3270ft/private.h
... | ... | @@ -183,7 +183,6 @@ |
183 | 183 | G_GNUC_INTERNAL void v3270ft_set_active(v3270ft *dialog, GList * active); |
184 | 184 | G_GNUC_INTERNAL GtkGrid * v3270ft_new_grid(void); |
185 | 185 | G_GNUC_INTERNAL void v3270ft_clear(v3270ft *dialog); |
186 | - G_GNUC_INTERNAL gchar * v3270ft_select_file(v3270ft *dialog, const gchar *title, const gchar *button, GtkFileChooserAction action, const gchar *filename); | |
187 | 186 | |
188 | 187 | G_GNUC_INTERNAL void v3270ftprogress_set_session(GtkWidget *widget, H3270 *session); |
189 | 188 | G_GNUC_INTERNAL void v3270ftprogress_update(GtkWidget *widget, unsigned long current, unsigned long total, double kbytes_sec); | ... | ... |
src/pw3270/v3270ft/tables.c
... | ... | @@ -1,196 +0,0 @@ |
1 | -/* | |
2 | - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
3 | - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
4 | - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob | |
5 | - * o nome G3270. | |
6 | - * | |
7 | - * Copyright (C) <2008> <Banco do Brasil S.A.> | |
8 | - * | |
9 | - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
10 | - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
11 | - * Free Software Foundation. | |
12 | - * | |
13 | - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
14 | - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
15 | - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
16 | - * obter mais detalhes. | |
17 | - * | |
18 | - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
19 | - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | |
20 | - * St, Fifth Floor, Boston, MA 02110-1301 USA | |
21 | - * | |
22 | - * Este programa está nomeado como new.c e possui - linhas de código. | |
23 | - * | |
24 | - * Contatos: | |
25 | - * | |
26 | - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
27 | - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
28 | - * | |
29 | - * Referências: | |
30 | - * | |
31 | - * * http://www3.rocketsoftware.com/bluezone/help/v42/en/bz/DISPLAY/IND$FILE/IND$FILE_Technical_Reference.htm | |
32 | - * | |
33 | - */ | |
34 | - | |
35 | - #include "private.h" | |
36 | - | |
37 | -/*--[ Implement ]------------------------------------------------------------------------------------*/ | |
38 | - | |
39 | -const struct v3270ft_option ft_option[NUM_OPTIONS_WIDGETS] = { | |
40 | - | |
41 | - // Transfer options | |
42 | - { | |
43 | - LIB3270_FT_OPTION_ASCII, | |
44 | - "ascii", | |
45 | - N_("_Text file"), | |
46 | - N_( "Check this if the file consists of character data only.") | |
47 | - }, | |
48 | - { | |
49 | - LIB3270_FT_OPTION_CRLF, | |
50 | - "crlf", | |
51 | - N_("Follow the convention for _ASCII text files."), | |
52 | -#ifdef _WIN32 | |
53 | - N_( "Following the convention for ASCII text files, CR/LF pairs are used to terminate records in the PC file, and a CTRL-Z (x'1A') marks the end of file.") | |
54 | -#else | |
55 | - N_( "Following the convention for ASCII text files, LF is used to terminate records in the PC file.") | |
56 | -#endif // _WIN32 | |
57 | - | |
58 | - }, | |
59 | - { | |
60 | - LIB3270_FT_OPTION_APPEND, | |
61 | - "append", | |
62 | - N_("A_ppend to file"), | |
63 | - N_( "Appends the source file to the destination file.") | |
64 | - }, | |
65 | - { | |
66 | - LIB3270_FT_OPTION_REMAP, | |
67 | - "remap", | |
68 | - N_("Re_map ASCII Characters."), | |
69 | - N_("Remap the text to ensure maximum compatibility between the workstation's character set and encoding and the host's EBCDIC code page.") | |
70 | - }, | |
71 | - | |
72 | - // Record format | |
73 | - { | |
74 | - LIB3270_FT_RECORD_FORMAT_DEFAULT, | |
75 | - "recfm.default", | |
76 | - N_("Default"), | |
77 | - N_("Use host default record format.") | |
78 | - }, | |
79 | - { | |
80 | - LIB3270_FT_RECORD_FORMAT_FIXED, | |
81 | - "recfm.fixed", | |
82 | - N_("Fixed"), | |
83 | - N_("Creates a file with fixed-length records.") | |
84 | - }, | |
85 | - { | |
86 | - LIB3270_FT_RECORD_FORMAT_VARIABLE, | |
87 | - "recfm.variable", | |
88 | - N_("Variable"), | |
89 | - N_("Creates a file with variable-length records.") | |
90 | - }, | |
91 | - { | |
92 | - LIB3270_FT_RECORD_FORMAT_UNDEFINED, | |
93 | - "recfm.undefined", | |
94 | - N_("Undefined"), | |
95 | - N_("Creates a file with undefined-length records (TSO hosts only).") | |
96 | - }, | |
97 | - | |
98 | - // Space allocation units | |
99 | - { | |
100 | - LIB3270_FT_ALLOCATION_UNITS_DEFAULT, | |
101 | - "units.default", | |
102 | - N_("Default"), | |
103 | - NULL | |
104 | - }, | |
105 | - { | |
106 | - LIB3270_FT_ALLOCATION_UNITS_TRACKS, | |
107 | - "units.tracks", | |
108 | - N_("Tracks"), | |
109 | - NULL | |
110 | - }, | |
111 | - { | |
112 | - LIB3270_FT_ALLOCATION_UNITS_CYLINDERS, | |
113 | - "units.cylinders", | |
114 | - N_("Cylinders"), | |
115 | - NULL | |
116 | - }, | |
117 | - { | |
118 | - LIB3270_FT_ALLOCATION_UNITS_AVBLOCK, | |
119 | - "units.avblock", | |
120 | - N_("Avblock"), | |
121 | - NULL | |
122 | - }, | |
123 | - | |
124 | -}; | |
125 | - | |
126 | -const struct v3270ft_type ft_type[NUM_TYPES] = { | |
127 | - | |
128 | - { | |
129 | - LIB3270_FT_OPTION_SEND, | |
130 | - "send", | |
131 | - "binary", | |
132 | - N_("Send file") | |
133 | - }, | |
134 | - { | |
135 | - LIB3270_FT_OPTION_RECEIVE, | |
136 | - "receive", | |
137 | - "binary", | |
138 | - N_("Receive file") | |
139 | - }, | |
140 | - { | |
141 | - LIB3270_FT_OPTION_SEND|LIB3270_FT_OPTION_ASCII|LIB3270_FT_OPTION_CRLF|LIB3270_FT_OPTION_REMAP, | |
142 | - "send", | |
143 | - "text", | |
144 | - N_("Send text file") | |
145 | - }, | |
146 | - { | |
147 | - LIB3270_FT_OPTION_RECEIVE|LIB3270_FT_OPTION_ASCII|LIB3270_FT_OPTION_CRLF|LIB3270_FT_OPTION_REMAP, | |
148 | - "receive", | |
149 | - "text", | |
150 | - N_("Receive text file") | |
151 | - } | |
152 | -}; | |
153 | - | |
154 | -const struct v3270ft_value ft_value[LIB3270_FT_VALUE_COUNT] = { | |
155 | - { | |
156 | - "lrecl", | |
157 | - 0, 32760, | |
158 | - N_( "Record Length:" ), | |
159 | - N_( "Specifies the logical record length (n) for a data set consisting of fixed length records or the maximum logical record length for a data set consisting of variable length records." ) | |
160 | - }, | |
161 | - | |
162 | - | |
163 | - { | |
164 | - "primary", | |
165 | - 0,99999, | |
166 | - N_( "Primary space:" ), | |
167 | - N_( "Primary allocation for a file created on a TSO host.\nThe units are given by the space allocation units option." ) | |
168 | - }, | |
169 | - | |
170 | - { | |
171 | - "blksize", | |
172 | - 0,32760, | |
173 | - N_( "Block size:" ), | |
174 | - N_( "Specifies the block size (n) for a new data set. For data sets containing fixed " \ | |
175 | - "length records, the block size must be a multiple of the record length. " \ | |
176 | - "For data sets containing variable length records, the block size must be " \ | |
177 | - "greater than or equal to the record length plus four bytes. The block size " \ | |
178 | - "must not exceed the track length of the device on which the data set resides." ) | |
179 | - }, | |
180 | - | |
181 | - { | |
182 | - "secondary", | |
183 | - 0,99999, | |
184 | - N_( "Secondary space:" ), | |
185 | - N_( "Secondary allocation for a file created on a TSO host.\nThe units are given by the space allocation units option." ) | |
186 | - }, | |
187 | - | |
188 | - { | |
189 | - "dft", | |
190 | - 0,99999, | |
191 | - N_( "DFT B_uffer size:" ), | |
192 | - N_("Specifies the default buffer size for DFT IND$FILE file transfers.") | |
193 | - }, | |
194 | - | |
195 | -}; | |
196 | - |
src/pw3270/v3270ft/v3270ft.c
... | ... | @@ -45,6 +45,164 @@ |
45 | 45 | |
46 | 46 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
47 | 47 | |
48 | +const struct v3270ft_option ft_option[NUM_OPTIONS_WIDGETS] = { | |
49 | + | |
50 | + // Transfer options | |
51 | + { | |
52 | + LIB3270_FT_OPTION_ASCII, | |
53 | + "ascii", | |
54 | + N_("_Text file"), | |
55 | + N_( "Check this if the file consists of character data only.") | |
56 | + }, | |
57 | + { | |
58 | + LIB3270_FT_OPTION_CRLF, | |
59 | + "crlf", | |
60 | + N_("Follow the convention for _ASCII text files."), | |
61 | +#ifdef _WIN32 | |
62 | + N_( "Following the convention for ASCII text files, CR/LF pairs are used to terminate records in the PC file, and a CTRL-Z (x'1A') marks the end of file.") | |
63 | +#else | |
64 | + N_( "Following the convention for ASCII text files, LF is used to terminate records in the PC file.") | |
65 | +#endif // _WIN32 | |
66 | + | |
67 | + }, | |
68 | + { | |
69 | + LIB3270_FT_OPTION_APPEND, | |
70 | + "append", | |
71 | + N_("A_ppend to file"), | |
72 | + N_( "Appends the source file to the destination file.") | |
73 | + }, | |
74 | + { | |
75 | + LIB3270_FT_OPTION_REMAP, | |
76 | + "remap", | |
77 | + N_("Re_map ASCII Characters."), | |
78 | + N_("Remap the text to ensure maximum compatibility between the workstation's character set and encoding and the host's EBCDIC code page.") | |
79 | + }, | |
80 | + | |
81 | + // Record format | |
82 | + { | |
83 | + LIB3270_FT_RECORD_FORMAT_DEFAULT, | |
84 | + "recfm.default", | |
85 | + N_("Default"), | |
86 | + N_("Use host default record format.") | |
87 | + }, | |
88 | + { | |
89 | + LIB3270_FT_RECORD_FORMAT_FIXED, | |
90 | + "recfm.fixed", | |
91 | + N_("Fixed"), | |
92 | + N_("Creates a file with fixed-length records.") | |
93 | + }, | |
94 | + { | |
95 | + LIB3270_FT_RECORD_FORMAT_VARIABLE, | |
96 | + "recfm.variable", | |
97 | + N_("Variable"), | |
98 | + N_("Creates a file with variable-length records.") | |
99 | + }, | |
100 | + { | |
101 | + LIB3270_FT_RECORD_FORMAT_UNDEFINED, | |
102 | + "recfm.undefined", | |
103 | + N_("Undefined"), | |
104 | + N_("Creates a file with undefined-length records (TSO hosts only).") | |
105 | + }, | |
106 | + | |
107 | + // Space allocation units | |
108 | + { | |
109 | + LIB3270_FT_ALLOCATION_UNITS_DEFAULT, | |
110 | + "units.default", | |
111 | + N_("Default"), | |
112 | + NULL | |
113 | + }, | |
114 | + { | |
115 | + LIB3270_FT_ALLOCATION_UNITS_TRACKS, | |
116 | + "units.tracks", | |
117 | + N_("Tracks"), | |
118 | + NULL | |
119 | + }, | |
120 | + { | |
121 | + LIB3270_FT_ALLOCATION_UNITS_CYLINDERS, | |
122 | + "units.cylinders", | |
123 | + N_("Cylinders"), | |
124 | + NULL | |
125 | + }, | |
126 | + { | |
127 | + LIB3270_FT_ALLOCATION_UNITS_AVBLOCK, | |
128 | + "units.avblock", | |
129 | + N_("Avblock"), | |
130 | + NULL | |
131 | + }, | |
132 | + | |
133 | +}; | |
134 | + | |
135 | +const struct v3270ft_type ft_type[NUM_TYPES] = { | |
136 | + | |
137 | + { | |
138 | + LIB3270_FT_OPTION_SEND, | |
139 | + "send", | |
140 | + "binary", | |
141 | + N_("Send file") | |
142 | + }, | |
143 | + { | |
144 | + LIB3270_FT_OPTION_RECEIVE, | |
145 | + "receive", | |
146 | + "binary", | |
147 | + N_("Receive file") | |
148 | + }, | |
149 | + { | |
150 | + LIB3270_FT_OPTION_SEND|LIB3270_FT_OPTION_ASCII|LIB3270_FT_OPTION_CRLF|LIB3270_FT_OPTION_REMAP, | |
151 | + "send", | |
152 | + "text", | |
153 | + N_("Send text file") | |
154 | + }, | |
155 | + { | |
156 | + LIB3270_FT_OPTION_RECEIVE|LIB3270_FT_OPTION_ASCII|LIB3270_FT_OPTION_CRLF|LIB3270_FT_OPTION_REMAP, | |
157 | + "receive", | |
158 | + "text", | |
159 | + N_("Receive text file") | |
160 | + } | |
161 | +}; | |
162 | + | |
163 | +const struct v3270ft_value ft_value[LIB3270_FT_VALUE_COUNT] = { | |
164 | + { | |
165 | + "lrecl", | |
166 | + 0, 32760, | |
167 | + N_( "Record Length:" ), | |
168 | + N_( "Specifies the logical record length (n) for a data set consisting of fixed length records or the maximum logical record length for a data set consisting of variable length records." ) | |
169 | + }, | |
170 | + | |
171 | + | |
172 | + { | |
173 | + "primary", | |
174 | + 0,99999, | |
175 | + N_( "Primary space:" ), | |
176 | + N_( "Primary allocation for a file created on a TSO host.\nThe units are given by the space allocation units option." ) | |
177 | + }, | |
178 | + | |
179 | + { | |
180 | + "blksize", | |
181 | + 0,32760, | |
182 | + N_( "Block size:" ), | |
183 | + N_( "Specifies the block size (n) for a new data set. For data sets containing fixed " \ | |
184 | + "length records, the block size must be a multiple of the record length. " \ | |
185 | + "For data sets containing variable length records, the block size must be " \ | |
186 | + "greater than or equal to the record length plus four bytes. The block size " \ | |
187 | + "must not exceed the track length of the device on which the data set resides." ) | |
188 | + }, | |
189 | + | |
190 | + { | |
191 | + "secondary", | |
192 | + 0,99999, | |
193 | + N_( "Secondary space:" ), | |
194 | + N_( "Secondary allocation for a file created on a TSO host.\nThe units are given by the space allocation units option." ) | |
195 | + }, | |
196 | + | |
197 | + { | |
198 | + "dft", | |
199 | + 0,99999, | |
200 | + N_( "DFT B_uffer size:" ), | |
201 | + N_("Specifies the default buffer size for DFT IND$FILE file transfers.") | |
202 | + }, | |
203 | + | |
204 | +}; | |
205 | + | |
48 | 206 | |
49 | 207 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
50 | 208 | ... | ... |