1998-04-04 03:15:02 -04:00
|
|
|
\section{Standard Module \module{binhex}}
|
1998-02-19 14:29:18 -04:00
|
|
|
\label{module-binhex}
|
|
|
|
\stmodindex{binhex}
|
|
|
|
|
|
|
|
This module encodes and decodes files in binhex4 format, a format
|
1998-04-04 03:15:02 -04:00
|
|
|
allowing representation of Macintosh files in \ASCII{}. On the Macintosh,
|
1998-02-19 14:29:18 -04: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 03:15:02 -04:00
|
|
|
The \module{binhex} module defines the following functions:
|
1998-02-19 14:29:18 -04:00
|
|
|
|
1998-03-17 02:33:25 -04:00
|
|
|
\begin{funcdesc}{binhex}{input, output}
|
1998-02-19 14:29:18 -04: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 02:33:25 -04:00
|
|
|
\begin{funcdesc}{hexbin}{input\optional{, output}}
|
1998-02-19 14:29:18 -04: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 03:15:02 -04:00
|
|
|
still use the Macintosh newline convention (carriage-return as end of
|
1998-02-19 14:29:18 -04:00
|
|
|
line).
|
|
|
|
|
1998-04-04 03:15:02 -04:00
|
|
|
As of this writing, \function{hexbin()} appears to not work in all
|
|
|
|
cases.
|