mktime()

Steven Abner pheonix@zoomtown.com
Wed Sep 7 22:29:00 GMT 2011


On Aug 29, 2011, at 4:00 PM, Corinna Vinschen wrote:

> - You changed validate_structure to return some value, but you neglected
>  to add a comment to explain the innocent observer what is returned and
>  especially why you return it.
> 
> - Why did you add a `day' variable which is identical to tim_p->tm_mday
> 
> - The patch contains a couple of gratuitous changes which only change
>  the coding style for no apparent reason.  For instance whitespace
>  changes or a change from a while into a do...while loop without
>  changing the semantics.

Hi Corinna;
    I changed validate_structure back to its original state. Your comment about tm_mday gave me an idea. I went with what I consider a slightly more, hopefully well commented, complicated logic.
    The "gratuitous changes" were a combo of my debugging, easier for me to understand as its my style, and the white space was from the conversion process of taking my code, converting to text, and trying to match your style. It might just be a simple switch on diff/patch that might allow punctuation differences, but I am unaware of it. So to avoid the lengthly elimination of my debugging code, convert and test conversion process here is the C file. Please create the patch. If you opt for the validate_structure change instead, please let me know. If any questions on the comments, please let me know, as I will try to re-comment if comments are ambiguous or lacking. I've always had a problem with not commenting.
   Also, this time I only tested against the Mac tzfiles (which appears to use the nih code) to validate. I'm amidst a conceptual change in my code, optimization-al process, so this time couldn't validate that way. PS, Mac hasn't been able to handle the parsing of the last "EST+3EDT+2", so ignore. Not sure why, just know that yours always agreed with mine, pre/post updating.

Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib_mktime.c
Type: application/octet-stream
Size: 3560 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20110907/7f476a6e/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change_Log.txt
URL: <http://sourceware.org/pipermail/newlib/attachments/20110907/7f476a6e/attachment.txt>


More information about the Newlib mailing list