Date: Fri, 30 Mar 2001 10:19:29 -0500 From: John Franklin <franklin@elfie.org> To: Lord Isildur <mrfusion@umbar.vaxpower.org> Cc: tech-kern@netbsd.org, freebsd-hackers@FreeBSD.ORG Subject: Re: Question regarding the array of size 0. Message-ID: <20010330101929.B24999@elfie.org> In-Reply-To: <Pine.3.89.10103300924.A22782-0100000@umbar>; from mrfusion@umbar.vaxpower.org on Fri, Mar 30, 2001 at 09:54:20AM -0500 References: <Pine.BSF.4.33.0103301000020.476-100000@beagle.fokus.gmd.de> <Pine.3.89.10103300924.A22782-0100000@umbar>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010330101929.B24999>