From owner-freebsd-hackers Wed Aug 2 13:29:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cicuta.babolo.ru (babolo.ru [194.58.226.160]) by hub.freebsd.org (Postfix) with ESMTP id A88D737BDF2 for ; Wed, 2 Aug 2000 13:29:29 -0700 (PDT) (envelope-from babolo@cicuta.babolo.ru) Received: (from babolo@localhost) by cicuta.babolo.ru (8.9.3/8.9.3) id AAA00827 for freebsd-hackers@FreeBSD.ORG; Thu, 3 Aug 2000 00:29:46 +0400 (MSD) (envelope-from babolo) Received: (from babolo@localhost) by cicuta.babolo.ru (8.9.3/8.9.3) id AAA00804; Thu, 3 Aug 2000 00:23:28 +0400 (MSD) (envelope-from babolo) Message-Id: <200008022023.AAA00804@cicuta.babolo.ru> Subject: Re: malloc to arrays? In-Reply-To: <200008021937.MAA01443@mass.osd.bsdi.com> from "Mike Smith" at "Aug 2, 2000 12:37:14 pm" To: "Mike Smith" Date: Thu, 3 Aug 2000 00:23:28 +0400 (MSD) Cc: "Daniel C. Sobral" , chris@calldei.com, freebsd-hackers@FreeBSD.ORG From: .@babolo.ru Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [Charset iso-8859-1 unsupported, filtering to ASCII...] > > It's only "clear" insofar as it's "clear" that the code is terrible. Sorry I know English bad, do you want to say that my code is terrible? > Coffee first, critique second. 8) > > > #define TCPCASH_ROWSIZE 256 > > #define TCPCASH_COLSIZE 256 > > #define TCPCASH_ADDR(x) ((x) * TCPCASH_ROWSIZE) > > #define TCPCASH_ADDR(x,y) ((y) * TCPCASH_ROWSIZE + (x)) Yes I know that I will use tcpcashe_addr(x,y) instead of [x][y], (thank for cash -> cashe) with some macro declarations, but it is something artificial for array of array representation: [0,0][0,1]...[0,255][1,0][1,1]...[1,255]... with statically unknown first index range. -- Александр А. Бабайлов mailto://babolo@links.ru/ http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message