%%s 6/7/96 %%d D 1.2 28-Jul-83 22:56:13 tools 2 1 %%c Converted for loops with [ ; ] multi-statement syntax to the comma- %%c separated version for use with the new ratfor. %%s 0/0/0 %%d D 1.1 04-Apr-82 13:03:15 tools 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 %%D 2 #-h- addr.r 2421 asc 04-apr-82 13:01:38 tools #-h- main 2363 asc 04-apr-82 13:01:28 tools #-h- main 2194 asc 04-apr-82 12:28:50 tools %%E 2 %%I 2 #-h- addr.r 2375 asc 28-jul-83 22:55:02 tools (lblh csam sventek) #-h- main 2297 asc 28-jul-83 22:44:47 tools (lblh csam sventek) %%E 2 define(START_USERNAME,arith(16%0,+,1)) define(START_DIRECTORY,arith(16%20,+,1)) define(START_DEVICE,arith(16%40,+,1)) define(START_COMMENT,arith(16%7e,+,1)) define(END_COMMENT,arith(16%9d,+,1)) define(MEMBER_UIC,arith(8%34,+,1)) define(GROUP_UIC,arith(8%36,+,1)) DRIVER(addr) character buf(5000) character member(2), group(2) integer igroup, imember equivalence (igroup, group(1)), (imember, member(1)) character user(13), direct(100), device(100), comment(100), uic(20) character file(FILENAMESIZE) filedes fd filedes open integer readf, length, equal, getarg integer n integer i, j, m integer count string def_file "sys$system:sysuaf.dat" string defalt "default" string sysdisk "sys$sysdisk:" count = 0 if (getarg(1, file, FILENAMESIZE) == EOF) call strcpy(def_file, file) fd = open(file, READ) if (fd == ERR) call cant(file) repeat { n = readf(buf, 5000, fd) if (n == EOF) break i = START_USERNAME %%D 2 for (j=1; j <= 12; [j=j+1; i=i+1]) %%E 2 %%I 2 for (j=1; j <= 12; j=j+1, i=i+1) %%E 2 user(j) = buf(i) user(j) = EOS for (j = length(user); j > 0; j = j - 1) if (user(j) != ' ') break user(j+1) = EOS call fold(user) i = START_DIRECTORY m = buf(i) i = i + 1 %%D 2 for (j=1; j <= m; [j=j+1; i=i+1]) %%E 2 %%I 2 for (j=1; j <= m; j=j+1, i=i+1) %%E 2 direct(j) = buf(i) direct(j) = EOS i = START_DEVICE m = buf(i) i = i + 1 %%D 2 for (j=1; j <= m; [j=j+1; i=i+1]) %%E 2 %%I 2 for (j=1; j <= m; j=j+1, i=i+1) %%E 2 device(j) = buf(i) device(j) = EOS if (device(1) == EOS) call strcpy(sysdisk, device) call concat(device, direct, device) call fold(device) i = START_COMMENT m = END_COMMENT comment(1) = '"' %%D 2 for (j=2; i <= m; [j=j+1; i=i+1]) %%E 2 %%I 2 for (j=2; i <= m; j=j+1, i=i+1) %%E 2 comment(j) = buf(i) comment(j) = EOS for (j = length(comment); j > 0; j = j - 1) if (comment(j) != ' ') break j = j + 1 call chcopy('"', comment, j) call fold(comment) imember = 0 igroup = 0 i = MEMBER_UIC member(1) = buf(i) member(2) = buf(i+1) i = GROUP_UIC group(1) = buf(i) group(2) = buf(i+1) call fmtuic(igroup, imember, uic) if (equal(user, defalt) == NO) { call putstr(user, -15, STDOUT) call putstr(device, -24, STDOUT) call putch(' ', STDOUT) call putstr(uic, -10, STDOUT) call putlnl(comment, STDOUT) count = count + 1 } } call close(fd) call putlin("Number of records read: ", ERROUT) call putint(count, 1, ERROUT) call putch('@n', ERROUT) DRETURN end %%E 1