[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] Re: printf in avr-libc
From: |
ken restivo |
Subject: |
[avr-libc-dev] Re: printf in avr-libc |
Date: |
Tue, 10 Sep 2002 17:41:04 -0700 |
User-agent: |
Mutt/1.3.25i |
Attached is a very small, trivial printf. Anyone's welcome to use it if they
see fit. I did it a long time ago, and haven't looked at it since, but it
worked at the time. I think I tested it with the UartSend routines in the old
avr-libc sample code.
I wrote this in order to:
1) Mix PSTR and memory variables in one printf, i.e.:
kprintf("my pstr is %S and my ram str is %s\n", pstr, str);
2) Automatically put the format into PSTR, i.e.:
kprintf("this string goes into PSTR automagically\n");
3) I only needed [xXdcsS] formats.
I still need to go back and combine the printSigned() and printUnsigned(), and
experiment to determine whether
nybble > 10 ? nybble + 'A' : nybble + '0'
is cheaper than the clunky PRG_RDB lookup I used. I suspect it will be.
-ken
---------
On Tue, Sep 10, 2002 at 11:20:34PM +0200, Joerg Wunsch wrote:
> As Jamie Morken wrote:
>
> > Here is a working printf that I downloaded from some unremembered place
> > awhile ago (it is not a full implementation but works well otherwise!)
> > http://www.rocketresearch.org/new/printf.zip
>
> That version once accompanied Marek's distribution of avr-libc (under
> `experimental' or something like that).
>
> We've at least got a copyright problem with it. For whatever reason,
> Alexander Popov blindly stuck a GPL in front of the BSD license that's
> apparently inherited from the original source code. Both are
> contradicionary to some extent, and i guess nobody really using
> avr-libc for their (non-hobbyist) projects is going to accept a GPL.
>
> Anyway, my hope was to get it somewhat smaller than this version. I
> already looked at the one in my FreeBSD system, but it looks already
> huge and twisted in the C code... Well, let's see. We can always
> fall back to the BSD version (and the copyright problem could easily
> be solved by simply starting to port it again straight from a BSD
>
> --
> J"org Wunsch Unix support engineer
> address@hidden http://www.interface-systems.de/~j/
>
>
> _______________________________________________
> AVR-libc-dev mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/avr-libc-dev
--
---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
kprintf.tar.gz
Description: Binary data
pgp8K9TfPvIuI.pgp
Description: PGP signature
- [avr-libc-dev] I fixed dtostre(), Joerg Wunsch, 2002/09/07
- Re: [avr-libc-dev] I fixed dtostre(), Joerg Wunsch, 2002/09/09
- [avr-libc-dev] Re: [avr-gcc-list] I fixed dtostre(), Jamie Morken, 2002/09/10
- Re: [avr-libc-dev] Re: [avr-gcc-list] I fixed dtostre(), Joerg Wunsch, 2002/09/10
- [avr-libc-dev] Re: printf in avr-libc,
ken restivo <=
- Re: [avr-libc-dev] Re: printf in avr-libc, E. Weddington, 2002/09/11
- Re: [avr-libc-dev] Re: printf in avr-libc, Joerg Wunsch, 2002/09/11
- [avr-libc-dev] Re: printf in avr-libc, Jörgen, 2002/09/12
- Re: [avr-libc-dev] Re: printf in avr-libc, Joerg Wunsch, 2002/09/12
- Re: [avr-libc-dev] Re: printf in avr-libc, Joerg Wunsch, 2002/09/12
- Re: [avr-libc-dev] Re: printf in avr-libc, Jörgen, 2002/09/12
- Re: [avr-libc-dev] Re: printf in avr-libc, E. Weddington, 2002/09/12
- [avr-libc-dev] Multithreaded strtok, Harald Kipp, 2002/09/13
- Re: [avr-libc-dev] Multithreaded strtok, Joerg Wunsch, 2002/09/13
- Re: [avr-libc-dev] Re: printf in avr-libc, Joerg Wunsch, 2002/09/13