This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Add general strtoulst


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]