Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/2d5db505e70336e56e739d56d8ca358fc6bc4a6a
...commit
http://git.netsurf-browser.org/netsurf.git/commit/2d5db505e70336e56e739d56d8ca358fc6bc4a6a
...tree
http://git.netsurf-browser.org/netsurf.git/tree/2d5db505e70336e56e739d56d8ca358fc6bc4a6a
The branch, master has been updated
via 2d5db505e70336e56e739d56d8ca358fc6bc4a6a (commit)
via 30646c31454cb3effc7bba66ae74f0a4a708ebe0 (commit)
from 72277de6ead1324bbd7fa512e772d92e1f4b0951 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=2d5db505e70336e56e739d56d8ca358fc6bc4a6a
commit 2d5db505e70336e56e739d56d8ca358fc6bc4a6a
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Test: Add trailing whitespace and garbage datetime string parse tests.
diff --git a/test/time.c b/test/time.c
index 34cfac0..07e59e9 100644
--- a/test/time.c
+++ b/test/time.c
@@ -213,6 +213,10 @@ static const struct test_string_pair date_string_tests[] =
{
.expected = "Mon, 12 Dec 2005 00:00:00 GMT"
},
{
+ .test = "20051212 \n",
+ .expected = "Mon, 12 Dec 2005 00:00:00 GMT"
+ },
+ {
.test = "20051212 00:00 UTC",
.expected = "Mon, 12 Dec 2005 00:00:00 GMT"
},
@@ -233,6 +237,10 @@ static const struct test_string_pair date_string_tests[] =
{
.expected = "Thu, 11 Aug 2016 08:47:30 GMT"
},
{
+ .test = "Thu, 11 Aug 2016 08:47:30 GMT garbage",
+ .expected = "Thu, 11 Aug 2016 08:47:30 GMT"
+ },
+ {
.test = "Thu, 11 Aug 2016 08:47:30 UTC",
.expected = "Thu, 11 Aug 2016 08:47:30 GMT"
},
@@ -340,6 +348,10 @@ static const struct test_bad_string
date_bad_string_tests[] = {
.test = "Foosday, 16 Dec 1977 23:45:12 GMT",
.res = NSERROR_INVALID
},
+ {
+ .test = "20051212 garbage",
+ .res = NSERROR_INVALID
+ },
};
/**
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=30646c31454cb3effc7bba66ae74f0a4a708ebe0
commit 30646c31454cb3effc7bba66ae74f0a4a708ebe0
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Time: Micro-optimisation: Put GMT first in timezone list.
diff --git a/utils/time.c b/utils/time.c
index 14f4004..71fa30f 100644
--- a/utils/time.c
+++ b/utils/time.c
@@ -282,10 +282,13 @@ enum nsc_time_zone_offsets {
/**
* List of timezones.
*
- * The order here is the order they appear in the `timezone_mins` array.
- * So there is value in putting the most common timezones first.
+ * The order here is the order they appear in the `timezone_mins` and
+ * `timezones` arrays. So there is value in putting the most common
+ * timezones first.
*/
enum nsc_time_zones {
+ /** "GMT" first since its the only one I've seen in the wild. -- tlsa */
+ NSC_TIME_ZONE_GMT,
NSC_TIME_ZONE_IDLE,
NSC_TIME_ZONE_NZST,
NSC_TIME_ZONE_NZT,
@@ -299,7 +302,6 @@ enum nsc_time_zones {
NSC_TIME_ZONE_FWT,
NSC_TIME_ZONE_MET,
NSC_TIME_ZONE_MEWT,
- NSC_TIME_ZONE_GMT,
NSC_TIME_ZONE_UTC,
NSC_TIME_ZONE_WET,
NSC_TIME_ZONE_WAT,
-----------------------------------------------------------------------
Summary of changes:
test/time.c | 12 ++++++++++++
utils/time.c | 8 +++++---
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/test/time.c b/test/time.c
index 34cfac0..07e59e9 100644
--- a/test/time.c
+++ b/test/time.c
@@ -213,6 +213,10 @@ static const struct test_string_pair date_string_tests[] =
{
.expected = "Mon, 12 Dec 2005 00:00:00 GMT"
},
{
+ .test = "20051212 \n",
+ .expected = "Mon, 12 Dec 2005 00:00:00 GMT"
+ },
+ {
.test = "20051212 00:00 UTC",
.expected = "Mon, 12 Dec 2005 00:00:00 GMT"
},
@@ -233,6 +237,10 @@ static const struct test_string_pair date_string_tests[] =
{
.expected = "Thu, 11 Aug 2016 08:47:30 GMT"
},
{
+ .test = "Thu, 11 Aug 2016 08:47:30 GMT garbage",
+ .expected = "Thu, 11 Aug 2016 08:47:30 GMT"
+ },
+ {
.test = "Thu, 11 Aug 2016 08:47:30 UTC",
.expected = "Thu, 11 Aug 2016 08:47:30 GMT"
},
@@ -340,6 +348,10 @@ static const struct test_bad_string
date_bad_string_tests[] = {
.test = "Foosday, 16 Dec 1977 23:45:12 GMT",
.res = NSERROR_INVALID
},
+ {
+ .test = "20051212 garbage",
+ .res = NSERROR_INVALID
+ },
};
/**
diff --git a/utils/time.c b/utils/time.c
index 14f4004..71fa30f 100644
--- a/utils/time.c
+++ b/utils/time.c
@@ -282,10 +282,13 @@ enum nsc_time_zone_offsets {
/**
* List of timezones.
*
- * The order here is the order they appear in the `timezone_mins` array.
- * So there is value in putting the most common timezones first.
+ * The order here is the order they appear in the `timezone_mins` and
+ * `timezones` arrays. So there is value in putting the most common
+ * timezones first.
*/
enum nsc_time_zones {
+ /** "GMT" first since its the only one I've seen in the wild. -- tlsa */
+ NSC_TIME_ZONE_GMT,
NSC_TIME_ZONE_IDLE,
NSC_TIME_ZONE_NZST,
NSC_TIME_ZONE_NZT,
@@ -299,7 +302,6 @@ enum nsc_time_zones {
NSC_TIME_ZONE_FWT,
NSC_TIME_ZONE_MET,
NSC_TIME_ZONE_MEWT,
- NSC_TIME_ZONE_GMT,
NSC_TIME_ZONE_UTC,
NSC_TIME_ZONE_WET,
NSC_TIME_ZONE_WAT,
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org