From owner-svn-src-all@FreeBSD.ORG Mon Mar 8 19:51:25 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84CFE1065676; Mon, 8 Mar 2010 19:51:25 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 0EC208FC13; Mon, 8 Mar 2010 19:51:24 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o28JpOwI010775; Mon, 8 Mar 2010 14:51:24 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o28JpN3a010774; Mon, 8 Mar 2010 14:51:23 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Mon, 8 Mar 2010 14:51:23 -0500 From: David Schultz To: Andrey Chernov , Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20100308195123.GA10624@zim.MIT.EDU> Mail-Followup-To: Andrey Chernov , Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> <20100308015926.O11669@delplex.bde.org> <20100307183139.GA50243@nagual.pp.ru> <20100307201027.GA51623@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100307201027.GA51623@nagual.pp.ru> Cc: Subject: Re: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 19:51:25 -0000 On Sun, Mar 07, 2010, Andrey Chernov wrote: > On Sun, Mar 07, 2010 at 09:31:39PM +0300, Andrey Chernov wrote: > > It is right idea. I'll use sysconf(__SC_LINE_MAX) there. > > But currently it does the same (sysconf.c): > > case _SC_LINE_MAX: > > return (LINE_MAX); > ... > > To add more: > > NetBSD uniq grows (contrary, NetBSD comm silently discarding everything > > afterwards). > > OpenBSD uniq just use fgets with 8192. > > GNU uniq grows. > > After thinking a bit more I consider to reimplement unlimited lines here > instead because enforcing POSIX limit was not the main goal of my commit > (it was to remove getwc() which is evil). Someone may deal with the limit > on his own way afterwards. Good. I think it's better for usability if we avoid artificial limits like this. You can actually just call getline() rather than reinventing the wheel. I've had a wide character version of getline() ready to commit for some time (I just need to find the time to do it), so you won't need to call mbstowcs() as a separate step.