summaryrefslogtreecommitdiff
path: root/glib/gdate.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve g_date_clamp docs. (#491970, Areg Beketovski)Matthias Clasen2007-11-101-101/+81
| | | | | | | | | | 2007-11-09 Matthias Clasen <mclasen@redhat.com> * glib/tmpl/date.sgml: Improve g_date_clamp docs. (#491970, Areg Beketovski) svn path=/trunk/; revision=5849
* Fix warnings from sparse. (#487491, Kjartan Maraas)Behdad Esfahbod2007-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | 2007-10-21 Behdad Esfahbod <behdad@gnome.org> * glib/gdate.c (g_date_strftime): * glib/gmain.c (g_main_context_check): * glib/gregex.c (g_match_info_fetch_all), (g_regex_split_full): * glib/gthread.c (g_once_init_enter_impl), (g_once_init_leave): * glib/gthread.h: * glib/gutf8.c (g_utf16_to_utf8), (g_utf16_to_ucs4): * tests/errorcheck-mutex-test.c (lock_locked_mutex), (trylock_locked_mutex), (unlock_unlocked_mutex), (free_locked_mutex), (wait_on_unlocked_mutex), (wait_on_otherwise_locked_mutex), (timed_wait_on_unlocked_mutex), (timed_wait_on_otherwise_locked_mutex): Fix warnings from sparse. (#487491, Kjartan Maraas) svn path=/trunk/; revision=5792
* New Win32-only function. Use the wide character Win32 API to do the workTor Lillqvist2007-02-171-0/+394
| | | | | | | | | | | | | | | 2007-02-17 Tor Lillqvist <tml@novell.com> * glib/gdate.c (win32_strftime_helper): New Win32-only function. Use the wide character Win32 API to do the work of strftime(): GetThreadLocale(), GetLocaleInfoW(), GetDateFormatW() and GetTimeFormatW(). (g_date_strftime): On Windows use win32_strftime_helper() instead of strftime() to avoid codepage issues with strftime(). Unfortunately using wcsftime() would not help either. (#404832) svn path=/trunk/; revision=5339
* Fix a typo. (#398203, Owen Taylor)Matthias Clasen2007-01-191-1/+1
| | | | | | | | | | | 2007-01-18 Matthias Clasen <mclasen@redhat.com> * glib/gdate.c (g_date_set_time): Fix a typo. (#398203, Owen Taylor) svn path=/trunk/; revision=5297
* Avoid an array overrun. (Coverity, fix by Pascal Terjan)Matthias Clasen2006-04-161-1/+1
| | | | | | | 2006-04-16 Matthias Clasen <mclasen@redhat.com> * glib/gdate.c (g_date_fill_parse_tokens): Avoid an array overrun. (Coverity, fix by Pascal Terjan)
* Move short_month_names and long_month_names to bss.Matthias Clasen2006-04-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | 2006-04-04 Matthias Clasen <mclasen@redhat.com> * glib/gdate.c: Move short_month_names and long_month_names to bss. * glib/gspawn-win32.c (g_spawn_error_quark): * glib/gspawn.c (g_spawn_error_quark): * glib/gshell.c (g_shell_error_quark): * glib/gmarkup.c (g_markup_error_quark): * glib/goption.c (g_option_error_quark): * glib/gkeyfile.c (g_key_file_error_quark): * glib/giochannel.c (g_io_channel_error_quark): * glib/gfileutils.c (g_file_error_quark): * glib/gconvert.c (g_convert_error_quark): * glib/gbookmarkfile.c (g_bookmark_file_error_quark): * glib/gthread.c (g_thread_error_quark): No point in making the error path fast by caching quarks. * glib/gbookmarkfile.c: Make the parser struct const.
* Add versioned deprecation informationMatthias Clasen2005-12-051-1/+1
|
* Add functions to set a date from a time_t and from a GTimeVal.Matthias Clasen2005-11-171-12/+60
| | | | | | | | | | | 2005-11-17 Matthias Clasen <mclasen@redhat.com> * glib/glib.symbols: * glib/gdate.h: * glib/gdate.c (g_date_set_time_t): (g_date_set_time_val): Add functions to set a date from a time_t and from a GTimeVal. (g_date_set_time): Deprecate. (#314067, Roger Leigh)
* const correctness fixes, found by Arjan van de Ven and gcc.Matthias Clasen2005-11-171-1/+1
| | | | | | | | | 2005-11-17 Matthias Clasen <mclasen@redhat.com> * glib/gbacktrace.c: * glib/gdate.c: * glib/gthread.c: const correctness fixes, found by Arjan van de Ven and gcc.
* Add tests for g_date_get_iso8601_week_of_year().Matthias Clasen2005-03-281-1/+1
| | | | | | | | | | | 2005-03-28 Matthias Clasen <mclasen@redhat.com> * tests/date-test.c: * tests/testgdate.c: Add tests for g_date_get_iso8601_week_of_year(). * glib/gdate.c (g_date_get_iso8601_week_of_year): Fix the calculation. (#169858, Jon-Kare Hellan)
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-141-1/+5
| | | | | | | | | | | | | | | | | 2005-03-13 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in galias.h: * glib/glib.symbols: Group symbols by header and source file. * glib/makegalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegalias.pl -def * glib/Makefile.am (galiasdef.c): Add a rule to generate this file. * glib/*.c: Include galias.h after the other GLib headers, include galiasdef.c at the bottom.
* Remove a lot of pointless g_return_if_fail() checks. (#169859, MortenMatthias Clasen2005-03-111-26/+2
| | | | | | | 2005-03-10 Matthias Clasen <mclasen@redhat.com> * glib/gdate.c: Remove a lot of pointless g_return_if_fail() checks. (#169859, Morten Welinder)
* Don't g_assert that localtime() returns non-NULL. It does return NULL atTor Lillqvist2005-01-221-2/+16
| | | | | | | | | | 2005-01-22 Tor Lillqvist <tml@novell.com> * glib/gdate.c (g_date_set_time): Don't g_assert that localtime() returns non-NULL. It does return NULL at least on Win32 if you pass it a negative time_t, which although wrong, shouldn't cause an application to abort. Instead return 2000-01-01 as a default date. Print a warning unless G_DISABLE_CHECKS. (#164622)
* Apply a patch to fix sparse warnings. (#154696, Kjartan Maraas)Matthias Clasen2004-10-241-1/+1
| | | | | | | | | 2004-10-23 Matthias Clasen <mclasen@redhat.com> * glib/gasyncqueue.c, glib/gatomic.c, glib/gdate.c, glib/giochannel.c, glib/gmain.c, glib/gspawn.c, glib/libcharset/localcharset.c: Apply a patch to fix sparse warnings. (#154696, Kjartan Maraas)
* Implement the same PLT reduction technique used in GTK+:Matthias Clasen2004-09-161-0/+1
| | | | | | Thu Sep 16 02:03:15 2004 Matthias Clasen <maclas@gmx.de> Implement the same PLT reduction technique used in GTK+:
* Add a function to calculate the ISO 8601 week number of a date. (#92579,Matthias Clasen2004-09-021-0/+36
| | | | | | | | | Wed Sep 1 20:22:39 2004 Matthias Clasen <maclas@gmx.de> * glib/gdate.h: * glib/gdate.c (g_date_get_iso8601_week_of_year): Add a function to calculate the ISO 8601 week number of a date. (#92579, Niklas Lundell)
* Translate from locale era to AD in g_date_set_parse(). (#133400, TheppitakMatthias Clasen2004-02-271-2/+12
| | | | | | | Fri Feb 27 01:44:41 2004 Matthias Clasen <maclas@gmx.de> * glib/gdate.c: Translate from locale era to AD in g_date_set_parse(). (#133400, Theppitak Karoonboonyanan)
* Patch from Sven Neumann to make the include order consistent. (#71704)Owen Taylor2002-12-041-4/+2
| | | | | | | Tue Dec 3 20:22:27 2002 Owen Taylor <otaylor@redhat.com> * glib/*.c: Patch from Sven Neumann to make the include order consistent. (#71704)
* Fix a memory leak. (#94550, Sebastian Rittau)Owen Taylor2002-10-141-3/+5
| | | | | | | Mon Oct 14 15:51:05 2002 Owen Taylor <otaylor@redhat.com> * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory leak. (#94550, Sebastian Rittau)
* Remove the shortcut for UTF-8 locales to ensure consistent behaviour. FixDaniel Elstner2002-02-271-90/+78
| | | | | | 2002-02-27 Daniel Elstner <daniel.elstner@gmx.net> * glib/gdate.c (g_date_strftime): Remove the shortcut for UTF-8 locales to ensure consistent behaviour. Fix handling of the strftime return value, and avoid looping if strftime is buggy and constantly returns 0. Always return 0 if the output buffer was to small. (#72544)
* Make hostname parameter const char *. Added a new "ASCII must not beDarin Adler2002-02-081-2/+1
| | | | | | | | | | | | | | | | | | | | | * glib/gconvert.h: Make hostname parameter const char *. * glib/gconvert.c: (g_unescape_uri_string): Added a new "ASCII must not be escaped" feature, and some missing error checking. (is_escalphanum): New. (is_escalpha): New. (hostname_validate): New. (g_filename_from_uri): Don't allow hostnames to include escaped ASCII, validate hostnames with the new hostname_validate. (g_filename_to_uri): Validate hostnames with the new hostname_validate. * tests/uri-test.c: Updated tests to reflect the hostname validation changes above. * glib/gdate.c: (g_date_fill_parse_tokens): Remove the <ctype.h> include and do isdigit -> g_ascii_isdigit.
* Fixed wrong order in conversion.Sebastian Wilhelmi2001-11-291-1/+1
| | | | | | 2001-11-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib/gdate.c: Fixed wrong order in conversion.
* Add length arguments to g_utf8_{strup,strdown,casefold,collate_key}.Owen Taylor2001-07-071-6/+6
| | | | | | | | | | Fri Jul 6 22:34:32 2001 Owen Taylor <otaylor@redhat.com> * glib/gunicode.h glib/gunidecomp.c glib/guniprop.c glib/gunicollate.c: Add length arguments to g_utf8_{strup,strdown,casefold,collate_key}. * glib/gdate.c: Fix for above.
* Use G_N_ELEMENTS rather than a custom macro.Owen Taylor2001-07-021-21/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sun Jul 1 20:16:25 2001 Owen Taylor <otaylor@redhat.com> * glib/guniprop.c (g_unichar_totitle): Use G_N_ELEMENTS rather than a custom macro. * glib/gen-unicode-tables.pl: Adapt to changes in table formats for Unicode 3.1 * glib/gunicode.h glib/guniprop.c glib/gunichartables.h glib/gen-unicode-tables.pl: Add case conversion functions g_utf8_casefold, g_utf8_strup, g_utf8_strdown. * tests/unicode-caseconv.c tests/gen-casefold-txt.pl tests/gen-casemap-txt.pl tests/casefold.txt tests/casemap.txt: Test cases for case conversion. * glib/gunicode.h glib/gunidecomp.[ch] glib/gunicomp.h glib/gen-unicode-tables.pl: Add function to do Unicode normalization g_utf8_normalize(). * tests/unicode-normalize.c: Test program for case conversion. * glib/gunicode.h glib/gunicollate.c: Add collation functions g_utf8_collate, g_utf8_collate_key. * test/unicode-collate.c: Test program for collation. * glib/gdate.c (g_date_fill_parse_tokens): Fix uninitialized variable. * glib/gdate.c (g_date_strftime) docs/Changes-2.0.txt: Make work with UTF-8 even if the locale isn't UTF-8 based. Still somewhat of broken, if the format string contains characters not representable in the current locale, will warn and not work. * glib/gdate.c: Use UTF-8 normalization and casefolding.
* Changes for 64-bit cleanliness, loosely based on patch from Mark Murnane.Owen Taylor2001-06-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Jun 20 12:00:54 2001 Owen Taylor <otaylor@redhat.com> Changes for 64-bit cleanliness, loosely based on patch from Mark Murnane. * gconvert.c (g_convert/g_convert_with_fallback): Remove workarounds for since-fixed GNU libc bugs. Minor doc fix. * gconvert.[ch]: Change gint to gsize/gssize as appropriate. * gconvert.c (g_locale/filename_to/from_utf8): Fix incorrect computation of bytes_read / bytes_written. * gfileutils.[ch] (g_file_get_contents): Make length out parameter 'gsize *len'. * ghook.c (g_hook_compare_ids): Don't compare a and b as 'a - b'. * gmacros.h (GSIZE_TO_POINTER): Add GPOINTER_TO_SIZE, GSIZE_TO_POINTER. * gmain.c (g_timeout_prepare): Rewrite to avoid overflows. (Fixes bug when system clock skews backwards more than 24 days.) * gmarkup.[ch]: Make lengths passed to callbacks gsize, length for g_markup_parse-context_parse(), g_markup_escape_text() gssize. * gmessages.[ch] (g_printf_string_upper_bound): Change return value to gsize. * gmessages.c (printf_string_upper_bound): Remove a ridiculous use of 'inline' on a 300 line function. * gstring.[ch]: Represent size of string as a gsize, not gint. Make parameters to functions take gsize, or gssize where -1 is allowed. * gstring.c (g_string_erase): Make g_string_erase (string, pos, -1) a synonym for g_string_truncate for consistency with other G* APIs. * gstrfuncs.[ch]: Make all functions taking a string length, take a gsize, or gssize if -1 is allowed. (g_strstr_len, g_strrstr_len). Also fix some boundary conditions in g_str[r]str[_len]. * gutf8.c tests/unicode-encoding.c: Make parameters that are byte lengths gsize, gssize as appropriate. Make character offsets, other counts, glong. * gasyncqueue.c gcompletion.c timeloop.c timeloop-basic.c gutils.c gspawn.c. Small 64 bit cleanliness fixups. * glist.c (g_list_sort2, g_list_sort_real): Fix functions that should have been static. * gdate.c (g_date_fill_parse_tokens): Fix extra declaration that was shadowing another. * tests/module-test.c: Include string.h Mon Jun 18 15:43:29 2001 Owen Taylor <otaylor@redhat.com> * gutf8.c (g_get_charset): Make argument G_CONST_RETURN char **.
* Changed to take a const argument, and then to cast out const.Jon Trowbridge2001-06-051-17/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-01 Jon Trowbridge <trow@gnu.org> * gdate.c (g_date_update_julian): Changed to take a const argument, and then to cast out const. (g_date_update_dmy): Changed to take a const argument, and then cast out const. (g_date_get_weekday): Changed argument to be const. (g_date_get_month): Changed argument to be const. (g_date_get_year): Changed argument to be const. (g_date_get_day): Changed argument to be const. (g_date_get_julian): Changed argument to be const. (g_date_get_day_of_year): Changed argument to be const. (g_date_get_monday_week_of_year): Changed argument to be const. (g_date_get_sunday_week_of_year): Changed argument to be const. (g_date_compare): Changed arguments to be const. (g_date_to_struct_tm): Changed GDate argument to be const. (g_date_strftime): Changed GDate argument to be const. (g_date_clamp): Added. The equivalent of the CLAMP macro for GDates. (g_date_order): Added. Ensure that the first GDate argument preceeds the second, swapping them if necessary. (g_date_days_between): Added. Computes the (signed) number of days between two dates.
* From Edward M. Lee <tailbert@yahoo.com>:Tor Lillqvist2001-03-141-0/+7
| | | | | | | | | | | | | | | | 2001-03-13 Tor Lillqvist <tml@iki.fi> From Edward M. Lee <tailbert@yahoo.com>: * gdate.c (g_date_set_parse): add support for dates that in the form "Wed Mar 14 2001". Running testgdate on cygwin requires this. 2001-03-13 Tor Lillqvist <tml@iki.fi> From Edward M. Lee <tailbert@yahoo.com>: * gmodule-win32.c (_g_module_build_path): use (cygwin friendly) dir separator.
* New gcompat.h header file as recommended by Havoc.Ali Abdin2000-12-241-26/+26
| | | | | | | | | | | | | 2000-12-24 Ali Abdin <aliabdin@aucegypt.edu> * Makefile.am, gcompat.h, glib.h: New gcompat.h header file as recommended by Havoc. * gdate.c, gdate.h, testgdate.c, docs/reference/glib/glib-sections.txt, docs/reference/glib/tmpl/date.sgml, tests/date-test.c: Rename some of the gdate functions to use the '_get' in their name. Patch reviewed by Havoc.
* Several minor ANSI C fixes.Martin Baulig2000-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-29 Martin Baulig <baulig@suse.de> Several minor ANSI C fixes. Added missing casts: * gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'. * gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'. (g_idle_add_full): `(gpointer) function' in call to g_source_add(). * gstrfuncs.c (g_strdown): `s = (guchar *) string' and `return (gchar *) string'. (g_strup): Likewise. (g_strchug): `start = (guchar*) string' in 1st for() argument; `strlen ((gchar *) start)' in call to g_memmove(). * gstring.c (g_string_down): `s = (guchar *) string->str'. (g_string_up): Likewise. * gthreadpool.c (stop_this_thread_marker): `(gpointer) &g_thread_pool_new'. * gunidecomp.h (decomp_table[]): Cast all the strings to `unsigned char *'. Put text following #endif into comments: * gmain.c: here.
* applied patch from Andreas Persenius <ndap@swipnet.se> that updates theTim Janik2000-07-261-4/+4
| | | | | | | | Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org> * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that updates the license headers to the GNU Lesser General Public License, as well as updating the copyright year to 2000.
* 18:36. incorporated proposed cleanups from gtk-devel-list.Tim Janik1999-07-241-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org> * merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36. * incorporated proposed cleanups from gtk-devel-list. * bumped version number to GLib-1.3.1 * glib.h: * gqueue.c: * gstring.c: * glist.c: removed string tokenisation (we got g_strsplit() and g_strjoin() already) and readline functions. s/g_list_delete/g_list_delete_link. implemented g_slist_delete_link. removed notion of g_ATEXIT() macro in glib.h, this is an *internal* macro, g_atexit() is provided for public consumption. added GTrashStack inline utility functions. reimplement double eneded queues. removed GStack implementation, people can use a queue or a (singly) linked list for this task. deprecated g_strescape(), we need the SunOS variants here. * gdate.c: added DEBUG_MSG() macro to wrap old messages. * *.*: CVS merges. * upgrade to libtool 1.3.3.
* Commented out debugging output.Jeff Garzik1999-03-141-0/+10
| | | | | | | | | | | | | 1999-03-14 Jeff Garzik <jgarzik@pobox.com> * gdate.c: Commented out debugging output. * tests/Makefile.am, tests/date-test.c: Added test of the GDate module, based closely on testgdate.c. * tests/Makefile.am: Bugfix - compile tests with @GLIB_DEBUG_FLAGS@.
* inserted additional note to look for ChangeLog and AUTHORS file for a logCST 1999 Shawn T. Amundson1999-02-241-0/+7
| | | | | | | Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org> * *.[ch]: inserted additional note to look for ChangeLog and AUTHORS file for a log of modifications.
* s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macroSebastian Wilhelmi1999-02-101-1/+1
| | | | | | | 1999-02-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib.h: s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macro to declare a lock externally.
* Removed the #warning about MT unsafety without localtime_r.Sebastian Wilhelmi1999-01-261-4/+0
| | | | | | | | | 1999-01-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gdate.c (g_date_set_time): Removed the #warning about MT unsafety without localtime_r. * configure.in: Moved it here.
* #warning isn't portable, check for gccManish Singh1999-01-121-1/+1
| | | | -Yosh
* Include config.h to get HAVE_LOCALTIME_R macro.Sebastian Wilhelmi1999-01-121-0/+4
| | | | | | | | | 1999-01-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gdate.c: Include config.h to get HAVE_LOCALTIME_R macro. * configure.in: Moved function check back to the place, they've been before.
* Test for localtime_r only after including the right MT enabling CFLAGSSebastian Wilhelmi1999-01-111-4/+11
| | | | | | | | | | | 1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in: Test for localtime_r only after including the right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems). * gdate.c (g_date_set_time): Emit warning, if no localtime_r function is available on thread enabled systems. Define ptm only, if really needed, and assert on it.
* Add checks for vasprintf, localtime_r.Jeff Garzik1999-01-091-1/+6
| | | | | | | | | | | | | | | | * configure.in: Add checks for vasprintf, localtime_r. * gdate.c (g_date_set_time): Use localtime if localtime_r is not available. * gstrfuncs.c (g_strdup_vprintf): Use glibc vasprintf if possible; it's a bit faster than using GLib routines, and makes output code a bit smaller. * acconfig.h: Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these up automatically and puts them in config.h.in.
* Here we must replace getpwuid by getpwuid_r, but as I do not know how forSebastian Wilhelmi1999-01-071-18/+11
| | | | | | | | | | | | | | | | | | | | | 1999-01-07 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): Here we must replace getpwuid by getpwuid_r, but as I do not know how for now, I just made a FIXME note ;-) * gdate.c (g_date_set_time): localtime --> localtime_r to make it thread safe. * configure.in: We do not need to check for broken solaris mutex intitializer any longer. Provide a macro to show the used thread implementation. Not nice, but this is needed until thread support is completed here inside glib. * gthread/testgthread.c: conditionally compile according to the G_THREADS_IMPL_??? macros. (test_private_func): use rand_r instead of rand to make it thread safe.
* version bump to 1.1.8, binary age 0, interface age 0.Tim Janik1998-12-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Dec 16 03:16:58 1998 Tim Janik <timj@gtk.org> * configure.in: version bump to 1.1.8, binary age 0, interface age 0. * glib.h: changed g_lock() to G_LOCK(), g_unlock() to G_UNLOCK() and g_trylock() to G_TRYLOCK(), since these are macros that expand to nothing with --disable-threads. changed G_LOCK_DEFINE() to G_LOCK_DECLARE() and introduced G_LOCK_DECLARE_STATIC() to achive the results of static G_LOCK_DECLARE(). changed semantics of g_thread_supported to g_thread_supported() so it can be used as a function like g_module_supported(). the actuall definition is still a macro that expands into a variable for performance reasons though. various indentation and coding style cleanups. * configure.in: added --enable-threads that defaults to yes. * gmutex.c: changed tests g_thread_supported to g_thread_supported (), changed variable settings of g_thread_supported to g_threads_got_initialized. garray.c: gcache.c: gdataset.c: gdate.c: ghash.c: glist.c: gmain.c: gnode.c: gslist.c: gstring.c: gtree.c: gutils.c: changed s/g_lock/G_LOCK/, s/g_unlock/G_UNLOCK/, s/static G_LOCK_DEFINE/G_LOCK_DECLARE_STATIC/.
* Solaris has a broken strftime that produced garbage output for the testHavoc Pennington1998-12-151-2/+4
| | | | | | | | | 1998-12-15 Havoc Pennington <hp@pobox.com> * gdate.c (g_date_prepare_to_parse): Solaris has a broken strftime that produced garbage output for the test date I was using to set up the parser. So use a different date that Solaris seems to like.
* This commit merges the glib-threads branch into the mainOwen Taylor1998-12-151-4/+20
| | | | | | | | | | | branch. See the ChangeLog for details of the changes. In brief overview: - The set of threading functions can be set - A default implementation is provided in -lgthread - All static data structures are locked using these functions if g_thread_init() is called.
* If Julian is valid, we have to update the dmy representation beforeHavoc Pennington1998-12-021-1/+4
| | | | | | | | | | 1998-12-02 Havoc Pennington <hp@pobox.com> * gdate.c (g_date_set_month): If Julian is valid, we have to update the dmy representation before setting the components of it. (g_date_set_day): Same. (g_date_set_year): Same.
* Rely on GDate::dmy and GDate::Julian flags, rather than re-checking theHavoc Pennington1998-12-021-114/+97
| | | | | | | | | | | 1998-12-02 Havoc Pennington <hp@pobox.com> * gdate.c (g_date_valid): Rely on GDate::dmy and GDate::Julian flags, rather than re-checking the validity of the actual values. This should be the correct behavior, the old way was leftover cruft. * glib.h, gdate.c: Changed MDY to DMY throughout.
* changed `gpointer struct_tm_p' parameter of g_date_to_struct_tm back toSebastian Wilhelmi1998-12-021-5/+2
| | | | | | | | | | 1998-12-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib.h: * gdate.c: changed `gpointer struct_tm_p' parameter of g_date_to_struct_tm back to `struct tm *tm' and forward declared `struct tm' in glib.h; yes, this is nice, we still need not include time.h.
* s/time_t/GTime/ and s/g_print/g_message/ include time.h.Tim Janik1998-12-021-205/+211
| | | | | | | | | | | | Wed Dec 2 02:10:59 1998 Tim Janik <timj@gtk.org> * gdate.c: s/time_t/GTime/ and s/g_print/g_message/ include time.h. * glib.h: removed #include <time.h>, changed time_t paramter of g_date_set_time() to time_t, changed struct tm parameter of g_date_to_struct_tm to `gpointer struct_tm_p'. yes, this is not nice, but including time.h actually breaks a bunch of code.
* There are outstanding issues, but they should be resolvable in-place. IfHavoc Pennington1998-12-011-0/+1275
this breaks something let me know and I will fix it. 1998-11-30 Havoc Pennington <hp@pobox.com> * gdate.c: New file, implements calendrical calculations. * glib.h: Added declarations for GDate module.