4.0956 Icon Conversion/Encoding Programs (2/114)

Elaine Brennan & Allen Renear (EDITORS@BROWNVM.BITNET)
Wed, 30 Jan 91 09:36:48 EST

Humanist Discussion Group, Vol. 4, No. 0956. Wednesday, 30 Jan 1991.


(1) Date: Sun, 27 Jan 91 18:45:05 CST (47 lines)
From: Richard Goerwitz <goer@sophist.uchicago.edu>
Subject: UNIX->DOS conversion

(2) Date: Sun, 27 Jan 91 18:32:15 CST (67 lines)
From: Richard Goerwitz <goer@sophist.uchicago.edu>
Subject: xxencode/uuencode programs

(1) --------------------------------------------------------------------
Date: Sun, 27 Jan 91 18:45:05 CST
From: Richard Goerwitz <goer@sophist.uchicago.edu>
Subject: UNIX->DOS conversion


Contained in this distribution are two Icon programs, the one (yescr)
used to translate UNIX into MS-DOS text-files, the other (nocr) used
to perform the opposite conversion.

Save all text from the first "cut here" line to the second to a file.
Call it "nocr.icn" (but remember to discard the "cut here" line it-
self). Save the source code from the second "cut here" line to the
end of the file as "yescr.icn" (again, remember to discard the "cut
here" line itself. When done, type -

icont yescr.icn
icont nocr.icn

The result will be two files executable either by typing their
names (yescr/nocr), or else by typing "ficonx yescr" or "ficonx
nocr." It depends on how your Icon installation works.

Naturally, I assume you have Icon installed. If you don't, please
talk to your local system adminstrator. It can be obtained for free
from cs.arizona.edu, and there really is no excuse for a major re-
search institution (or in fact, any computation center claiming to
support our needs) not having Icon.

These programs have been tested under UNIX, and some under DOS. I
use them on my Xenix box here at home when transferring files to my
PC.

-Richard Goerwitz (goer@sophist.uchicago.edu)


--------------------

[A complete version of these Icon files is now available through the
fileserver, s.v. ICON UNIX-DOS. You may obtain a copy by issuing
the command -- GET filename filetype HUMANIST -- either interactively or
as a batch-job, addressed to ListServ@Brownvm. Thus on a VM/CMS system,
you say interactively: TELL LISTSERV AT BROWNVM GET filename filetype
HUMANIST; if you are not on a VM/CMS system, send mail to
ListServ@Brownvm with the GET command as the first and only line. For
more details see the "Guide to Humanist". Problems should be reported
to David Sitman, A79@TAUNIVM, after you have consulted the Guide and
tried all appropriate alternatives.]
(2) --------------------------------------------------------------535---
Date: Sun, 27 Jan 91 18:32:15 CST
From: Richard Goerwitz <goer@sophist.uchicago.edu>
Subject: xxencode/uuencode programs


The following is a source code posting of iiencode and iidecode, pro-
grams which combine the functionality of both uuencode/uudecode and
xxencode/xxdecode file transmission utilities. Some editing will be
necessary in order to separate documentation and source files. I'll
gladly send a shell archive to anyone who asks for it.

-Richard

----------------------------------------------------------------------

Included in this package are two Icon source files, iiencode.icn and
iidecode.icn. When compiled, these will yield icode files which
emulate the Unix uuencode and uudecode commands. They are supposed to
be completely compatible with all existing uuen/decode versions, and
are patterned after latest publicly distributable BSD C source code.

For those who are working at sites subject to the vicissitudes of
ASCII<->EBCDIC translation, an extra switch (-x) is included that
makes iiencode/iidecode produce/extract xxencode-format files (which
do not get mangled when moving through non-ASCII sites). Before using
this switch with the uuencode command, make sure that the person to
receive the coded transmission can unpack xxencoded files.

Iiencode and iidecode have been tested under Unix and Xenix, and work
fine. They have received brief testing under MS-DOS, and appear to
work there as well.

For systems which use some other sequence in place of UNIX LFs (e.g.
MS-DOS), there is a special iiencode switch, -o filename, which
directs iiencode to send its output to filename instead of &output.
This makes it possible to strip out trailing carriage returns, and
write an output file in UNIX format.

Iien/decode are written in Icon, which is extremely portable. Anyone
with an Icon interpreter or compiler can install them. And, since
Icon is free (obtainable from the U. of Arizona at cs.arizona.edu),
the programs really are without cost of any kind.

If you have Icon already, save the text from the first "cut here"
line to the second (discard the cut here line itself) as iiencode.icn.
Save from the second (again discarding the cut here line itself) to
the end of the file as iidecode. You can then compile these files
by typing

icont iiencode.icn
icont iidecode.icn

Note that these programs are not lightning fast. :-)

-Richard (goer@sophist.uchicago.edu)
--------------------

[A complete version of these files is now available through the
fileserver, s.v. IIENCODE IIDECODE. You may obtain a copy by issuing
the command -- GET filename filetype HUMANIST -- either interactively or
as a batch-job, addressed to ListServ@Brownvm. Thus on a VM/CMS system,
you say interactively: TELL LISTSERV AT BROWNVM GET filename filetype
HUMANIST; if you are not on a VM/CMS system, send mail to
ListServ@Brownvm with the GET command as the first and only line. For
more details see the "Guide to Humanist". Problems should be reported
to David Sitman, A79@TAUNIVM, after you have consulted the Guide and
tried all appropriate alternatives.]