# # # # 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: March 26, 1982 # # # # ******************************************************* # * * # * 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) character file(FILENAMESIZE) character node(NODESIZE), dev(DEVSIZE), uic(UICSIZE), name(NAMESIZE), ext(EXTSIZE), ver(VERSIZE) logical reset ver(1) = EOS call fparse(file, node, dev, uic, name, ext, ver, reset, .false.) return end # fparse - provide defaults for file name, reset new defaults. # if astrsk is true, asterisks only will use the defaults. subroutine fparse(file, node, dev, uic, name, ext, ver, reset, astrsk) character file(FILENAMESIZE), temp(FILENAMESIZE) character node(NODESIZE), dev(DEVSIZE), uic(UICSIZE), name(NAMESIZE), ext(EXTSIZE), ver(VERSIZE) logical reset, astrsk integer l, j, icp, len integer indexq, bkscnq, concat, scan temp(1) = EOS len = concat(temp, file(scan(file, ' ', 1)), FILENAMESIZE) file(1) = EOS j = 1 l = 0 icp = indexq(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, astrsk) call adstr(indexq(temp(j), ':'), j, l, file, temp, dev, DEVSIZE-1, reset, astrsk) call adstr(indexq(temp(j), ']'), j, l, file, temp, uic, UICSIZE-1, reset, astrsk) call adstr(bkscnq(temp, ' .;', j) - j, j, l, file, temp, name, NAMESIZE-1, reset, astrsk) call adstr(bkscnq(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, astrsk) 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, iast, concat, scan, indexq character file(1), tfile(1), str(1) logical reset, astrsk if (i == 0 & !astrsk) l = concat(file, str, FILENAMESIZE) else if (i != 0) { if (astrsk) iast = indexq(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