summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-09-10 22:48:41 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-09-10 22:48:41 (GMT)
commit3b797b51b1cb45323e31deb42e2f9f95d0c877c0 (patch)
treece9959d1902b050527cee4ac4a65e7b3fe4f1639
parenta19fa7cdab3e5494e84dd29f64a39ccef1c7e138 (diff)
downloadtcl-3b797b51b1cb45323e31deb42e2f9f95d0c877c0.zip
tcl-3b797b51b1cb45323e31deb42e2f9f95d0c877c0.tar.gz
tcl-3b797b51b1cb45323e31deb42e2f9f95d0c877c0.tar.bz2
Incomplete docs for [binary encode] and [binary decode].
-rw-r--r--ChangeLog3
-rw-r--r--doc/binary.n24
2 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index be63310..99362ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-09-10 Donal K. Fellows <dkf@users.sf.net>
+ * doc/binary.n: Added partial documentation of [binary encode] and
+ [binary decode].
+
* tests/binary.test,cmdAH.test,cmdIL.test,cmdMZ.test,fileSystem.test:
More use of tcltest2 to simplify the tests as exposed to people.
* tests/compile.test (compile-18.*): Added *some* tests of the
diff --git a/doc/binary.n b/doc/binary.n
index 95373fb..a850205 100644
--- a/doc/binary.n
+++ b/doc/binary.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: binary.n,v 1.39 2008/06/29 22:28:24 dkf Exp $
+'\" RCS: @(#) $Id: binary.n,v 1.40 2008/09/10 22:48:41 dkf Exp $
'\"
.so man.macros
.TH binary n 8.0 Tcl "Tcl Built-In Commands"
@@ -13,6 +13,12 @@
.SH NAME
binary \- Insert and extract fields from binary strings
.SH SYNOPSIS
+.VS 8.6
+\fBbinary decode \fIformat\fR ?\fI-option value ...\fR? \fIdata\fR
+.br
+\fBbinary encode \fIformat\fR ?\fI-option value ...\fR? \fIdata\fR
+.br
+.VE 8.6
\fBbinary format \fIformatString \fR?\fIarg arg ...\fR?
.br
\fBbinary scan \fIstring formatString \fR?\fIvarName varName ...\fR?
@@ -20,12 +26,22 @@ binary \- Insert and extract fields from binary strings
.SH DESCRIPTION
.PP
This command provides facilities for manipulating binary data. The
-first form, \fBbinary format\fR, creates a binary string from normal
+subcommand \fBbinary format\fR creates a binary string from normal
Tcl values. For example, given the values 16 and 22, on a 32-bit
architecture, it might produce an 8-byte binary string consisting of
-two 4-byte integers, one for each of the numbers. The second form of
-the command, \fBbinary scan\fR, does the opposite: it extracts data
+two 4-byte integers, one for each of the numbers. The subcommand
+\fBbinary scan\fR, does the opposite: it extracts data
from a binary string and returns it as ordinary Tcl string values.
+.VS 8.6
+The \fBbinary encode\fR and \fBbinary decode\fR subcommands convert
+binary data to or from string encodings such as base64 (used in MIME
+messages for example).
+.VE 8.6
+.SH "BINARY ENCODE AND DECODE"
+.VS 8.6
+.PP
+\fIFIXME!\fR
+.VE 8.6
.SH "BINARY FORMAT"
.PP
The \fBbinary format\fR command generates a binary string whose layout