1 2008-05-01 Bill Holmes <billholmes54@gmail.com>
3 * src/glib.h : Adding declarations for g_ucs4_to_utf16 and g_utf16_to_ucs4.
5 * src/gutf8.c : Adding implementation for g_ucs4_to_utf16 and g_utf16_to_ucs4.
7 * test/utf8.c Adding tests for g_ucs4_to_utf16 and g_utf16_to_ucs4.
9 Contributed under MIT/X11 license.
11 2008-04-20 Geoff Norton <gnorton@novell.com>
13 * src/gspan.c: Fix the _NSGetEnviron define to prevent an impropoer
16 2008-03-19 Bill Holmes <billholmes54@gmail.com>
18 * src/gpath.c (g_path_is_absolute) : Adding a case for '/'
21 * src/gpath.c (g_get_user_name) : On Windows add a check for %USERNAME%
24 * src/gstr.c (g_strsplit, g_strsplit_set): Change to remove truncation
25 errors with MSVC build.
27 * src/gstr.c (g_filename_to_uri, g_filename_from_uri): Fixes to handle
30 * src/gstr.c (g_ascii_strncasecmp): Convert each character to lower case
33 * src/gunicode.c (g_get_charset): Implement for Windows.
35 Contributed under MIT/X11 license.
37 2008-03-12 Geoff Norton <gnorton@novell.com>
39 * src/gutf8.c: Implement g_ucs4_to_utf16 and g_utf16_to_ucs4 as
40 asserts. They're needed to build mono with eglib.
41 * src/gutil.h: Add a few missing function declarations to the header.
42 * src/gspawn.c: Some darwin implementations don't have crt_externs.h
43 So we'll just define _NSGetEnviron() ourselves.
44 * Makefile.am: Dont build test when cross compiling.
45 * configure.ac: Define CROSS_COMPILING when cross compiling.
46 Undefine _FORTIFY_SOURCE on arm-apple-darwin as the headers it
47 requires are not available.
49 2008-01-15 Andreas Faerber <andreas.faerber@web.de>
51 * configure.ac: Add default G_BREAKPOINT implementation.
52 Fix typo in breakpoint CPU output.
54 2007-12-23 Zoltan Varga <vargaz@gmail.com>
56 * src/glib.h: Include <limits.h>. Fixes #350482.
58 2007-11-21 Dick Porter <dick@ximian.com>
60 * src/gslist.c (g_slist_find_custom): Implement
62 * src/glist.c (g_list_find_custom): Implement
64 * test/list.c: Test g_list_find_custom()
66 * test/slist.c: Test g_slist_find_custom()
68 2007-11-20 Dick Porter <dick@ximian.com>
70 * src/gstr.c: Implement g_strsplit_set() and re-implement
71 g_strsplit() so it passes the additional tests. (g_strsplit()
72 should treat multi-char delimiters as just a single token, rather
73 than a set of delimiters.)
75 * src/gslist.c: Implement g_slist_index(), g_slist_nth() and
78 * test/string-util.c: Test g_strsplit_set() and more tests for
81 * test/slist.c: Test g_slist_nth() and
84 2007-11-06 Geoff Norton <gnorton@novell.com>
86 * configure.ac: Check for libiconv_open as the previous check was failing against
87 some versions of libiconv.
89 2007-11-06 Andreas Faerber <andreas.faerber@web.de>
91 * test/Makefile.am: Fix noinst_PROGRAMS for automake 1.6.3
94 2007-11-06 Geoff Norton <gnorton@novell.com>
96 * configure.ac: Determing if glib-2.0 is installed and set HAVE_GLIB appropriately
97 * test/Makefile.am: Only build test-glib if glib-2.0 is available
99 2007-11-05 Geoff Norton <gnorton@novell.com>
101 * configure.ac: Check for getpwent_r and wether libiconv is needed to be linked.
102 Also look to see if we can use export-dynamic in the test suite.
103 * test/Makefile.am: Get LDFLAGS from configure instead of setting them.
104 * src/gerror.c: Implement g_clear_error.
105 * src/glib.h: Only use the format, ... convention is HAVE_C99_SUPPORT is available.
106 * src/gpath.c: Only use the getpwent_r codepath if getpwent_r is available.
107 * src/gspawn.c: Define environ to call _NSGetEnviron() on Apple.
108 * src/Makefile.am: Remove -Werror so we dont fail on different function declarations.
109 Portions of all of the above are from Andreas Faerber & Jonathan Chambers
111 2007-10-31 Jonathan Chambers <joncham@gmail.com>
113 * src/ghashtable.c: Add g_hash_table_foreach_steal.
114 * src/garray.c: Add g_array_remove_index_fast.
115 * src/gpath.c (g_path_is_absolute): Handle windows paths.
116 * src/glib.h: Add g_hash_table_foreach_steal and g_array_remove_index_fast
118 Contribution is licensed as MIT/X11.
120 2007-06-13 Jonathan Chambers <joncham@gmail.com>
122 * src/gunicode.c: Add g_unichar_isxdigit and g_unichar_xdigit_value.
123 * src/gmisc.c: Add g_win32_getlocale stub.
124 * src/glib.h: Add declarations of above functions,
125 GFreeFunc typedef, and CLAMP, GUINT_TO_LE, and threading
128 * test/string-util.c: Fix warning.
129 * test/utf8.c: Add test for g_unichar_xdigit_value.
131 Contribution is licensed as MIT/X11.
133 2007-05-05 Aaron Bockover <abockover@novell.com>
136 * src/glib.h: Added g_ascii_tolower implementation; make g_ascii_strdown
137 use it to do the transformation
139 * test/string-util.c: Added a test for g_ascii_strdown
141 2007-04-27 Jonathan Chambers <joncham@gmail.com>
143 * src/gstr.c: Fix off by one error in g_strdup allocation.
145 2007-04-27 Jonathan Chambers <joncham@gmail.com>
147 * src/eglib-config.hw: Forgot to add for msvc build.
148 * src/vasprintf: Forgot to add for msvc build.
150 2007-04-27 Jonathan Chambers <joncham@gmail.com>
152 * src/gstr.c: Fix off by one error for NULL terminator.
154 2007-04-27 Jonathan Chambers <joncham@gmail.com>
156 Combined patch from Michael Jerris <mike@jerris.com> and me.
157 * winconfig.h: Config file for msvc builds.
158 * configure.ac: Add AC_CHECK_HEADERS for getopt.h, sys/time.h,
159 sys/wait.h, and pwd.h.
161 * src/gspawn.c: Include config.h and use HAVE_* macros.
162 * src/eglib-config.h.in: Add inclusion guards.
163 * src/ghashtable.c: Fix warnings.
164 * src/gmisc.c: Windows implementation of g_getenv, g_setenv,
166 * src/gpath.c: Include config.h and use HAVE_* macros.
167 * src/gmarkup.c: Fix warnings.
168 * src/gptrarray.c: Fix warnings.
169 * src/gstr.c: Fix warnings and use HAVE_* macros.
170 * src/glib.h: Move macros to eglib-config.h and include it.
171 * src/gdate.c: Implement g_get_current_time on windows.
172 * src/gpattern.c: Fix warnings.
173 * src/gdir.c: Implement g_dir on windows.
174 * src/gfile.c: Implement mkstemp and g_file_test on windows.
175 * src/gtimer.c: Implement g_timer on windows.
176 * src/gmodule.c: Fix warnings.
177 * src/gunicode.c: Fix warnings.
178 * src/gutf8.c: Fix warnings.
180 * test/ptrarray.c: Fix warnings.
181 * test/string.c: Fix warnings.
182 * test/list.c: Fix warnings.
183 * test/pattern.c: Use HAVE_* macros.
184 * test/dir.c: Use HAVE_* macros.
185 * test/file.c: Use HAVE_* macros and use system specific files for tests.
186 * test/test.c: Fix warnings and use HAVE_* macros.
187 * test/timer.c: Use HAVE_* macros.
188 * test/string-util.c: Fix warnings.
189 * test/test.h: Supress warnings on msvc.
190 * test/module.c: Use HAVE_* macros.
191 * test/utf8.c: Fix warnings.
192 * test/spawn.c: Use HAVE_* macros.
193 * test/driver.c: Fix warnings and use HAVE_* macros.
194 * test/path.c: Use HAVE_* macros and use system specific files for tests.
195 * test/sizes.c: Fix warnings.
197 2007-04-24 Jonathan Chambers <joncham@gmail.com>
199 Patch from Michael Jerris <mike@jerris.com>
200 * src/gspawn.c: Start msvc build.
201 * src/gpath.c: Start msvc build.
202 * src/gmarkup.c: Start msvc build.
203 * src/gshell.c: Start msvc build.
204 * src/gstr.c: Start msvc build.
205 * src/glist.c: Start msvc build.
206 * src/glib.h: Start msvc build.
207 * src/gdate.c: Start msvc build.
208 * src/gpattern.c: Start msvc build.
209 * src/gdir.c: Start msvc build.
210 * src/gfile.c: Start msvc build.
211 * src/gtimer.c: Start msvc build.
212 * src/gmodule.c: Start msvc build.
213 * src/gunicode.c: Start msvc build.
215 2007-01-27 Robert Jordan <robertj@gmx.net>
217 * test/Makefile.am: Add linker option to be able to
218 load symbols from the main program.
219 * test/module.c: Clean-ups.
221 2007-01-26 Robert Jordan <robertj@gmx.net>
223 * configure.ac: Add PLATFORM_WIN32 conditional.
224 * src/Makefile.ac: Use PLATFORM_WIN32 conditional for psapi, iconv
225 * test/module.c, test/tests.h, test/Makefile.am: New test for gmodule.
226 * src/gmodule.h: Add G_MODULE_{IMPORT|EXPORT} defines.
227 * src/gmodule.c (g_module_symbol): Implement in-proc symbol lookup
229 * src/gmodule.c: Add GModule.main_module, consider it in
231 * src/gpath.c (g_get_home_dir): Add dummy Win32 implementation to
234 2006-11-03 Miguel de Icaza <miguel@novell.com>
236 * src/gpath.c (g_path_get_dirname): If the pathname starts with a
239 * test/string-util.c (test_strlcpy): Add new test.
241 * src/gunicode.c (g_filename_from_utf8): g_strlcpy needs the full
242 size, with the extra zero at the end; Fixes the stack trace
245 2006-10-30 Miguel de Icaza <miguel@novell.com>
247 * test/utf8.c (test_utf8_seq): Add new failing test.
249 2006-10-30 Atsushi Enomoto <atsushi@ximian.com>
251 * src/gutf8.c : several fixes:
252 - fixed incorrect mb_size clear and mb_remain computation.
253 - initialize items_written to 0 for error case.
254 - in utf8_to_utf16_len differentiate error messages completely.
255 - in g_utf8_to_utf16 use guchar instead of gchar.
256 * test/utf8.c : added test case string in test_utf8_seq() to
257 both test_utf8_to_utf16() and test_utf16_to_utf8().
259 2006-10-21 Miguel de Icaza <miguel@novell.com>
261 * src/gunicode.c (g_filename_from_utf8): Use g_strlcpy here.
263 * src/gmarkup.c (g_markup_parse_context_parse): Do not dereference
264 null values here. This gets things a little bit further in
265 corlib, but not too far.
267 * src/gdir.c (g_dir_read_name): Do not return . or ..
269 * src/gstr.c (g_ascii_xdigit_value): Make this into a function,
270 thanks to Paolo for pointing the problem with the double macro
273 * src/gmodule.c (g_module_open): Actually return NULL if we fail
274 to load the module (was hiding the real bug in the pinvoke tests).
276 (g_module_build_path): Do not prepend "lib" if the "lib" is part
279 * src/gstr.c (g_strsplit): this routine has some non-expected
280 behavior, if the string begins with the delimiter, it will return
281 an empty first string, unlike strtok
283 * src/gpath.c (g_path_get_dirname): Return "." as a dirname for
284 paths that do not contain a directory.
286 2006-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
288 * test/array.c: new test for insertion in the middle of other values.
289 * src/garray.c: fixed destination index.
291 2006-10-18 Miguel de Icaza <miguel@novell.com>
293 * src/gpath.c (g_build_path): Do not append terminator if the next
296 * src/gutf8.c (g_utf8_to_utf16): Include trailing zero as
298 (g_utf16_to_utf8): Include trailing zero as documented.
300 2006-10-17 Miguel de Icaza <miguel@novell.com>
302 * src/gstr.c (g_strdown): Actually move.
304 * src/gmarkup.c (g_markup_parse_context_parse): Accept dots in the
305 sequence, reset the state after a closing element.
307 * src/garray.c (g_array_insert_vals): Shift the elements the
310 (g_array_insert_vals): Should actually use the
311 number of elements to insert.
313 * test/array.c: Add new test case, this was happening in the JIT.
315 * Add _GNU_SOURCE at configure time, remove from sources.
317 * src/gstr.c (g_strsplit): Empty strings return a 0 value vector.
319 * src/glib.h (G_MAXINT64, G_MININT64): Add another set of macros
320 for the support stuff.
322 Move private prototypes elsewhere
324 * src/glib.h (g_thread_init): Adding missing brace
325 (g_list_next): remove ; from the macro definition.
327 2006-10-17 Miguel de Icaza <miguel@novell.com>
329 * src/gutf8.c: internal methods
331 * src/ghashtable.c: internal methods.
333 2006-10-16 Miguel de Icaza <miguel@novell.com>
335 * src/gerror.c (g_propagate_error): Implement.
337 * src/gstr.c (g_strjoinv, g_ascii_strncasecmp): implement.
339 * test/string-util.c (test_ascii_strncasecmp): test
341 2006-10-15 Miguel de Icaza <miguel@novell.com>
343 * configure.in: Fix detection of platforms the [3456] stuff does
344 not work inside autoconf.
346 * src/eglib-config.h.in: Make G_BREAKPOINT into a function-macro
348 * src/glib.h (offsetof): Mono sources depend on this, bring this
349 from the standard definition. Redefine G_STRUCT_OFFSET in terms
352 * src/glib.h (G_STRUCT_OFFSET): fix macro definition.
355 * src/sizes.c: Add test.
357 * src/gshell.c: Make it build
359 2006-10-14 Miguel de Icaza <miguel@novell.com>
361 * src/glib.h: add various _TO_LE and _FROM_LE macros.
363 * test/endian.c: tests for endian conversion macros.
365 2006-10-09 Miguel de Icaza <miguel@novell.com>
367 * src/gmodule.h: Move definitions of gmodule to gmodule.h because
368 Mono expects it there.
370 Mon Oct 9 12:59:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
372 * src/ghashtable.c: s/to_prime/g_spaced_primes_closest/g
373 and put the array in readonly memory.
374 * src/gstr.c: fixed the build and made array const.
375 * src/gmodule.c: fixed thinko.
377 2006-10-08 Miguel de Icaza <miguel@novell.com>
379 * src/gstr.c (g_strdup): should allow NULL as an argument.
381 2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
383 * test/string-util.c:
386 * src/glib.h: implemented g_strescape.
388 2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
390 * test/string-util.c:
394 * src/glib.h: implemented g_strlcpy.
396 2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
398 * test/string-util.c:
401 * src/glib.h: implemented g_strdelimit.
403 2006-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
405 * test/spawn.c: add search path flag when running ls.
406 * src/gspawn.c: g_spawn_command_line_sync searches the program in the
407 PATH if it's not an absolute path.
409 2006-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
411 * test/string-util.c:
412 * src/glib.h: implement g_ascii_xdigit_value and tests.
414 2006-10-06 Miguel de Icaza <miguel@novell.com>
416 * src/gstr.c (g_ascii_strdown): Implement.
418 * str/glib.c (g_log_set_handler): empty.
420 (GMemVTable): define, empty, ignored.
423 * src/gunicode.c (g_convert): Add bytes_read, bytes_written
424 support; Small fixes to avoid valgrind errors.
426 (g_utf8_validate): Add, based on the libxml code.
428 gstr.c: implement g_strdown.
430 2006-10-05 Miguel de Icaza <miguel@novell.com>
432 * src/gunicode.c: Some work in progress to implement g_convert
433 (which is needed by g_locale_to_utf8).
435 2006-09-18 Miguel de Icaza <miguel@novell.com>
437 * test/string-util.c (test_filename_from_uri): tests for new
440 * src/gstr.c (g_filename_to_uri, g_filename_from_uri): implement.
442 2006-09-14 Atsushi Enomoto <atsushi@ximian.com>
444 * src/gutf8.c, test/utf8.c : EOL fix.
446 2006-09-04 Miguel de Icaza <miguel@novell.com>
448 * src/gmarkup.c: The leak fixing commit.
450 * src/gmarkup.c (g_markup_parse_context_end_parse): Add missing
452 (g_markup_parse_context_free): Implement.
453 (parse_attributes): Store the value, not the attribute name
455 Properly check the /> section.
456 (g_markup_parse_context_parse): When checking for error, use the
457 "error!=NULL && *error != NULL" upon return from callbacks,
458 it is only then that its valid to check for *error for error
460 (g_markup_parse_context_parse): Add comment processing.
462 Only release one element of the list.
464 * test/markup.c: Incorporate the kind of code that is used in Mono
465 for domain loading; Will test the rest later.
467 2006-09-01 Miguel de Icaza <miguel@novell.com>
469 * src/gmarkup.c (g_markup_parse_context_parse): Add text parsing
470 support, and end-element support; not tested yet.
472 2006-09-01 Atsushi Enomoto <atsushi@ximian.com>
474 * gutf8.c : bad allocation size. multiply sizeof gchar/gunichar2.
476 2006-09-01 Atsushi Enomoto <atsushi@ximian.com>
478 * gutf8.c : when error is null, utf8_to_utf16_len() and
479 utf16_to_utf8_len() could return -1, so return NULL for those
480 cases in g_utf8_to_utf16() and g_utf16_to_utf8().
482 2006-09-01 Miguel de Icaza <miguel@novell.com>
484 * src/gmarkup.c: Builds and does minimal parsing.
486 * test/markup.c: Sample test cases I have been using
488 2006-08-31 Atsushi Enomoto <atsushi@ximian.com>
491 src/gerror.c : added g_set_error().
493 g_utf8_to_utf16() and g_utf16_to_utf8() implementation.
494 * src/glib.h : added all above, and some dependent bits.
495 * src/Makefile.am : added gutf8.c.
496 * TODO: removed above.
498 test/tests.h : added utf8 tests.
499 * test/utf8.c : test for g_utf8_to_utf16 and g_utf16_to_utf8.
500 It still needs more tests e.g. for multibytes.
502 2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
504 * src/gspawn.c: small touch-ups and make read/write EINTR-proof.
506 2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
508 * test/file.c: remove useless test.
510 * test/spawn.c: new g_spawn_async_with_pipes test.
511 * src/glib.h: Modified file.
512 * src/gspawn.c: implemented g_spawn_async_with_pipes. Needs fine tuning.
514 2006-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
516 * TODO: Modified file.
524 * src/gfile.c: implemented g_dir_*, unix version.
526 2006-08-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
529 * test/Makefile.am: Modified file.
531 * src/Makefile.am: Modified file.
533 * src/gpattern.c: implemented the 3 pattern matching functions used.
535 * test/ptrarray.c: fix the compare function to work with qsort.
540 * src/gpath.c: made valgrind happy.
542 2006-08-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
546 * src/gfile.c: implemented g_file_test. Changed the default mask to
549 2006-08-26 Raja R Harinath <rharinath@novell.com>
551 * src/sort.frag.h (digit): Declare here based on externally
552 provided typedef 'list_node'.
553 (MAX_DIGITS): Use 'sizeof (list_node)'.
554 * src/gslist.c (list_node): Declare instead of 'digit'.
555 * src/glist.c: Likewise.
557 * test/slist.c (verify_sort): Verify the length of the list too.
558 (test_slist_sort): Free the correct list.
559 * test/list.c: Likewise.
560 * src/sort.frag.h (MAX_DIGITS): Rename from N_DIGITS.
561 (combine_sort): Change 'max_pos' argument to more natural
563 (increment): Likewise. Use 'n_digits' to avoid reading at an
564 offset that hasn't been initialized.
565 (do_sort): Remove memset.
567 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
572 * src/gfile.c: implement g_file_open_tmp.
574 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
578 * src/gdate.c: New file.
579 * src/gfile.c: New file.
580 * src/Makefile.am: implemented g_file_get_contents and
584 * test/file.c: New file.
585 * test/Makefile.am: tests for the above.
587 2006-08-26 Raja R Harinath <rharinath@novell.com>
589 * src/sort.frag.h: Add copyright notice and some explanation.
590 (increment): Remove null check.
591 (combine_digits): Add 'list' argument to seed the summation.
592 (do_sort): Use the empty or singleton tail as the seed, rather
593 than calling 'increment'.
595 2006-08-25 Raja R Harinath <rharinath@novell.com>
597 * TODO: Remove 'List' entries.
598 * src/Makefile.am (libeglib_la_SOURCES): Add sort.frag.h.
599 * src/sort.frag.h: New. Implements a "generic" bottom-up "counting"
600 mergesort that works both on singly- and doubly-linked lists.
601 * src/gslist.c (g_slist_sort): Use it.
602 * src/glist.c (g_list_sort): Likewise.
603 * src/glib.h (g_slist_sort, g_list_sort): Declare.
604 * test/slist.c, test/list.c: Add basic testcases.
606 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
608 * src/gspawn.c: propagate errors from reads.
609 * src/gpath.c: an empty PATH is like a NULL one.
611 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
619 * src/Makefile.am: implemented GTimer.
621 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
628 * src/Makefile.am: initial implentation of g_spawn_command_line_sync.
629 Still need better error handling, but works for the most part.
631 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
633 * src/garray.c: grow faster so that the 'big' test does not crawl.
635 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
638 * src/gqueue.c: plugged leaks.
640 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
643 * src/gpath.c: when PATH is not defined, the current dir is used.
646 2006-08-25 Alp Toker <alp@atoker.com>
648 * src/gstr.c: g_strv_length() should return guint, not gint
649 * src/glib.h: Add g_strv_length() prototype
651 2006-08-24 Miguel de Icaza <miguel@novell.com>
653 * src/gpath.c (g_get_home_dir, g_get_tmp_dir, g_get_user_name,
654 g_get_prgname, g_set_prgname): implemented.
658 * src/gpath.c (g_get_current_dir): Implement.
660 (g_find_program_in_path, g_path_is_absolute): implement.
662 Add g_path_get_dirname, g_path_get_basename
664 * src/gpath.c: Path routines
666 2006-08-23 Miguel de Icaza <miguel@novell.com>
668 * src/gerror.c: Implement.
670 * src/glist.c (g_list_sort): Remove routine instead of hoping that
671 it wont crash when we run it.
673 2006-08-23 Raja R Harinath <rharinath@novell.com>
675 * src/glist.c (g_list_insert_before): Avoid non-head declaration.
677 * test/slist.c (test_slist_insert_before): Add.
678 * src/gslist.c (g_slist_insert_before): Append if 'sibling' is null.
680 * test/list.c (test_list_insert_before): Add test for return value
681 of g_list_insert_before.
682 * test/Makefile.am (test_eglib_LDADD): Refer to the .la file so as
683 to rebuild test if eglib changes.
684 * src/glist.c (new_node, disconnect_node): New helpers that
685 maintain doubly-linked list invariants.
686 (g_list_prepend, g_list_append): Express in terms of new_node.
687 (g_list_insert_before): Likewise. Fix return value when inserting
688 in the middle of the list.
689 (g_list_concat): Reorganize to make more compact.
690 (g_list_nth): Likewise.
691 (g_list_nth_data): Don't segfault if 'n' is too large.
692 (g_list_remove): Rewrite using _find and disconnect_node.
693 (g_list_remove_link): Don't traverse list: use disconnect_node.
694 (g_list_insert_sorted): Rewrite to make more compact. Use new_node.
695 (g_list_copy): Likewise.
696 (_prepend, _concat): Remove.
697 * src/gslist.c (insert_after, find_prev, find_prev_link):
699 (g_slist_copy): Simplify slightly, using insert_after.
700 (g_slist_concat): Reorganize to make more compact.
701 (g_slist_find): Likewise.
702 (g_slist_insert_sorted): Likewise.
703 (g_slist_remove): Rewrite using find_prev.
704 (g_slist_remove_link): Rewrite using find_prev_link.
705 (g_slist_remove_all, g_slist_insert_before): New.
707 2006-08-21 Duncan Mak <duncan@a-chinaman.com>
709 * src/gqueue.c: GQueue implementation.
710 * src/glib.h: Add prototypes.
711 * src/Makefile.am (libeglib_la_SOURCES): Include gqueue.c.
714 * test/Makefile.am (SOURCES):
715 * test/tests.h (DEFINE_TEST_GROUP_INIT_H): add tests for GQueue.
717 2006-08-21 Aaron Bockover <abockover@novell.com>
719 * src/gstr.c: fixed bug/invalid read/write on malloc-only case (no
720 realloc/delimiter token not found); use memcpy instead of strncpy for
723 * test/test.c (run_group): allow running specific tests under a group;
724 added copied g_strsplit/g_strfreev from EGlib source as eg_strsplit
725 and eg_strfreev to avoid performance skews in the driver
727 * test/driver.c: allow user-specified group name to contain specific
728 test to run under the group as 'group_name:test1,test2,...testN'
730 * test/string-util.c: Added more g_strsplit tests
738 * test/hashtable.c: make test names shorter (no need to prefix with
739 the group since it runs under the group)
741 2006-08-21 Miguel de Icaza <miguel@novell.com>
743 * src/glib.h (g_hash_table_new_full): Add missing prototype.
744 Replace g_free(x) with plain free, so it can be used as a function
748 * src/ghashtable.c: Add rehashing.
750 * test/hashtable.c: Add a bunch of extra tests.
752 * src/goutput.c: Fix g_log so it actually formats the data.
754 * src/ghashtable.c (g_hash_table_new): The glib test suite
755 uncovered a bunch of bugs, the g_hash_table_new should actually
758 (g_hash_table_remove, g_hash_table_foreach_remove): Fixed bugs
761 2006-08-20 Aaron Bockover <abockover@novell.com>
763 * src/gmisc.c: added g_setenv, g_getenv, g_unsetenv
765 * src/gstr.c: added g_snprintf, g_sprintf, g_fprintf, g_printf
767 * src/glib.h: added macros for above va_args printf functions
769 * src/Makefile.am: added gmisc.c
771 * test/whats-implemented: script to see what needs to be implemented
773 2006-08-20 Chris Toshok <toshok@ximian.com>
775 * test/array.c (test_array_big): add a test from the glib
778 2006-08-20 Chris Toshok <toshok@ximian.com>
780 * test/tests.h: add array tests to the mix.
782 * test/array.c: a few array tests.
784 * src/glib.h: add array prototypes.
786 * src/garray.c: initial array foo.
788 * test/Makefile.am (SOURCES): add array.c
790 * src/Makefile.am (libeglib_la_SOURCES): add garray.c
792 2006-08-19 Aaron Bockover <abockover@novell.com>
794 * src/gstring.c: optimize and generalize reallocation by providing
795 a GROW_IF_NECESSARY macro, do not use strcpy/strcat as they are
796 very, very slow; GString is now much closer to GLib's implementation
797 in terms of performance
799 * test/string.c: added speed-specific tests to beat on reallocation code
801 * test/test-both: run make if the test drivers don't exist
803 2006-08-19 Jonathan Chambers <jonathan.chambers@gmail.com>
805 * src/gmodule.c: Add gmodule support for windows and fix
806 windows build. Contribution is licensed as MIT/X11.
808 2006-08-19 Aaron Bockover <abockover@novell.com>
810 * test/driver.c: Added --debug mode that allows for testing all paths
811 of the driver without actually running real tests; runs only the 'fake'
812 test, which does nothing; useful for running the driver through valgrind
816 * test/fake.c: Added fake test for valgrinding the driver
818 * test/ptrarray.c: update sort test
820 2006-08-19 Aaron Bockover <abockover@novell.com>
822 * test/test-both: added --help
824 2006-08-19 Aaron Bockover <abockover@novell.com>
826 * test/driver.c: added -n mode to show only raw global run times,
827 which is useful for scripts (test-both --speed-compare)
829 * test/test-both: added --speed-compare mode
831 * test/README: updated with information on --speed-compare
833 2006-08-19 Aaron Bockover <abockover@novell.com>
835 * test/test.c: do not print times if -t is not passed
837 * test/driver.c: removed use of GList from the driver to avoid skews due
838 to performance differences between GLib and EGLib
840 2006-08-19 Aaron Bockover <abockover@novell.com>
842 * test/test.c: Perform iterations at the test level, only output one
843 report for all iterations of tests in a group to produce more usable
844 output; add timing for the tests and group; added get_timestamp for
847 * test/test.h: Removed run_test as it should only be called from
848 run_group, added get_timestamp
850 * test/Makefile.am: Added -DDRIVER_NAME
852 * test/test-both: simple script to run both drivers with the same options
854 * test/driver.c: Iterations are now run at the test level, show a global
855 status (OK/FAIL) indicator
857 * test/README: Updated
859 * configure.ac: Renamed from configure.in as configure.in naming
860 convention is deprecated in favor of configure.ac
862 * autogen.sh: s/configure.in/configure.ac/
864 2006-08-19 Miguel de Icaza <miguel@novell.com>
866 * Makefile.am: Removed MAINTAINERCLEANFILES that was too
867 aggresive, it failed make distcheck and the resulting tarball was
870 * src/glib.h: remove the various GPOINTER_TO_*, G*_TO_POINTER,
871 GSIZE_FORMAT macros, and move them into src/eglib-config.h
873 Moved also gssize and gsize to be arch specific. This should fix
874 the 32/64 problems that Jon Chambers reported.
876 * configure.in: test for pointer size, define the various values
877 depending on 32 vs 32/64 worlds, might need further porting in the
880 Change package name to eglib
882 * test/slist.c, test/list.c, test/hashtable.c: Update tests to use
885 * test/string-util.c: fix leak for valgrind tests.
887 * test/tests.h: New size test, for testing datatypes.
889 * test/sizes.c: New tests.
891 2006-08-19 Aaron Bockover <abockover@novell.com>
893 * test/README: Added quick guide on adding new tests/groups to the
894 driver and some examples on how to perform various tests with the driver
896 2006-08-18 Aaron Bockover <abockover@novell.com>
898 * test/driver.c: Added getopt support and code timing, among other
899 nice features to make testing/profiling easier
901 * test/test.c: Add support for suppressing output (quiet) and
902 define RESULT, FAILED, and OK
905 * src/glist.c: Added g_list_nth_data implementation
908 * test/string-util.c:
912 * test/list.c: Use RESULT, FAILURE, and OK for tests
914 2006-08-18 Miguel de Icaza <miguel@novell.com>
916 * src/gstring.c (g_string_truncate): Implement truncate.
917 (g_string_prepend): implement.
919 Fix various bugs uncovered by new tests.
921 * src/glib.h: introduce gssize type, the signed one. Important.
923 * src/eglib-config.h (G_OS_): Add the G_OS_UNIX and G_OS_WIN32
924 defines that we can use to check on the host OS.
926 2006-08-18 Aaron Bockover <abockover@novell.com>
929 * test/driver.c: Support pass/fail logging on tests to show group report
931 2006-08-18 Aaron Bockover <abockover@novell.com>
934 * test/test.h: Added result() to be used in place of g_strdup_printf(),
935 it's shorter to write and allows the duped string to be freed safely;
936 added license header to file
938 * test/driver.c: Added license header to file
940 * test/string-util.c:
943 * test/list.c: Use result() in place of g_strdup_printf(), it's nicer
945 2006-08-18 Aaron Bockover <abockover@novell.com>
947 * src/gptrarray.c: Implemented g_ptr_array_sort
949 * test/ptrarray.c: Added sort test
951 * test/driver.c: Added --help; support running N iterations and allow
952 selecting which test groups to run; uses the test group table in tests.h
954 * test/tests.h: Added group table
957 * test/test.c: Using a Group structure and table, removed run_groups
958 as we only need run_group now
960 * test/slist.h: Removed, not needed, tests/groups defined in tests.h
962 2006-08-18 Miguel de Icaza <miguel@novell.com>
964 * src/unicode.c: New file, to host unicode code, it will throw as
965 this code is no longer used in the Mono runtime anyways.
967 * src/glib.h: Use stdint.h types, a lot of the good stuff is
970 2006-08-18 Duncan Mak <duncan@a-chinaman.com>
972 * src/glist.c (g_list_remove, g_list_remove_link): Implemented.
974 * src/gslist.c (g_slist_remove): Remember to set the next pointer
975 to NULL when the item to remove is the first item in the list.
977 2006-08-18 Duncan Mak <duncan@a-chinaman.com>
979 * src/glist.c: Implemented. Missing remove,
980 remove_link and insert_before.
982 * test/list.c: Tests for GList.
984 2006-08-17 Aaron Bockover <abockover@novell.com>
986 * src/gptrarray.c: Implemented g_ptr_array_remove and
987 g_ptr_array_remove_index
989 * test/other: Removed, rewritten in Makefile.am
991 * test/Makefile.am: Build test-eglib against local eglib and
992 test-glib against GLib 2.0 (replaces 'other')
994 * test/ptrarray.c: Added tests for g_ptr_array_remove and
995 g_ptr_array_remove_index
997 2006-08-17 Duncan Mak <duncan@a-chinaman.com>
999 * src/gslist.c: Added MIT license.
1000 (g_slist_insert_sorted): Forgot the case where the data is
1001 appended to the end of the list.
1003 * test/slist.c (test_slist_insert_sorted): Fix the test.
1005 2006-08-17 Aaron Bockover <abockover@novell.com>
1007 * src/gptrarray.c: Added g_ptr_array_set_size implementation
1009 * test/ptrarray.c: Added test for g_ptr_array_set_size
1011 2006-08-17 Miguel de Icaza <miguel@novell.com>
1013 * src/glib.h: A handful of extra macros
1015 * configure.in, src/eglib-config.h.in: Set some system-specific
1016 settings that are probed at configure time.
1018 2006-08-17 Aaron Bockover <abockover@novell.com>
1020 * src/gptrarray.c: Added beginnings of GPtrArray (alloc, free, add, iterate)
1022 * src/glib.h: Added GPtrArray signatures
1024 * src/Makefile.am: Added gptrarray.c to build
1029 * test/Makefile.am: Add ptrarray tests for available functionality
1031 2006-08-17 Aaron Bockover <abockover@novell.com>
1034 * test/test.c: Added group iterator/test driver functionality
1036 * test/driver.c: Added groups to run using new test functionality
1040 * test/string-util.h: Test group definitions for string util/hashtable
1044 * test/hash.c: Added test definition table
1046 * test/Makefile.am: Added -Wall -Werror -D_FORTIFY_SOURCE=2
1048 * src/gstr.c: Added implementation for g_str_has_prefix, g_str_has_suffix
1050 * src/glib.h: Added missing function signatures
1052 * src/Makefile.am: added -D_FORTIFY_SOURCE=2
1054 2006-08-17 Duncan Mak <duncan@a-chinaman.com>
1056 * src/gslist.c (g_slist_remove_link): I misread the function
1057 signature. Re-implemented.
1058 (g_slist_delete_link): Implemented.
1059 (g_slist_reverse): Implemented.
1060 (g_slist_insert_sorted): Implemented.
1062 2006-08-17 Duncan Mak <duncan@a-chinaman.com>
1064 * src/gslist.c (g_slist_find):
1067 (g_slist_remove_link): Implemented.
1069 * test/slist.c: Tests for GSList.
1071 2006-08-17 Raja R Harinath <harinath@gmail.com>
1073 * src/gslist.c (g_slist_free_1): New. Free a single list node.
1074 (g_slist_free): Use it to free the list nodes. Don't free the
1075 data, since the list doesn't own it.
1076 (g_slist_append): Convert into a one-liner.
1077 (g_slist_foreach): Remove redundant null check.
1078 (g_slist_last): Actually return the last node.
1079 (g_slist_copy): Simplify.
1080 * src/gslist.h (g_slist_free_1): Add.
1082 2006-08-16 Duncan Mak <duncan@a-chinaman.com>
1086 * src/gslist.h: First attempt at implementing GSList, incomplete.
1088 * src/Makefile.am (libeglib_la_SOURCES): add gslist.c
1089 * src/glib.h: Add GFunc definition. #include the new gslist.h.
1091 2006-08-16 Miguel de Icaza <miguel@novell.com>
1093 * src/Makefile.am: Added -Wall,-Werror, corrected lots of
1096 * src/gstring.c: Gstring implementation.
1098 * test/str.c (test_gstring): string tests.
1100 2006-08-16 Aaron Bockover <abockover@novell.com>
1102 * src/gstr.c: Added g_strsplit implementation
1104 * test/driver.c: Run the split test
1106 * test/str.c: Added a test for g_strsplit
1110 * test/Makefile.am: Added MAINTAINERCLEANFILES
1112 2006-08-16 Miguel de Icaza <miguel@novell.com>
1114 * src/gouput.c: Implement some output routines, update missing
1117 * test: Add test driver, and initial tests.
1119 2006-08-15 Miguel de Icaza <miguel@novell.com>
1121 * src/ghashtable.c: Implement most of this, it is completely
1122 untested at this point.