[U-Boot] [PATCH v4 04/13] Add isblank

Jason Hobbs jason.hobbs at calxeda.com
Wed Aug 24 17:40:31 CEST 2011


On Tue, Aug 23, 2011 at 05:40:35PM -0400, Mike Frysinger wrote:
> On Tuesday, August 23, 2011 17:06:52 Jason Hobbs wrote:
> > Existing ctype checks are implemented using a 256 byte lookup table,
> > allowing each character to be in any of 8 character classes. Since there
> > are 8 existing character classes without the blank class, I implemented
> > isblank without using the lookup table.  Since there are only two blank
> > characters - tab and space - this is a more reasonable approach than
> > doubling the size of the lookup table to accommodate one more class.
> 
> and isspace() doesnt work because ... ?

Because isspace matches characters other than tab and space, like end of
line, which isn't always desired.

Jason


More information about the U-Boot mailing list