Commit Graph

8830 Commits

Author SHA1 Message Date
Damien Lespiau
43098d0038 datetime: Rename shadowing variables
timezone and tzname shadow variables declared in time.h. Let's rename
them to time_zone and tz_name then.

https://bugzilla.gnome.org/show_bug.cgi?id=628839
2010-09-06 11:51:11 +01:00
Thiago Santos
875ad12345 gdatetime: Use proleptic gregorian
Use Proleptic Gregorian calendar instead of the Julian calendar
as the internal representation.

https://bugzilla.gnome.org/show_bug.cgi?id=50076

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-06 11:50:30 +01:00
Christian Hergert
6bb89501cf datetime: use g_utf8_next_char() to walk utf8 string
Previously, the format string was iterated many times by
walking to the given offset in the string repeatedly.
This patch instead walks the string using g_utf8_next_char().

Additionally, the character for lookups was a char and could
loose content.  This uses gunichar instead.

https://bugzilla.gnome.org/show_bug.cgi?id=50076
2010-09-06 11:50:30 +01:00
Christian Hergert
52e44ddec2 datetime: avoid using __year
These were left over from when the inline functions where implemented
as macros.  They are no longer needed and where clashing with the
global __year anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=50076
2010-09-06 11:50:30 +01:00
Emmanuele Bassi
64300c0cc4 datetime: Add get_week_of_year()
https://bugzilla.gnome.org/show_bug.cgi?id=628029

Based on a patch by: Joseph Pingenot

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-06 11:50:30 +01:00
Emmanuele Bassi
70ef2e3bf6 datetime: Rename internal method
Use add_ymd(), to reflect the order of the arguments.
2010-09-06 11:50:30 +01:00
Emmanuele Bassi
959886d95e build: Fix warnings caused by missing includes 2010-09-06 11:43:04 +01:00
Khaled Hosny
438d195d19 Updated Arabic translation 2010-09-05 16:23:00 +02:00
Chao-Hsiung Liao
f4c84a59f8 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2010-09-05 19:24:01 +08:00
Matthias Clasen
f13d561211 More header inclusion cleanup 2010-09-05 00:23:03 -04:00
Emmanuele Bassi
19972a1b57 build: Quench the compiler's thirst for warnings 2010-09-04 18:24:50 +01:00
Emmanuele Bassi
581e68b7d3 gmain: Define _GNU_SOURCE before including glibconfig.h
As it pulls in unistd.h from something else.
2010-09-04 18:15:15 +01:00
Emmanuele Bassi
ca7dee5949 Build fixes for the fall-out of the inclusion changes 2010-09-04 18:04:34 +01:00
Emmanuele Bassi
b1dbcc4023 gtimer: Fix a compilation warning 2010-09-04 18:03:33 +01:00
Emmanuele Bassi
01a46e5c65 Hack to include glib/gdatasetprivate.h directly
The gdatasetprivate.h header includes gatomic.h directly. It all works
well in GLib, but inside GObject it will trigger the single inclusion
guard.

