summaryrefslogtreecommitdiff
path: root/support/vvcode/vvcode.cld
blob: f67fcbf37464ed068aa35fe279d7a82777004440 (plain)
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
!!  ARCHIVE HEADER INFORMATION
!!
!!  @Digital-Command-Language-Def-file{
!!      FILENAME    = "vvcode.cld",
!!      VERSION     = "1.00",
!!      DATE        = "",
!!      TIME        = "",
!!
!!      AUTHOR      = "Niel Kempson",
!!      ADDRESS     = "25 Whitethorn Drive, Cheltenham, GL52 5LL, England",
!!      TELEPHONE   = "+44-242 579105",
!!      EMAIL       = "kempson@tex.ac.uk (Internet)",
!!
!!      SUPPORTED   = "yes",
!!      ARCHIVED    = "tex.ac.uk, ftp.tex.ac.uk",
!!      KEYWORDS    = "VVcode",
!!
!!      CODETABLE   = "ISO/ASCII",
!!      CHECKSUM    = "51492 1481 5732 57976",
!!
!!      DOCSTRING   = { This is the VVCODE Command Line Definition file for
!!                      VAX/VMS.  It defines the command verbs VVENCODE and
!!                      VVDECODE.
!!
!!                      NOTE:   the string VVCODE_DIR used in the "image"
!!                              lines should be replaced by the appropriate
!!                              physical or logical directory specification
!!                              where the VVDECODE.EXE and VVENCODE.EXE
!!                              image files reside.
!!
!!                      To activate the command verbs, the DCL command
!!
!!                          SET COMMAND VVCODE
!!
!!                      should be issued.
!!                  }
!!  }
!!
!!  MODULE CONTENTS
!!
!!      [tbs]
!!
!!  COPYRIGHT
!!
!!      Copyright (c) 1991-1993 by Niel Kempson <kempson@tex.ac.uk>
!!
!!      This program is free software; you can redistribute it and/or
!!      modify it under the terms of the GNU General Public License as
!!      published by the Free Software Foundation; either version 1, or
!!      (at your option) any later version.
!!
!!      This program is distributed in the hope that it will be useful,
!!      but WITHOUT ANY WARRANTY; without even the implied warranty of
!!      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
!!      General Public License for more details.
!!
!!      You should have received a copy of the GNU General Public License
!!      along with this program; if not, write to the Free Software
!!      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!!
!!      In other words, you are welcome to use, share and improve this
!!      program.  You are forbidden to forbid anyone else to use, share
!!      and improve what you give them.   Help stamp out software-hoarding!  
!!
!!  CHANGE LOG
!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
!!  Define the verb VVENCODE.
!!
!!  Parameters
!!
!!      INPUT_FILE
!!
!!              The file to be read and encoded.  This parameter is required 
!!              (unless the /HELP qualifier is present) and must be a valid
!!              VAX/VMS file specification.
!!
!!      OUTPUT_FILE
!!
!!              The encoded VVE file to be created by VVENCODE.  This 
!!              parameter is optional, but if present, must be a valid
!!              VAX/VMS file specification.
!!
!!  Qualifiers
!!
!!      /DEBUG
!!
!!              generate copious debugging information
!!
!!      /ENCODING_TABLE=file-spec
!!
!!              specify a file containing the 64 character encoding table
!!              used to encode/decode the file.  The qualifier value is
!!              required and must be a valid VAX/VMS file specification.
!!
!!      /FORMAT=file_format
!!
!!              specify the VVcode file format to be used when reading the
!!              file.  This qualifier is not normally required as the file
!!              format will be determined automatically by the program.  The
!!              qualifier value is required and must be one of the values
!!              defined for the CLD type 'file_format' (defined near the end
!!              of this file): DEFAULT, FIXED, STREAM or VARIABLE.
!!              
!!      /HEADER_FILESPEC=string
!!
!!              specify the file specification to be recorded in the VVE
!!              file created by VVENCODE, to be subsequently used as the
!!              default for the output file by VVDECODE.  The qualifier value
!!              is required and may be an arbitrary string.  The value is not 
!!              checked or validated by VVENCODE.
!!
!!      /HELP
!!
!!              request a short summary of the command line syntax for
!!              VVENCODE.  NOTE: this qualifier invokes a special syntax
!!              version of the verb that does not require an input file to be
!!              specified.
!!
!!      /LOG[=file_spec]
!!
!!              specify a file to which status and logging information should
!!              be written.  The qualifier value is optional, but if present,
!!              must be a valid VAX/VMS file specification.  If absent,
!!              logging information is written to SYS$OUTPUT.
!!
!!      /MODE=file_mode
!!
!!              specify the VVcode file mode to be used when reading the file.
!!              This qualifier is not normally required as the file mode
!!              will be determined automatically by the program.  The
!!              qualifier value is required and must be one of the values
!!              defined for the CLD type 'file_mode' (defined near the end
!!              of this file): BINARY or TEXT.
!!
!!      /OVERWRITE
!!
!!              specify that existing files can be overwritten by VVENCODE
!!              without first requesting permission.  On VAX/VMS, VVENCODE
!!              would only request permission if the output file
!!              specification included an explicit version number.
!!
!!      /RECORD_LENGTH=decimal_number
!!
!!              specify the maximum record length to be assumed when reading
!!              a fixed or variable length record format file.  This 
!!              qualifier is not normally required as the maximum record
!!              length will be determined automatically by the program.  The
!!              qualifier value is required and must be an integer in the 
!!              supported for the different file formats (FIXED: 2 - 32767,
!!              VARIABLE: 0 - 32765).
!!
!!      /SPLIT_SIZE=decimal_number
!!
!!              specify the maximum size in kilobytes of VVE file parts
!!              created by VVENCODE.  The qualifier value is required and must
!!              be an integer no less than 4.
!!
!!      /TIMESTAMP=time_value
!!
!!              specify the timestamp to be recorded in the VVE file created
!!              by VVENCODE, to be subsequently used by VVDECODE.  The 
!!              qualifier value is optional, but if present, must be a VMS
!!              absolute or combination time.  If the qualifier value is
!!              omitted the current date and time is used.  This 
!!              qualifier is not normally required as the file timestamp
!!              will be determined automatically by the program.
!!
!!      /TRANSLATION_FILE=file_spec
!!
!!              specify a file containing the rules for translating between
!!              two character sets (e.g. ASCII -> EBCDIC).  The qualifier
!!              value is required and must be a valid VAX/VMS file
!!              specification.
!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
define verb VVENCODE
    image VVCODE_DIR:VVENCODE
