From owner-freebsd-hackers Fri Mar 30 7:20:14 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elfie.org (elfie.org [207.198.61.53]) by hub.freebsd.org (Postfix) with ESMTP id E720637B718 for ; Fri, 30 Mar 2001 07:20:11 -0800 (PST) (envelope-from franklin@elfie.org) Received: (from franklin@localhost) by elfie.org (8.11.0/8.10.2) id f2UFJT625308; Fri, 30 Mar 2001 10:19:29 -0500 (EST) Date: Fri, 30 Mar 2001 10:19:29 -0500 From: John Franklin To: Lord Isildur Cc: tech-kern@netbsd.org, freebsd-hackers@FreeBSD.ORG Subject: Re: Question regarding the array of size 0. Message-ID: <20010330101929.B24999@elfie.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.9i In-Reply-To: ; from mrfusion@umbar.vaxpower.org on Fri, Mar 30, 2001 at 09:54:20AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Mar 30, 2001 at 09:54:20AM -0500, Lord Isildur wrote: > which all begs the question... what is the point of an array of size > zero? it's just memory. you want a name that youre not spending any space > on storing? cook up a macro or something.. You can then read in a block of memory from a file or socket, cast the buffer to that data type and have the header and data all accessable via the same structure while leaving the sizeof(struct foo) equal to the header's size. jf -- John Franklin franklin@elfie.org ICBM: N37 12'54", W80 27'14" Z+2100' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message