Yeah, nick vsprintf from linux 0.01 and build around that. That's what I and most people do. Printf is hugely monolithic and difficult to debug without... you guessed it, printfs!
Maybe you find this interesting : http://freenet-homepage.de/puppylinux/index.html
This what I am working on, it is for Dex OS ,output is fasm but
i think you could easy adapt the funktions.
If you need halp let me know.!
Hope it help
Bye
Yeah, nick vsprintf from linux 0.01 and build around that. That's what I and most people do. Printf is hugely monolithic and difficult to debug without... you guessed it, printfs!
Ya know, I opened this thread thinking "I'll add that Linux 0.01 printf is easy to port", and you guys beat me to it.
And use the Linux 0.01 version, there are less file that you don't need so you find the file easier.
PDCLib printf() doesn't do floating points (yet), but is otherwise complete (padding, alignment, ...) and - it's Public Domain, meaning you don't have to place your printf() under GPL as you would have if you took Linux as a starting point. See my signature.
Every good solution is obvious once you've found it.
Solar wrote:PDCLib printf() doesn't do floating points (yet), but is otherwise complete (padding, alignment, ...) and - it's Public Domain, meaning you don't have to place your printf() under GPL as you would have if you took Linux as a starting point. See my signature.
I don't think the initial Linux kernel release was under the GPL, it was under fairly simplistic licence that simply disallowed selling it commercially IIRC.
But I agree, even that is a bit... restrictive.
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
I don't actually even remember there being a license for 0.01...just a copyright. Can't remember.
On the topic of printf()'s, you could use Chris Giese's doprintf and friends. There doesn't seem to be a copyright anywhere, so I'm assuming it's public domain. Some things aren't implemented, but it gives a nice base to extend upon.