!
    parameter P1,
	label=INPUT_FILE,
        prompt="File_to_be_encoded",
        value(required, type=$file)
    parameter P2,
	label=OUTPUT_FILE,
	prompt="Output_File",
	value(type=$file)
!
    qualifier DEBUG
    qualifier ENCODING_TABLE,
	nonnegatable,
	value(required, type=$file)
    qualifier FORMAT,
	nonnegatable,
	value(required, type=FILE_FORMAT)
    qualifier HEADER_FILESPEC,
	nonnegatable,
	value(required)
    qualifier HELP,
	syntax=VVENCODE_HELP
    qualifier LOG
	nonnegatable,
	value(type=$file)
    qualifier MODE,
	nonnegatable,
	value(required, type=FILE_MODE)
    qualifier OVERWRITE,
	negatable,
	default
    qualifier RECORD_LENGTH,
	nonnegatable,
	value(required, type=$number)
    qualifier SPLIT_SIZE,
	nonnegatable,
	value(required, type=$number)
    qualifier TIMESTAMP,
	nonnegatable,
	value(type=$datetime)
    qualifier TRANSLATION_FILE,
	nonnegatable,
	value(required, type=$file)



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
!!  Define the verb VVDECODE.
!!
!!  Parameters
!!
!!      INPUT_FILE
!!
!!              The encoded VVE file to be read and decoded.  This parameter
!!              is required (unless the /HELP qualifier is present) and must
!!              be a valid VAX/VMS file specification.
!!
!!      OUTPUT_FILE
!!
!!              The decoded output file to be created by VVDECODE.  This 
!!              parameter is optional, but if present, must be a valid
!!              VAX/VMS file specification.
!!
!!  Qualifiers
!!
!!      /DEBUG
!!
!!              generate copious debugging information
!!
!!      /ENCODING_TABLE=file-spec
!!
!!              specify a file containing the 64 character encoding table
!!              used to encode/decode the file.  The qualifier value is
!!              required and must be a valid VAX/VMS file specification.
!!
!!      /FORMAT=file_format
!!
!!              specify the VVcode file format to be used to create the
!!              output file.  This qualifier is not normally required as the
!!              VVE file specifies the format of the original file, but may
!!              be used to override that value.  The qualifier value is 
!!              required and must be one of the values defined for the CLD
!!              type 'file_format' (defined near the end of this file): 
!!              DEFAULT, FIXED, STREAM or VARIABLE.
!!              
!!      /HELP
!!
!!              request a short summary of the command line syntax for
!!              VVDECODE.  NOTE: this qualifier invokes a special syntax
!!              version of the verb that does not require an input file to be
!!              specified.
!!
!!      /INDEX_FILE=file_spec
!!
!!              specify a file containing the index of translation table
!!              files to be used for translating between two character sets
!!              (e.g. ASCII -> EBCDIC).  The qualifier value is required and
!!              must be a valid VAX/VMS file specification.  This file is
!!              used by VVDECODE if the file has been encoded using a 
!!              different character set and the /TRANSLATION_FILE qualifier
!!              was not used to specify the translation table file.
!!
!!      /LOG[=file_spec]
!!
!!              specify a file to which status and logging information should
!!              be written.  The qualifier value is optional, but if present,
!!              must be a valid VAX/VMS file specification.  If absent,
!!              logging information is written to SYS$OUTPUT.
!!
!!      /MODE=file_mode
!!
!!              specify the VVcode file mode to be used to create the
!!              output file.  This qualifier is not normally required as the
!!              VVE file specifies the mode of the original file, but may
!!              be used to override that value.  The qualifier value is
!!              required and must be one of the values defined for the CLD
!!              type 'file_mode' (defined near the end of this file): 
!!              BINARY or TEXT.
!!
!!      /OVERWRITE
!!
!!              specify that existing files can be overwritten by VVDECODE
!!              without first requesting permission.
!!
!!      /PAD_CHARACTER=decimal_number
!!
!!              specify the value of the character to be used to pad a fixed
!!              length format output file to ensure that its length is an
!!              exact multiple of the record length.  The qualifier value is
!!              required and must be an integer in the range 0 - 255.
!!
!!      /RECORD_LENGTH=decimal_number
!!
!!              specify the maximum record length to be used when creating
!!              a fixed or variable length record format file.  This 
!!              qualifier is not normally required as the VVE file specifies
!!              the maximum record length of the original file.  The
!!              qualifier value is required and must be an integer in the 
!!              supported for the different file formats (FIXED: 2 - 32767,
!!              VARIABLE: 0 - 32765).
!!
!!      /TIMESTAMP=time_value
!!
!!              specify the timestamp to be applied to the output file
!!              created by VVDECODE.  This qualifier is not normally required
!!              as the VVE file specifies the timestamp of the original file.  
!!              The qualifier value is optional, but if present, must be a VMS
!!              absolute or combination time.  If the qualifier value is
!!              omitted the current date and time is used.
!!
!!      /TRANSLATION_FILE=file_spec
!!
!!              specify a file containing the rules for translating between
!!              two character sets (e.g. ASCII -> EBCDIC).  The qualifier
!!              value is required and must be a valid VAX/VMS file
!!              specification.
!!
!!      /UUDECODE
!!
!!              specify that the input file is a UUencoded file and should be
!!              decoded accordingly.  This qualifier is provided to give
!!              VVDECODE an element of backwards compatibility.  NOTE: this
!!              qualifier and the /XXDECODE qualifier are mutually exclusive.
!!              
!!      /XXDECODE
!!
!!              specify that the input file is a XXencoded file and should be
!!              decoded accordingly.  This qualifier is provided to give
!!              VVDECODE an element of backwards compatibility.  NOTE: this
!!              qualifier and the /UUDECODE qualifier are mutually exclusive.
!!              
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
define verb VVDECODE
    image VVCODE_DIR:VVDECODE
