> > 1.  I'd say that code like "if ( sizeof(number) == 8 )" should have
> > been a compile-time #ifdef rather than a run-time decision.
> 
> Where do you see such code?  grep 'if.*sizeof' *.c doesn't seem to
> show such examples.

   As I recall, it was in someone's suggested changes.  Perhaps:

      http://software.lpetrov.net/wget-LFS/wget-LFS-20041113.patch

> > 2.  Multiple functions like print_number_as_string() and
> > print_second_number_as_string() (and so on?) look like a real pain
> > to use.
> 
> They're just a hack to get multiple %s's to work.  If you have a
> better idea of how to code them, feel free to suggest!
> 
> > The Info-ZIP code uses one function with a ring of string buffers to
> > ease the load on the programmer.
> 
> That makes sense.  I assume the print function also receives an
> integer argument specifying the ring position?

   Why assume?  Why not look?

[...]

> You're right, that's much better.  I've now written a new version that
> does away with the "_second" function.  The caller still has to be
> aware of the ring size limitation, but that's hard to avoid without
> making the interface hairier.

   Say, is that wheel your own invention?

> > Correct, use "%I64d" for signed 64-bit and "%I64u" for unsigned.

   Well, I've posted pointers to Info-ZIP code which handles this stuff,
and I've posted code segments which I thought were suggestive, but I
can't _force_ you to _read_ any of it, just as I couldn't force you to
include other suggestions I've made about portability to VMS, proper
handling of VMS FTP servers, or time-stamping problems.  But, as I said,
it's not my program.

------------------------------------------------------------------------

   Steven M. Schweda               (+1) 651-699-9818
   382 South Warwick Street        [EMAIL PROTECTED]
   Saint Paul  MN  55105-2547

Reply via email to