1
$! 28 December 2006. SMS.
3
$! Info-ZIP VMS accessory procedure.
5
$! Find the BZIP2 object library under P1, starting in the [.'P2']
6
$! destination directory. (We assume, initially, that the BZIP2
7
$! directory has a destination directory structure like ours.)
9
$! Set the P4 logical name to the directory where it was found.
10
$! P5 and P6 may be used for qualifiers on the DEFINE command.
16
$! Remove any trailing colon, to allow logical name translation.
20
$ if (f$extract( (f$length( bz_base)- 1), 1, bz_base) .eqs. ":")
22
$ bz_base = bz_base- ":"
25
$ bz_base_eqv = f$trnlnm( bz_base)
26
$ if (bz_base_eqv .nes. "")
28
$ bz_orig = bz_base_eqv
29
$ bz_base = bz_base_eqv
31
$ bz_base = bz_base- "]"
33
$! Candidate 1 = the actual analogue destination directory.
35
$ bz_dev_dir_cand = bz_base+ "."+ dest+ "]"
36
$ lib_cand = bz_dev_dir_cand+ libbz2
37
$ if (f$search( lib_cand) .nes. "")
39
$ bz_dev_dir = bz_dev_dir_cand
42
$! Candidate 2 = the actual analogue destination directory + "L".
44
$ bz_dev_dir_cand = bz_base+ "."+ dest+ "L]"
45
$ lib_cand = bz_dev_dir_cand+ libbz2
46
$ if (f$search( lib_cand) .nes. "")
48
$ bz_dev_dir = bz_dev_dir_cand
51
$! Candidate 3 = the actual user-specified directory.
53
$ bz_dev_dir_cand = bz_orig
54
$ lib_cand = bz_dev_dir_cand+ libbz2
55
$ if (f$search( lib_cand) .nes. "")
57
$ bz_dev_dir = bz_dev_dir_cand
62
$ if (bz_dev_dir .nes. "")
66
$ write sys$output bz_dev_dir
68
$ define 'p5' 'p4' 'bz_dev_dir' 'p6'