Since this is a private header, and it's kind of a special case, one way
to fix it is to declare GLIB_COMPILATION around it and fool the single
inclusion guard in gatomic.h into thinking we're compiling GLib and not
GObject.
2010-09-04 17:25:37 +01:00
Emmanuele Bassi
82db1446b3 Add missing gstrfuncs.h include
For g_strdup() and friends.
2010-09-04 17:22:18 +01:00
Matthias Clasen
04077ff5c5 More include cleanups 2010-09-03 23:03:14 -04:00
Matthias Clasen
dc2e46b2aa Don't include glib.h in other headers 2010-09-03 21:24:40 -04:00
Matthias Clasen
2effb8d0ea Remove excessive header includes 2010-09-03 21:20:07 -04:00
Matthias Clasen
7c68050451 Remove excessive header includes 2010-09-03 21:15:45 -04:00
Matthias Clasen
aad1921651 Don't include glib.h in other headers 2010-09-03 21:12:03 -04:00
Matthias Clasen
349aec676c Remove excessive header inclusions 2010-09-03 20:57:05 -04:00
Matthias Clasen
633f438300 Remove excessive header inclusions 2010-09-03 20:55:17 -04:00
Matthias Clasen
7ddd2100c3 Remove excessive header inclusions 2010-09-03 20:53:37 -04:00
Matthias Clasen
5681809448 Remove excessive header inclusions 2010-09-03 20:51:08 -04:00
Matthias Clasen
a376d9f4c8 Remove some unneeded headers 2010-09-03 20:46:40 -04:00
Matthias Clasen
92c577eeff Remove eexcessive header inclusions 2010-09-03 20:44:59 -04:00
Matthias Clasen
0a9eb80798 Remove redundant header inclusions 2010-09-03 20:41:52 -04:00
Matthias Clasen
6e3b14e155 Remove redundant header inclusions 2010-09-03 20:38:30 -04:00
Matthias Clasen
c5049d86f9 Remove redundant header inclusions 2010-09-03 20:34:15 -04:00
Matthias Clasen
96d87da379 Remove redundant header inclusions 2010-09-03 20:30:54 -04:00
Matthias Clasen
3e2f1e3825 Remove redundant header inclusions
and some whitespace cleanup.
2010-09-03 20:27:45 -04:00
Matthias Clasen
8f81ee86ee Remove redundant header inclusions 2010-09-03 20:15:16 -04:00
Matthias Clasen
d95c6b8834 Remove redundant header inclusions 2010-09-03 20:12:09 -04:00
Matthias Clasen
1409bbab67 Remove redundant header inclusions 2010-09-03 20:05:27 -04:00
Matthias Clasen
9471902d4d Remove redundant header inclusions 2010-09-03 20:01:55 -04:00
Matthias Clasen
ebcdbd9555 Remove redundant header inclusions
and clean up some whitespace
2010-09-03 19:49:34 -04:00
Matthias Clasen
9b3fb41a5e Remove redundant header inclusions
and clean up some whitespace
2010-09-03 19:41:49 -04:00
Matthias Clasen
156a3f7195 Whitespace cleanup 2010-09-03 19:38:56 -04:00
Matthias Clasen
8300820f7b Remove redundant header inclusions 2010-09-03 19:37:54 -04:00
Matthias Clasen
5d4ef36f91 Whitespace cleanup 2010-09-03 19:34:28 -04:00
Matthias Clasen
489b780bb9 Remove redundant header inclusions 2010-09-03 19:32:02 -04:00
Matthias Clasen
4e5532ec51 Sort extensions properly
Just taking the difference of the priorities has overflow issues,
as pointed out in bug 623069.
2010-09-03 19:03:34 -04:00
Matthias Clasen
42080449d0 Add a note about size limits of private structures
Also add some assertions to check these limits, instead of
failing silently.  Bug 604479.
2010-09-03 18:11:08 -04:00
Christian Persch
db4fb1b115 Plug a mem leak in the gdbus-proxy test
==23341== 65 bytes in 3 blocks are definitely lost in loss record 927 of 1,020
==23341==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==23341==    by 0x4057094: g_malloc (gmem.c:134)
==23341==    by 0x40573DB: g_malloc_n (gmem.c:281)
==23341==    by 0x40717FC: g_strdup (gstrfuncs.c:101)
==23341==    by 0x4147F56: value_lcopy_string (gvaluetypes.c:313)
==23341==    by 0x4123F0B: g_object_get_valist (gobject.c:1643)
==23341==    by 0x41240FF: g_object_get (gobject.c:1731)
==23341==    by 0x804C39E: test_basic (gdbus-proxy.c:522)

