%%s 0/0/0 %%d D 1.1 26-Mar-82 12:32:00 v1.1 1 0 %%c Version 1.1 is the Spring 1982 Distribution of the LBL/Hughes release %%c of the Software Tools Virtual Operating System software and documentation. %%T %%I 1 #-h- lsd.r 1470 asc 25-mar-82 07:31:21 v1.1 (sw-tools v1.1) #-h- main 1397 asc 25-mar-82 07:31:08 v1.1 (sw-tools v1.1) subroutine main integer desc, found, fuic, d, i, j, local, grp, mem, junk, verbos, width character file(FILENAMESIZE), dev(10), buf(FILENAMESIZE), buic(2), uic(10), arg(10), direct(FILENAMESIZE) integer opendr, gdrprm, indexs, f11uic, equal, getarg, index equivalence (fuic, buic(1)) string dotdir ".dir" string root "[0,377]" call query("usage: lsd [-lv] [device].") local = NO verbos = NO width = -1 call trndev("SY", 0, dev) for (i=1; getarg(i, arg, 10) != EOF; i=i+1) if (arg(1) == '-') { call fold(arg) if (index(arg, 'l') > 0) local = YES if (index(arg, 'v') > 0) { width = -20 verbos = YES } } else call mklocl(arg, dev) call concat(dev, root, direct) if (opendr(direct, desc) != ERR) { while (gdrprm(desc, file) != EOF) { i = indexs(file, dotdir) if (i > 0) { file(i) = EOS j = 1 call stcopy(dev, 1, buf, j) call chcopy('[', buf, j) call stcopy(file, 1, buf, j) call chcopy(']', buf, j) junk = f11uic(desc, fuic) mem = buic(1) grp = buic(2) call fmtuic(grp, mem, uic) if (local == YES) call mklocl(buf, file) else call mkpath(buf, file) call putstr(file, width, STDOUT) if (verbos == YES) call putlin(uic, STDOUT) call putch('@n', STDOUT) } } } call closdr(desc) return end #-h- lsd.fmt 730 asc 25-mar-82 07:31:24 v1.1 (sw-tools v1.1) .so ~bin/manhdr .hd Lsd (1) 12-Mar-82 list alpha-numeric directory names .sy lsd [-lv] [device] .ds `lsd' lists the alpha-numeric directory names which have been established through the use of the `mkd' utility. Given the device to list (or SY: if not specified), `lsd' simply lists the full path for all known alpha-numeric directories. If the `-l' option is specified, the names are displayed in local format (ddn:[name]) instead of the default path format (/ddn/name). Specification of the `-v' option causes the corresponding UIC to be displayed to the right of the directory name. .fl ddn:[0,377]*.dir .sa mkd - establish alpha-numeric directory .br prd - print current alpha-numeric directory name .di .au Joe Sventek .bu %%E 1