From pa.dec.com!decwrl!uunet!sparky!kent Sat Feb 2 14:37:19 PST 1991 Article: 2031 of comp.sources.misc Path: pa.dec.com!decwrl!uunet!sparky!kent From: goer@midway.uchicago.edu (Richard L. Goerwitz) Newsgroups: comp.sources.misc Subject: v16i086: mtf - Map tar filenames, Part02/02 Message-ID: <1991Jan29.012204.21626@sparky.IMD.Sterling.COM> Date: 29 Jan 91 01:22:04 GMT Sender: kent@sparky.IMD.Sterling.COM (Kent Landfield) Organization: University of Chicago Lines: 124 Approved: kent@sparky.imd.sterling.com X-Checksum-Snefru: ce717875 6dadda8e 8e253424 3ae1c67c Submitted-by: goer@midway.uchicago.edu (Richard L. Goerwitz) Posting-number: Volume 16, Issue 86 Archive-name: mtf/part02 ---- Cut Here and feed the following to sh ---- #!/bin/sh # this is mtf.02 (part 2 of a multipart archive) # do not concatenate these parts, unpack them in order with /bin/sh # file README continued # if test ! -r _shar_seq_.tmp; then echo 'Please unpack part 1 first!' exit 1 fi (read Scheck if test "$Scheck" != 2; then echo Please unpack part "$Scheck" next! exit 1 else exit 0 fi ) < _shar_seq_.tmp || exit 1 if test ! -f _shar_wnt_.tmp; then echo 'x - still skipping README' else echo 'x - continuing file README' sed 's/^X//' << 'SHAR_EOF' >> 'README' && Xto leave unscathed by the mapping process (single-character extensions Xsuch as .c and .o are automatically preserved; -e allows the user to Xspecify additional extensions, such as .pxl, .cpi, and .icn). The Xfinal switch, -x, precedes a list of strings which should not be Xmapped at all. Use this switch if, say, you have a C file with a Xstructure.field combination such as "thisisveryverybig.hashptr" in an Xarchive that contains a file called "thisisveryverybig.h," and you Xwant to avoid mapping that portion of the struct name which matches Xthe name of the overlong file (to wit, "mtf inputfile -x Xthisisveryverybig.hashptr"). To prevent mapping of any string X(including overlong filenames) beginning, say, with "thisisvery," use X"mtf inputfile -x thisisvery." Be careful with this option, or you Xmight end up defeating the whole point of using mtf in the first Xplace. X XBUGS: Can't handle non-text files. If any occur in the archive, mtf Xwill either abort, or perform a faulty conversion. See the source Xfile for specifics. Mtf is also annoyingly slow. X X--------------------------------------------------------------------- XWhat is Icon? Icon is the successor language to SNOBOL. Like SNOBOL, XIcon has excellent string-processing facilities. Unlike SNOBOL, Xthough, Icon has a modern, procedural structure, and offers control Xstructures like those offered by Algol-family languages. Though Icon Xis not, strictly speaking, a declarative language, it nevertheless Xincorporates control, and optional data, backtracking, much like what Xwe find in languages like Prolog. Awk programmers will feel at home Xwith Icon's hash tables, a data-type which implements associative Xarrays. Programmers used to having storage handled automatically will Xhappily avail themselves of Icon's automatic garbage collection Xmechanisms. Icon is not meant for low-level or hardware-specific Xtasks. Instead, Icon is more of a general-purpose language good for Xrapid prototyping, and for extremely compact solution of string- and Xsymbol-processing problems. X XWhere can you get Icon? It can be ftp'd from cs.arizona.edu. Icon is Ximplemented on most personal computers, workstations, and many minis Xand mainframes. Those without ftp access should write to icon-project Xat arizona.edu for more information. X XIcon is free (except for possible mailing/handling charges), supported Xmainly by contribution and government grant. There is really no Xreason not to have a copy around. X X-Richard (goer@sophist.uchicago.edu) SHAR_EOF echo 'File README is complete' && true || echo 'restore of README failed' rm -f _shar_wnt_.tmp fi # ============= Makefile.dist ============== if test -f 'Makefile.dist' -a X"$1" != X"-c"; then echo 'x - skipping Makefile.dist (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting Makefile.dist (Text)' sed 's/^X//' << 'SHAR_EOF' > 'Makefile.dist' && XPROGNAME = mtf X X# Please edit these to reflect your local file structure & conventions. XDESTDIR = /usr/local/bin XOWNER = bin XGROUP = bin X X# I hope you won't have to use this. XDEBUGFLAG = #-t X X$(PROGNAME): $(PROGNAME).icn X icont $(DEBUGFLAG) $(PROGNAME).icn X X# Pessimistic assumptions regarding the environment (in particular, X# I don't assume you have the BSD "install" shell script). Xinstall: $(PROGNAME) X @sh -c "test -d $(DESTDIR) || (mkdir $(DESTDIR) && chmod 755 $(DESTDIR))" X cp $(PROGNAME) $(DESTDIR)/ X chgrp $(GROUP) $(DESTDIR)/$(PROGNAME) X chown $(OWNER) $(DESTDIR)/$(PROGNAME) X @echo "\nInstallation done.\n" X Xclean: X -rm -f *.u X -rm -f $(PROGNAME) SHAR_EOF true || echo 'restore of Makefile.dist failed' rm -f _shar_wnt_.tmp fi rm -f _shar_seq_.tmp echo You have unpacked the last part exit 0 exit 0 # Just in case... -- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM Sterling Software, IMD UUCP: uunet!sparky!kent Phone: (402) 291-8300 FAX: (402) 291-4362 Please send comp.sources.misc-related mail to kent@uunet.uu.net.