From owner-cvs-all Tue Feb 13 15:47:20 2001 Delivered-To: cvs-all@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 13CBA37B4EC; Tue, 13 Feb 2001 15:47:08 -0800 (PST) Received: (from ache@localhost) by nagual.pp.ru (8.11.2/8.11.2) id f1DNl6n50563; Wed, 14 Feb 2001 02:47:06 +0300 (MSK) (envelope-from ache) Date: Wed, 14 Feb 2001 02:47:04 +0300 From: "Andrey A. Chernov" To: Alexey Zelkin Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/locale ldpart.c ldpart.h Message-ID: <20010214024703.A50476@nagual.pp.ru> References: <200102131529.f1DFTd323798@freefall.freebsd.org> <20010214003753.A37536@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010214003753.A37536@nagual.pp.ru>; from ache@nagual.pp.ru on Wed, Feb 14, 2001 at 12:37:54AM +0300 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Feb 14, 2001 at 00:37:54 +0300, Andrey A. Chernov wrote: > On Tue, Feb 13, 2001 at 07:29:39 -0800, Alexey Zelkin wrote: > > phantom 2001/02/13 07:29:39 PST > > > > Modified files: > > lib/libc/locale ldpart.c ldpart.h > > Log: > > add additional function parameter: bufsize_min. it's possible > > to check two sizes per one function invocation now. > > Why only two hardcoded? It prevents additional locale extensions - there > must be unlimited number of possible extensions. It means that ldpart must > just return line count, and upper level code must decide which level of > extensions used and what actions are needed to compensate missing > parts for each returned line count. In "C" terms I mean something like: ret = load_part(... &line_count, ..., &using_that_locale, ...) if (ret == 0 && using_that_locale) { if (line_count < EXT1) { /* min */ compensate_ext1; } if (line_count < EXT2) { /* EXT2 > EXT1 */ compensate_ext2; } ... EXT3, etc. ... /* EXT3 > EXT2, etc. */ } -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message