From owner-svn-src-all@FreeBSD.ORG Mon Mar 8 20:29:24 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 9DA26106566C; Mon, 8 Mar 2010 20:29:24 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id ED8668FC15; Mon, 8 Mar 2010 20:29:23 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o28KTKm3068066; Mon, 8 Mar 2010 23:29:20 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1268080161; bh=79gT5UUhGKWQG5kgKRcMmz17CjKO2/m9xAk8sTJyFCw=; l=692; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=WM3Nkge4LNxOMNecIK7hiH+QDlrwhlP262AYZ9Zc1xl5+KmFGzuEL8ErUSj36ELjh aKHDmAQQLTs0qZUfpo5yB49+lsXq7FfrYpmwPrZVDkHlPfO4hir0l/PXfFERJKozrW yZWLWL91ZZQYaNY8orL1g6HFTx+U94KcWIpsWv9s= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o28KTKlC068065; Mon, 8 Mar 2010 23:29:20 +0300 (MSK) (envelope-from ache) Date: Mon, 8 Mar 2010 23:29:19 +0300 From: Andrey Chernov To: Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20100308202919.GA67990@nagual.pp.ru> 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> <20100308195123.GA10624@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100308195123.GA10624@zim.MIT.EDU> User-Agent: Mutt/1.5.20 (2009-06-14) 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 20:29:24 -0000 On Mon, Mar 08, 2010 at 02:51:23PM -0500, David Schultz wrote: > You can actually just call getline() rather than reinventing the > wheel. See just committed version. I use getline(3) (POSIX one). > 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. It does not help, since wide version will fail on EILSEQ with sync lost, as getwc() does. Initially I was thinking about ftell+fseek back, but not all files are seekable. BTW, I plan to made similar changes to comm(1) too, it suffer from the same EILSEQ problem. -- http://ache.pp.ru/