From 3b797b51b1cb45323e31deb42e2f9f95d0c877c0 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Sep 2008 22:48:41 +0000 Subject: Incomplete docs for [binary encode] and [binary decode]. --- ChangeLog | 3 +++ doc/binary.n | 24 ++++++++++++++++++++---- 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 + * 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 -- cgit v0.12