From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.devel Subject: Re: bindat docs on length of str, strz, etc types Date: Thu, 28 Dec 2006 10:38:09 +1100 Message-ID: <87irfwrjtq.fsf@zip.com.au> References: <87r6ulq8qs.fsf@zip.com.au> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167262719 22718 80.91.229.10 (27 Dec 2006 23:38:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Dec 2006 23:38:39 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 28 00:38:37 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GziLt-0007S9-E7 for ged-emacs-devel@m.gmane.org; Thu, 28 Dec 2006 00:38:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GziLs-0002bV-Me for ged-emacs-devel@m.gmane.org; Wed, 27 Dec 2006 18:38:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GziLd-0002Xi-6p for emacs-devel@gnu.org; Wed, 27 Dec 2006 18:38:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GziLb-0002US-Id for emacs-devel@gnu.org; Wed, 27 Dec 2006 18:38:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GziLb-0002UH-Dj for emacs-devel@gnu.org; Wed, 27 Dec 2006 18:38:11 -0500 Original-Received: from [61.8.2.215] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GziLa-0002uU-Pr for emacs-devel@gnu.org; Wed, 27 Dec 2006 18:38:11 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 7E28E5AFCAC; Thu, 28 Dec 2006 10:38:07 +1100 (EST) Original-Received: from localhost (ppp2ABA.dyn.pacific.net.au [61.8.42.186]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 0EE782740C; Thu, 28 Dec 2006 10:38:07 +1100 (EST) Original-Received: from gg by localhost with local (Exim 4.63) (envelope-from ) id 1GziLZ-0001xX-3x; Thu, 28 Dec 2006 10:38:09 +1100 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Thu, 28 Dec 2006 00:06:11 +0100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64380 Archived-At: storm@cua.dk (Kim F. Storm) writes: > > ((marker u16) > (length u16) > (data str (eval (- last 2)))) Thanks, it works. While you're at it, I got a bit confused by strz at first. I wanted to match a variable-length field that stopped at a 0 byte and I tried leaving out the length, which didn't work of course. Maybe it could say something like A zero-terminated string, in a fixed-length field of LEN bytes.