From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn To: Colin Ford Cc: eCos Subject: Re: [ECOS] sprintf problem in redboot? Date: Fri, 08 Jun 2001 02:27:00 -0000 Message-id: <20010608112656.I6803@biferten.ma.tech.ascom.ch> References: <200106080914.KAA17595@cartman.pipinghotnetworks.com> <200106080915.KAA18056@cartman.pipinghotnetworks.com> X-SW-Source: 2001-06/msg00226.html On Fri, Jun 08, 2001 at 10:15:23AM +0100, Colin Ford wrote: No it does not support %%. The ? means it does not understand the format string. Look in packages/redboot/current/src/printf.c It seems easy to fix through. Alternativly this should work: sprintf( buf, "%c%dc", `%`,5); Andrew > Sorry I ment > > sprintf( buf, "%%%dc", 5 ); > > Cheers, > Col. > > > On 08 Jun 2001 10:14:05 +0100, Colin Ford wrote: > > Hi, > > > > does anyone know if redboots sprintf evaluates the > > code below properly. > > > > sprintf( buf, "%%%d%c", 5 ); > > > > I seem to get "?5c" when I was expecting "%5c" in buf? > > > > Cheers, > > Col. > > > > -- > > =========================================== > > Colin Ford PipingHot Networks > > Software Engineer +44 (0)1364 655510 > > > > -- > =========================================== > Colin Ford PipingHot Networks > Software Engineer +44 (0)1364 655510 >