# # # # LIST File Listing Utility # ========================= # # Author: William P. Wood, Jr. # # Address: Computer Center # Institute For Cancer Research # 7701 Burholme Ave. # Philadelphia, Pa. 19111 # (215) 728 2760 # # Version: 3.0 # # Date: December 29, 1981 # # # # ******************************************************* # * * # * THIS SOFTWARE WAS DEVELOPED WITH SUPPORT * # * FROM THE NATIONAL INSTITUTES OF HEALTH: * # * NIH CA06927 * # * NIH CA22780 * # * * # * DIRECT INQUIRIES TO: * # * COMPUTER CENTER * # * THE INSTITUTE FOR CANCER RESEARCH * # * 7701 BURHOLME AVENUE * # * PHILADELPHIA, PENNSYLVANIA 19111 * # * * # * NO WARRANTY OR REPRESENTATION, EXPRESS OR * # * IMPLIED, IS MADE WITH RESPECT TO THE * # * CORRECTNESS, COMPLETENESS, OR USEFULNESS * # * OF THIS SOFTWARE, NOR THAT USE OF THIS * # * SOFTWARE MIGHT NOT INFRINGE PRIVATELY * # * OWNED RIGHTS. * # * * # * NO LIABILITY IS ASSUMED WITH RESPECT TO * # * THE USE OF, OR FOR DAMAGES RESULTING FROM * # * THE USE OF THIS SOFTWARE * # * * # ******************************************************* # # include symbols.rat # defnam - provide defaults for file name, reset new defaults - # compatible with old version, doesn't return version number and # doesn't have special processing for asterisks subroutine defnam(file, node, dev, uic, name, ext, reset) byte file(FILENAMESIZE) byte node(NODESIZE), dev(DEVSIZE), uic(UICSIZE), name(NAMESIZE), ext(EXTSIZE), ver(VERSIZE) logical reset, astrsk ver(1) = EOS astrsk = .false. call fparse(file, node, dev, uic, name, ext, ver, reset, astrsk) return end # fparse - provide defaults for file name, reset new defaults. # if astrsk is true, asterisks will use the defaults. subroutine fparse(file, node, dev, uic, name, ext, ver, reset, astrsk) byte file(FILENAMESIZE), temp(FILENAMESIZE) byte node(NODESIZE), dev(DEVSIZE), uic(UICSIZE), name(NAMESIZE), ext(EXTSIZE), ver(VERSIZE) logical reset, astrsk integer l, j, icp, len integer index, bkscan, concat, scan temp(1) = EOS len = concat(temp, file(scan(file, ' ', 1)), FILENAMESIZE) file(1) = EOS j = 1 l = 0 icp = index(temp(j), ':') if (icp != 0) { if (temp(icp+1) == ':') icp = icp + 1 else icp = 0 } call adstr(icp, j, l, file, temp, node, NODESIZE-1, reset, .false.) call adstr(index(temp(j), ':'), j, l, file, temp, dev, DEVSIZE-1, reset, .false.) call adstr(index(temp(j), ']'), j, l, file, temp, uic, UICSIZE-1, reset, .false.) call adstr(bkscan(temp, ' .;', j) - j, j, l, file, temp, name, NAMESIZE-1, reset, astrsk) call adstr(bkscan(temp, ' ;', j) - j, j, l, file, temp, ext, EXTSIZE-1, reset, astrsk) call adstr(len+1-j, j, l, file, temp, ver, VERSIZE-1, reset, .false.) return end # adstr - copy piece of file name for fparse subroutine adstr(i, j, l, file, tfile, str, mxstr, reset, astrsk) integer i, j, l, mxstr, k integer concat, scan byte file(1), tfile(1), str(1) logical reset, astrsk if (i == 0) l = concat(file, str, FILENAMESIZE) else { if (astrsk) iast = index(tfile(j),'*') else iast = 0 if (iast != 0 & iast <= i) { l = concat(file, str, FILENAMESIZE) j = scan(tfile, ' ', j+i) } else { k = min0(mxstr, i) l = concat(file, tfile(j), l+1+k) j = scan(tfile, ' ', j+i) if (reset) call scopy(file, l+1-k, str, 1) } } return end