diff options
author | Dmitry Bogatov <KAction@debian.org> | 2018-11-15 15:59:22 +0000 |
---|---|---|
committer | Dmitry Bogatov <KAction@debian.org> | 2018-11-15 15:59:22 +0000 |
commit | ef18215493fbf5180b9a9b016ac70e0f3766f59c (patch) | |
tree | 50d0a9326af5bde662af0c9d68a30e7fa9da32da /tdate_parse.c | |
parent | f8fad52c70a50762444785c2cfdbf617d288684e (diff) |
Import Upstream version 1.21
Diffstat (limited to 'tdate_parse.c')
-rw-r--r-- | tdate_parse.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tdate_parse.c b/tdate_parse.c index ac9d2ca..a7ea7fa 100644 --- a/tdate_parse.c +++ b/tdate_parse.c @@ -59,12 +59,13 @@ pound_case( char* str ) } } + static int -strlong_compare( v1, v2 ) - char* v1; - char* v2; +strlong_compare( const void* v1, const void* v2 ) { - return strcmp( ((struct strlong*) v1)->s, ((struct strlong*) v2)->s ); + const struct strlong* s1 = (const struct strlong*) v1; + const struct strlong* s2 = (const struct strlong*) v2; + return strcmp( s1->s, s2->s ); } @@ -170,7 +171,7 @@ tm_to_time( struct tm* tmP ) /* Years since epoch, converted to days. */ t = ( tmP->tm_year - 70 ) * 365; - /* Leap days for previous years. */ + /* Leap days for previous years - this will break in 2100! */ t += ( tmP->tm_year - 69 ) / 4; /* Days for the beginning of this month. */ t += monthtab[tmP->tm_mon]; |