# # # # 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" # length - compute length of string integer function length(str) character str(ARB) for (length = 0; str(length+1) != EOS; length = length + 1) ; return end # index - find character c in string str integer function index(str, c) character c, str(ARB) for (index = 1; str(index) != EOS; index = index + 1) if (str(index) == c) return index = 0 return end # indexq - find character c in string str, ignoring chars within quoted strings integer function indexq(str, c) character c, str(ARB) integer nuqcp for (indexq=nuqcp(str, 1); str(indexq) != EOS; indexq=nuqcp(str, indexq+1)) if (str(indexq) == c) return indexq = 0 return end # scopy - copy string at from(i) to to(j) subroutine scopy(from, i, to, j) character from(ARB), to(ARB) integer i, j, k1, k2 k2 = j for (k1 = i; from(k1) != EOS; k1 = k1 + 1) { to(k2) = from(k1) k2 = k2 + 1 } to(k2) = EOS return end # concat - concatenate two strings integer function concat(s1,s2,lim) character s1(ARB),s2(ARB) integer lim, i, length, l l = length(s1) for (i=l+1; i= 'a' & C <= 'z') cupper = c - 'a' + 'A' else cupper = c return end # nuqcp - return postion of next char which isn't part of a quoted (") string integer function nuqcp(buf, i) character buf(ARB) integer i if (buf(i) != '"') return (i) for (nuqcp = i+1; buf(nuqcp) != EOS; nuqcp = nuqcp+1) if (buf(nuqcp) == '"') { nuqcp = nuqcp+1 if (buf(nuqcp) != '"') return } return end