tables.c
7.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
/*
* "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
* (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
* aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob
* o nome G3270.
*
* Copyright (C) <2008> <Banco do Brasil S.A.>
*
* Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
* os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
* Free Software Foundation.
*
* Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
* GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
* A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
* obter mais detalhes.
*
* Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
* programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
* St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Este programa está nomeado como v3270ft.c e possui - linhas de código.
*
* Contatos:
*
* perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
* erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
*
*/
#include <limits.h>
#include "private.h"
/*--[ Globals ]--------------------------------------------------------------------------------------*/
const struct v3270ft_option ft_option[NUM_OPTIONS_WIDGETS] = {
// Transfer options
{
LIB3270_FT_OPTION_ASCII,
"ascii",
N_("_Text file"),
N_( "Check this if the file consists of character data only.")
},
{
LIB3270_FT_OPTION_CRLF,
"crlf",
N_("_ASCII text"),
#ifdef _WIN32
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.")
#else
N_( "Following the convention for ASCII text files, LF is used to terminate records in the PC file.")
#endif // _WIN32
},
{
LIB3270_FT_OPTION_APPEND,
"append",
N_("A_ppend to file"),
N_( "Appends the source file to the destination file.")
},
{
LIB3270_FT_OPTION_REMAP,
"remap",
N_("Re_map ASCII Characters."),
N_("Remap the text to ensure maximum compatibility between the workstation's character set and encoding and the host's EBCDIC code page.")
},
// Record format
{
LIB3270_FT_RECORD_FORMAT_DEFAULT,
"recfm.default",
N_("Default"),
N_("Use host default record format.")
},
{
LIB3270_FT_RECORD_FORMAT_FIXED,
"recfm.fixed",
N_("Fixed"),
N_("Creates a file with fixed-length records.")
},
{
LIB3270_FT_RECORD_FORMAT_VARIABLE,
"recfm.variable",
N_("Variable"),
N_("Creates a file with variable-length records.")
},
{
LIB3270_FT_RECORD_FORMAT_UNDEFINED,
"recfm.undefined",
N_("Undefined"),
N_("Creates a file with undefined-length records (TSO hosts only).")
},
// Space allocation units
{
LIB3270_FT_ALLOCATION_UNITS_DEFAULT,
"units.default",
N_("Default"),
NULL
},
{
LIB3270_FT_ALLOCATION_UNITS_TRACKS,
"units.tracks",
N_("Tracks"),
NULL
},
{
LIB3270_FT_ALLOCATION_UNITS_CYLINDERS,
"units.cylinders",
N_("Cylinders"),
NULL
},
{
LIB3270_FT_ALLOCATION_UNITS_AVBLOCK,
"units.avblock",
N_("Avblock"),
NULL
},
};
const struct v3270ft_type ft_type[] = {
{
LIB3270_FT_OPTION_SEND,
"send",
"binary",
N_("Send file")
},
{
LIB3270_FT_OPTION_RECEIVE,
"receive",
"binary",
N_("Receive file")
},
{
LIB3270_FT_OPTION_SEND|LIB3270_FT_OPTION_ASCII|LIB3270_FT_OPTION_CRLF|LIB3270_FT_OPTION_REMAP,
"send",
"text",
N_("Send text file")
},
{
LIB3270_FT_OPTION_RECEIVE|LIB3270_FT_OPTION_ASCII|LIB3270_FT_OPTION_CRLF|LIB3270_FT_OPTION_REMAP,
"receive",
"text",
N_("Receive text file")
}
};
const struct v3270ft_value ft_value[] = {
{
// LIB3270_FT_VALUE_LRECL
"lrecl",
0, 32760,
N_( "Record Length" ),
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." )
},
{
// LIB3270_FT_VALUE_BLKSIZE
"blksize",
0,32760,
N_( "Block size" ),
N_( "Specifies the block size (n) for a new data set. For data sets containing fixed " \
"length records, the block size must be a multiple of the record length. " \
"For data sets containing variable length records, the block size must be " \
"greater than or equal to the record length plus four bytes. The block size " \
"must not exceed the track length of the device on which the data set resides." )
},
{
// LIB3270_FT_VALUE_PRIMSPACE
"primary",
0,99999,
N_( "Primary space" ),
N_( "Primary allocation for a file created on a TSO host.\nThe units are given by the space allocation units option." )
},
{
// LIB3270_FT_VALUE_SECSPACE
"secondary",
0,99999,
N_( "Secondary space" ),
N_( "Secondary allocation for a file created on a TSO host.\nThe units are given by the space allocation units option." )
},
{
// LIB3270_FT_VALUE_DFT
"dft",
0,99999,
N_( "DFT B_uffer size" ),
N_("Specifies the default buffer size for DFT IND$FILE file transfers.")
},
};
const struct v3270_activity_list_option v3270_activity_list_options[] =
{
{ LIB3270_FT_OPTION_RECEIVE, "type", "receive" },
{ LIB3270_FT_OPTION_ASCII, "format", "ascii" },
{ LIB3270_FT_OPTION_CRLF, "format", "crlf" },
{ LIB3270_FT_OPTION_APPEND, "format", "append" },
{ LIB3270_FT_OPTION_REMAP, "format", "remap" },
{ LIB3270_FT_OPTION_UNIX, "file-format", "unix" },
{ LIB3270_FT_RECORD_FORMAT_FIXED, "record-format", "fixed" },
{ LIB3270_FT_RECORD_FORMAT_VARIABLE, "record-format", "variable" },
{ LIB3270_FT_RECORD_FORMAT_UNDEFINED, "record-format", "undefined" },
{ LIB3270_FT_ALLOCATION_UNITS_TRACKS, "units", "tracks" },
{ LIB3270_FT_ALLOCATION_UNITS_CYLINDERS, "units", "cylinders" },
{ LIB3270_FT_ALLOCATION_UNITS_AVBLOCK, "units", "avblock" },
{ 0, NULL, NULL }
};
const struct v3270_ft_worker_field v3270_ft_worker_fields[PROGRESS_FIELD_COUNT] =
{
{ N_("Local:"), N_("Path and name of the local file") },
{ N_("Remote:"), N_("The name of the file in the host") },
{ N_("Total:"), N_("Total bytes to transfer") },
{ N_("Current:"), N_("Current transfer position") },
{ N_("Speed:"), N_("Transfer speed") },
{ N_("ETA:"), N_("Estimated transfer arrival") }
};
const gchar * v3270_text_file_extensions[] = {
".txt",
".c",
".h",
NULL
};