Bug #628331.
2010-09-03 16:05:28 -04:00
Christian Persch
5de1bf4a91 Plug a mem leak in the gdbus-proxy test
==23341== 85 (24 direct, 61 indirect) bytes in 1 blocks are definitely lost in loss record 900 of 971
==23341==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==23341==    by 0x4057094: g_malloc (gmem.c:134)
==23341==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==23341==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==23341==    by 0x403A751: g_error_new_valist (gerror.c:54)
==23341==    by 0x403AAD4: g_set_error (gerror.c:240)
==23341==    by 0x420B807: decode_method_reply (gdbusconnection.c:4774)
==23341==    by 0x420C2BA: g_dbus_connection_call_sync (gdbusconnection.c:5188)
==23341==    by 0x421B7C9: g_dbus_proxy_call_sync (gdbusproxy.c:2477)
==23341==    by 0x804BD89: test_bogus_method_return (gdbus-proxy.c:430)

Bug #628331.
2010-09-03 16:04:29 -04:00
Christian Persch
be33ef85d0 Plug some mem leaks in gdbus-peer test
==29535== 56 (24 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 1,112 of 1,264
==29535==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==29535==    by 0x4057094: g_malloc (gmem.c:134)
==29535==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==29535==    by 0x406F364: g_slice_copy (gslice.c:858)
==29535==    by 0x403A9B2: g_error_copy (gerror.c:160)
==29535==    by 0x42066D3: initable_init (gdbusconnection.c:2314)
==29535==    by 0x41A73E5: g_initable_init (ginitable.c:105)
==29535==    by 0x41A7587: g_initable_new_valist (ginitable.c:218)
==29535==    by 0x41A742A: g_initable_new (ginitable.c:138)
==29535==    by 0x4206DCC: g_dbus_connection_new_for_address_sync (gdbusconnection.c:2585)
==29535==    by 0x804D63A: test_nonce_tcp (gdbus-peer.c:1229)

==29535== 107 (24 direct, 83 indirect) bytes in 1 blocks are definitely lost in loss record 1,188 of 1,264
==29535==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==29535==    by 0x4057094: g_malloc (gmem.c:134)
==29535==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==29535==    by 0x406F364: g_slice_copy (gslice.c:858)
==29535==    by 0x403A9B2: g_error_copy (gerror.c:160)
==29535==    by 0x42066D3: initable_init (gdbusconnection.c:2314)
==29535==    by 0x41A73E5: g_initable_init (ginitable.c:105)
==29535==    by 0x41A7587: g_initable_new_valist (ginitable.c:218)
==29535==    by 0x41A742A: g_initable_new (ginitable.c:138)
==29535==    by 0x4206DCC: g_dbus_connection_new_for_address_sync (gdbusconnection.c:2585)
==29535==    by 0x804D8E8: test_nonce_tcp (gdbus-peer.c:1259)

==29535== 112 (24 direct, 88 indirect) bytes in 1 blocks are definitely lost in loss record 1,193 of 1,264
==29535==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==29535==    by 0x4057094: g_malloc (gmem.c:134)
==29535==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==29535==    by 0x406F364: g_slice_copy (gslice.c:858)
==29535==    by 0x403A9B2: g_error_copy (gerror.c:160)
==29535==    by 0x42066D3: initable_init (gdbusconnection.c:2314)
==29535==    by 0x41A73E5: g_initable_init (ginitable.c:105)
==29535==    by 0x41A7587: g_initable_new_valist (ginitable.c:218)
==29535==    by 0x41A742A: g_initable_new (ginitable.c:138)
==29535==    by 0x4206DCC: g_dbus_connection_new_for_address_sync (gdbusconnection.c:2585)
==29535==    by 0x804D79A: test_nonce_tcp (gdbus-peer.c:1248)

==29535== 73 (24 direct, 49 indirect) bytes in 1 blocks are definitely lost in loss record 1,152 of 1,264
==29535==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==29535==    by 0x4057094: g_malloc (gmem.c:134)
==29535==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==29535==    by 0x406F364: g_slice_copy (gslice.c:858)
==29535==    by 0x403A9B2: g_error_copy (gerror.c:160)
==29535==    by 0x42066D3: initable_init (gdbusconnection.c:2314)
==29535==    by 0x41A73E5: g_initable_init (ginitable.c:105)
==29535==    by 0x41A7587: g_initable_new_valist (ginitable.c:218)
==29535==    by 0x41A742A: g_initable_new (ginitable.c:138)
==29535==    by 0x4206DCC: g_dbus_connection_new_for_address_sync (gdbusconnection.c:2585)
==29535==    by 0x804C6CE: test_peer (gdbus-peer.c:803)

Bug #628331.
2010-09-03 16:03:48 -04:00
Christian Persch
3df5866139 Plug a mem leak in the gdbus-peer test
==6793== 32 (24 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record 779 of 1,423
==6793==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==6793==    by 0x4057094: g_malloc (gmem.c:134)
==6793==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==6793==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==6793==    by 0x413D5BB: g_type_create_instance (gtype.c:1867)
==6793==    by 0x412372A: g_object_constructor (gobject.c:1482)
==6793==    by 0x4122E1D: g_object_newv (gobject.c:1266)
==6793==    by 0x4122B93: g_object_new (gobject.c:1178)
==6793==    by 0x41DB4F9: g_unix_fd_list_new (gunixfdlist.c:159)
==6793==    by 0x804AADD: test_interface_method_call (gdbus-peer.c:172)

Bug #628331.
2010-09-03 16:02:11 -04:00
Christian Persch
bd2faedefd Plug a mem leak in network-address test
==4616== 46 (32 direct, 14 indirect) bytes in 1 blocks are definitely lost in loss record 193 of 305
==4616==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==4616==    by 0x4057094: g_malloc (gmem.c:134)
==4616==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==4616==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==4616==    by 0x413D5BB: g_type_create_instance (gtype.c:1867)
==4616==    by 0x412372A: g_object_constructor (gobject.c:1482)
==4616==    by 0x4123147: g_object_newv (gobject.c:1347)
==4616==    by 0x41236BB: g_object_new_valist (gobject.c:1463)
==4616==    by 0x4122BB4: g_object_new (gobject.c:1181)
==4616==    by 0x41B2D0F: g_network_address_new (gnetworkaddress.c:262)
==4616==    by 0x8048A70: test_basic (network-address.c:10)

Bug #628331.
2010-09-03 16:01:10 -04:00
Christian Persch
fa6937603c Plug a mem leak in contexts test
==14059== 96 bytes in 2 blocks are definitely lost in loss record 520 of 543
==14059==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14059==    by 0x4057094: g_malloc (gmem.c:134)
==14059==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==14059==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==14059==    by 0x41385BB: g_type_create_instance (gtype.c:1867)
==14059==    by 0x411E72A: g_object_constructor (gobject.c:1482)
==14059==    by 0x411DE1D: g_object_newv (gobject.c:1266)
==14059==    by 0x411DB93: g_object_new (gobject.c:1178)
==14059==    by 0x42296AF: _g_local_file_input_stream_new (glocalfileinputstream.c:152)
==14059==    by 0x422281F: g_local_file_read (glocalfile.c:1322)
==14059==    by 0x418A8A9: open_read_async_thread (gfile.c:5050)
==14059==    by 0x41B71BB: run_in_thread (gsimpleasyncresult.c:853)
==14059==    by 0x41A5FBC: io_job_thread (gioscheduler.c:181)
==14059==    by 0x407DCDE: g_thread_pool_thread_proxy (gthreadpool.c:314)
==14059==    by 0x407C6B0: g_thread_create_proxy (gthread.c:1897)
==14059==    by 0x57D918: start_thread (pthread_create.c:301)
==14059==    by 0x4C6CBD: clone (clone.S:133)

Bug #628331.
2010-09-03 16:00:15 -04:00