1998-04-04 07:15:02 +00:00
|
|
|
\section{Standard Module \module{binhex}}
|
1998-07-23 17:59:49 +00:00
|
|
|
\declaremodule{standard}{binhex}
|
|
|
|
|
|
|
|
\modulesynopsis{Encode and decode files in binhex4 format.}
|
|
|
|
|
1998-02-19 18:29:18 +00:00
|
|
|
|
|
|
|
This module encodes and decodes files in binhex4 format, a format
|
1998-04-04 07:15:02 +00:00
|
|
|
allowing representation of Macintosh files in \ASCII{}. On the Macintosh,
|
1998-02-19 18:29:18 +00:00
|
|
|
both forks of a file and the finder information are encoded (or
|
|
|
|
decoded), on other platforms only the data fork is handled.
|
|
|
|
|
1998-04-04 07:15:02 +00:00
|
|
|
The \module{binhex} module defines the following functions:
|
1998-02-19 18:29:18 +00:00
|
|
|
|
1998-03-17 06:33:25 +00:00
|
|
|
\begin{funcdesc}{binhex}{input, output}
|
1998-02-19 18:29:18 +00:00
|
|
|
Convert a binary file with filename \var{input} to binhex file
|
|
|
|
\var{output}. The \var{output} parameter can either be a filename or a
|
|
|
|
file-like object (any object supporting a \var{write} and \var{close}
|
|
|
|
method).
|
|
|
|
\end{funcdesc}
|
|
|
|
|
1998-03-17 06:33:25 +00:00
|
|
|
\begin{funcdesc}{hexbin}{input\optional{, output}}
|
1998-02-19 18:29:18 +00:00
|
|
|
Decode a binhex file \var{input}. \var{input} may be a filename or a
|
|
|
|
file-like object supporting \var{read} and \var{close} methods.
|
|
|
|
The resulting file is written to a file named \var{output}, unless the
|
|
|
|
argument is empty in which case the output filename is read from the
|
|
|
|
binhex file.
|
|
|
|
\end{funcdesc}
|
|
|
|
|
|
|
|
\subsection{Notes}
|
|
|
|
There is an alternative, more powerful interface to the coder and
|
|
|
|
decoder, see the source for details.
|
|
|
|
|
|
|
|
If you code or decode textfiles on non-Macintosh platforms they will
|
1998-04-04 07:15:02 +00:00
|
|
|
still use the Macintosh newline convention (carriage-return as end of
|
1998-02-19 18:29:18 +00:00
|
|
|
line).
|
|
|
|
|
1998-04-04 07:15:02 +00:00
|
|
|
As of this writing, \function{hexbin()} appears to not work in all
|
|
|
|
cases.
|