ogg.k.ogg.k at googlemail.com
2008-May-20 11:25 UTC
[ogg-dev] [PATCH] liboggplay - 64 bit fixes
> I believe that the right (ie ISO C standard recommended) way of doing > this is: > > printf("[%d] [duration %" PRId64 "] %s\n",C99 only, and ugly as hell (well, subjective, but I have trouble reading those). I can post an updated patch using this instead if preferred ?
ogg.k.ogg.k at googlemail.com wrote:> > I believe that the right (ie ISO C standard recommended) way of doing > > this is: > > > > printf("[%d] [duration %" PRId64 "] %s\n", > > C99 only,Well, we are a little over 6 months away from 2009, so maybe, just maybe it might be time to start coding to the ten year old standard :-). Besides, this is something that is very easy to implement for systems which aren't C99.> and ugly as hellIMO, its less ugly than the cast, but only just.> I can post an updated patch using this instead if preferred ?Not up to me, but I vote in favour of using C99 features where they can be and where its alos pretty easy to implement them for systems which aren't C99. Cheers, Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "Every day, as society progresses and the benefits of science and education spread, another tooth is yanked from jaw of religion. Just as Christianity went from wolf to lapdog in the Western world, so will go Islam." -- http://reddit.com/r/politics/info/6dv47/comments/c03krei
ogg.k.ogg.k at googlemail.com
2008-May-20 12:06 UTC
[ogg-dev] [PATCH] liboggplay - 64 bit fixes
> Besides, this is something that is very easy to implement for > systems which aren't C99.Good point.> IMO, its less ugly than the cast, but only just.Fair enough, maybe I can just parse casts as second nature, which is a scary thought :) I'll post an updated patch soon with the C99 macros instead.
On Tue, May 20, 2008 at 7:39 AM, Erik de Castro Lopo <mle+la at mega-nerd.com> wrote:> ogg.k.ogg.k at googlemail.com wrote: > >> > I believe that the right (ie ISO C standard recommended) way of doing >> > this is: >> > >> > printf("[%d] [duration %" PRId64 "] %s\n", >> >> C99 only, > > Well, we are a little over 6 months away from 2009, so maybe, > just maybe it might be time to start coding to the ten year > old standard :-).So long as the compilers people are using actually support the extension. Last I looked, C99 support was not something you could automatically count on. OTOH, I care about that slightly less in the tools than in the libs. The libs need to stay C89. Monty