This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Add general strtoulst
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Thu, 21 Sep 2006 09:51:06 -0400
- Subject: Re: [patch] Add general strtoulst
- References: <20060816141547.GB21971@nevyn.them.org>
On Wed, Aug 16, 2006 at 10:15:47AM -0400, Daniel Jacobowitz wrote:
> For the flash patches I needed a routine to convert a string to a
> ULONGEST. There was one available, in ada-lex.l, so I moved it to
> utils.c. Along the way I made it more similar to strtoul:
>
> - Leading minus support.
> - BASE == 0 support, along with 0 and 0x prefixes.
> - Base from 2 to 36.
>
> This is a fairly obvious patch; I plan to check it in along with the
> flash code which uses it, when that is ready.
> 2006-08-16 Daniel Jacobowitz <dan@codesourcery.com>
>
> * ada-lex.l (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int)
> (strtoulst): Moved to ...
> * utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int)
> (strtoulst): ... here. Enhanced to behave more similarly
> to strtoul.
> * defs.h (strtoulst): New prototype.
Tested on x86_64-pc-linux-gnu and committed.
--
Daniel Jacobowitz
CodeSourcery