1998-08-10 21:42:37 +02:00
|
|
|
\section{\module{binhex} ---
|
1999-02-20 01:14:17 +01:00
|
|
|
Encode and decode binhex4 files}
|
1998-07-23 19:59:49 +02:00
|
|
|
|
1999-02-20 01:14:17 +01:00
|
|
|
\declaremodule{standard}{binhex}
|
1998-07-23 19:59:49 +02:00
|
|
|
\modulesynopsis{Encode and decode files in binhex4 format.}
|
|
|
|
|
1998-02-19 19:29:18 +01:00
|
|
|
|
|
|
|
This module encodes and decodes files in binhex4 format, a format
|
1998-04-04 09:15:02 +02:00
|
|
|
allowing representation of Macintosh files in \ASCII{}. On the Macintosh,
|
1998-02-19 19:29:18 +01: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 09:15:02 +02:00
|
|
|
The \module{binhex} module defines the following functions:
|
1998-02-19 19:29:18 +01:00
|
|
|
|
1998-03-17 07:33:25 +01:00
|
|
|
\begin{funcdesc}{binhex}{input, output}
|
1998-02-19 19:29:18 +01: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
|
1999-04-23 17:41:53 +02:00
|
|
|
file-like object (any object supporting a \method{write()} and
|
|
|
|
\method{close()} method).
|
1998-02-19 19:29:18 +01:00
|
|
|
\end{funcdesc}
|
|
|
|
|
1998-03-17 07:33:25 +01:00
|
|
|
\begin{funcdesc}{hexbin}{input\optional{, output}}
|
1998-02-19 19:29:18 +01:00
|
|
|
Decode a binhex file \var{input}. \var{input} may be a filename or a
|
1999-04-23 17:41:53 +02:00
|
|
|
file-like object supporting \method{read()} and \method{close()} methods.
|
1998-02-19 19:29:18 +01:00
|
|
|
The resulting file is written to a file named \var{output}, unless the
|
1999-04-23 17:41:53 +02:00
|
|
|
argument is omitted in which case the output filename is read from the
|
1998-02-19 19:29:18 +01:00
|
|
|
binhex file.
|
|
|
|
\end{funcdesc}
|
|
|
|
|
1999-04-23 17:41:53 +02:00
|
|
|
|
|
|
|
\begin{seealso}
|
|
|
|
\seemodule{binascii}{support module containing \ASCII{}-to-binary
|
|
|
|
and binary-to-\ASCII{} conversions}
|
|
|
|
\end{seealso}
|
|
|
|
|
|
|
|
|
1999-02-20 01:14:17 +01:00
|
|
|
\subsection{Notes \label{binhex-notes}}
|
|
|
|
|
1998-02-19 19:29:18 +01:00
|
|
|
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 09:15:02 +02:00
|
|
|
still use the Macintosh newline convention (carriage-return as end of
|
1998-02-19 19:29:18 +01:00
|
|
|
line).
|
|
|
|
|
1998-04-04 09:15:02 +02:00
|
|
|
As of this writing, \function{hexbin()} appears to not work in all
|
|
|
|
cases.
|