!
    parameter P1,
	label=INPUT_FILE,
	prompt="File_to_be_decoded",
	value(required, type=$file)
    parameter P2,
	label=OUTPUT_FILE,
	prompt="Output_File",
	value(type=$file)
!
    qualifier DEBUG
    qualifier ENCODING_TABLE,
	nonnegatable,
	value(required, type=$file)
    qualifier FORMAT,
	nonnegatable,
	value(required, type=FILE_FORMAT)
    qualifier HELP,
	syntax=VVDECODE_HELP
    qualifier INDEX_FILE,
	nonnegatable,
	value(required, type=$file)
    qualifier LOG
	nonnegatable,
	value(type=$file)
    qualifier MODE,
	nonnegatable,
	value(required, type=FILE_MODE)
    qualifier OVERWRITE,
	negatable,
	default
    qualifier PAD_CHARACTER,
	nonnegatable,
	value(required, type=$number)
    qualifier RECORD_LENGTH,
	nonnegatable,
	value(required, type=$number)
    qualifier TIMESTAMP,
	nonnegatable,
	value(type=$datetime)
    qualifier TRANSLATION_FILE,
	nonnegatable,
	value(required, type=$file)
    qualifier UUDECODE,
	nonnegatable
    qualifier XXDECODE,
	nonnegatable
    disallow UUDECODE AND XXDECODE



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
!! Define an alternative syntax for VVENCODE & VVDECODE so that the user can
!! issue the command VVENCODE /HELP without being forced to specify a file
!! parameter.
!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
define syntax VVENCODE_HELP
    image VVCODE_DIR:VVENCODE
    noparameters

define syntax VVDECODE_HELP
    image VVCODE_DIR:VVDECODE
    noparameters



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
!! Define the keywords that can be specified as values for the /FORMAT
!! qualifier.  No default value is specified because the value is normally
!! determined from the input file.
!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
define type FILE_FORMAT
    keyword DEFAULT,
    keyword FIXED,
    keyword STREAM,
    keyword VARIABLE



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
!! Define the keywords that can be specified as values for the /MODE
!! qualifier.  No default value is specified because the value is normally
!! determined from the input file.
!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
define type FILE_MODE
    keyword BINARY,
    keyword TEXT