Re: [htdig3-dev] either a bug, or my ignorance, both are


Geoff Hutchison (ghutchis@wso.williams.edu)
Wed, 7 Apr 1999 19:27:12 -0400 definately possible :)


At 5:14 PM -0400 4/7/99, Gilles Detillieux wrote:
>Yes, as you've figured out, when you declare a structure like this in
>a function, it's just allocated on top of existing memory, without any
>sort of initialisation or zeroing out. For all intents and purposes,
>you can consider its contents to be random. You must explicitly
>initialise the structure members...

Well, more accurately it *might* be random. Hans-Peter is free to correct
me, but if I remember my language references, the compile *can* initialize,
but is not required to.

In my case, I seem to be pampered (or I'm generating some sort of
reality-distortion field) because it works smoothly--zeros out everything
that isn't set explicitly. Portability, though is a consideration. :-)

>time, as they are now. I believe that if you use mktime() instead of
>timegm() or mytimegm() to convert your start & end of range tm structures
>to time_t, it will convert from the local time zone. Give it a try.

Yes:

       The mktime() function converts a broken-down time struc-
       ture, expressed as local time, to calendar time represen-
       tation. The function ignores the specified contents of
       the structure members tm_wday and tm_yday and recomputes
       them from the other information in the broken-down time
       structure. Calling mktime() also sets the external vari-
       able tzname with information about the current time zone.

-Geoff

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
htdig3-dev@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Wed Apr 07 1999 - 16:46:59 PDT