Re: [Etherboot-developers] Q: Non-Standard printf?
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ke...@us...> - 2002-07-26 01:45:53
|
>> You mean it doesn't pay attention to the width specifier? >Primarily. Though I think I have seen a few other anomolies as well. You should have seen it before the big rework circa 4.7.x. It used %b to print uchar, %x to print short, and %X to print int. Klaus and I made it conform to the glibc standard of %hhx, %hx and %x and the # modifier at least. Also it printed into a fixed sized buffer so I was always worried someone would print a long string. Now it doesn't matter how long a string it's passed. It made things a bit more familiar for people coming from mainstream printf. Direct compatibility with other sources wasn't a concern then, although I probably should have made it handle width specifiers so that porting from Linux drivers would have been slightly easier. >> That was never >> implemented, for space reasons. If you want to have better compatibility >> without using up much code space you could get the printf to ignore the >> width specifier. Simplest would be to skip [0-9 .] after seeing %. |