From: Eyal L. <ey...@ey...> - 2003-03-18 12:37:43
|
Nicholas Nethercote wrote: > > On Tue, 18 Mar 2003, Eyal Lebedinsky wrote: > > > I hope it complies with the current programming model and style (please > > let me know where it fails to do so). > > >From a quick glance, style looks ok. One thing: you use the "long" type > for VG_(clo_time_zone)... use the Valgrind synonyms (eg. Long, although I > think UInt would be ok here?) No, the timezone can be negative, so Int is probably what we want. I can do this change [attached]. And when hiding types, how do I do this: VG_(message)(Vg_UserMsg, "Time: %d/%02d/%02d %02d:%02d:%02d", tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec ); '%d' is good for 'int', what is the correct one for 'Int'? If I use '%ld' then I violated the type hiding. In C this is a problem and for this reason I prefer to use basic types wherever I can, and typedef only where actually necessary. -- Eyal Lebedinsky (ey...@ey...) <http://samba.org/eyal/> |