From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwC45-0007jG-1s for qemu-devel@nongnu.org; Fri, 18 Jan 2013 08:33:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwC43-0002Vx-W6 for qemu-devel@nongnu.org; Fri, 18 Jan 2013 08:33:00 -0500 Received: from cantor2.suse.de ([195.135.220.15]:38642 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwC43-0002Vi-BM for qemu-devel@nongnu.org; Fri, 18 Jan 2013 08:32:59 -0500 Message-ID: <50F94F06.9040805@suse.de> Date: Fri, 18 Jan 2013 14:32:54 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1358360933-5323-1-git-send-email-ehabkost@redhat.com> <1358360933-5323-2-git-send-email-ehabkost@redhat.com> <874nieyfmd.fsf@blackfin.pond.sub.org> <20130118132646.GW10683@otherpad.lan.raisama.net> In-Reply-To: <20130118132646.GW10683@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/8] cutils: unsigned int parsing functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Laszlo Ersek , Chegu Vinod , Markus Armbruster , Anthony Liguori , qemu-devel@nongnu.org Am 18.01.2013 14:26, schrieb Eduardo Habkost: >=20 > On Fri, Jan 18, 2013 at 11:01:14AM +0100, Markus Armbruster wrote: >> Your list of error checks isn't quite complete. Here's my try: Even better would be: >> /** * parse_uint: >> * @s: String to parse >> * @value: Destination for parsed integer value >> * @endptr: Destination for pointer to first character not consumed >> * @base: integer base, between 2 and 36 inclusive, or 0 >> * * Parse unsigned integer >> * Parsed syntax is just like strol()'s: arbitrary whitespace, a singl= e >> * optional '+' or '-', an optional "0x" if @base is 0 or 16, one or >> * more digits. [snip] Cheers, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg