1 2006-09-18 Miguel de Icaza <miguel@novell.com>
3 * test/string-util.c (test_filename_from_uri): tests for new
6 * src/gstr.c (g_filename_to_uri, g_filename_from_uri): implement.
8 2006-09-14 Atsushi Enomoto <atsushi@ximian.com>
10 * src/gutf8.c, test/utf8.c : EOL fix.
12 2006-09-04 Miguel de Icaza <miguel@novell.com>
14 * src/gmarkup.c: The leak fixing commit.
16 * src/gmarkup.c (g_markup_parse_context_end_parse): Add missing
18 (g_markup_parse_context_free): Implement.
19 (parse_attributes): Store the value, not the attribute name
21 Properly check the /> section.
22 (g_markup_parse_context_parse): When checking for error, use the
23 "error!=NULL && *error != NULL" upon return from callbacks,
24 it is only then that its valid to check for *error for error
26 (g_markup_parse_context_parse): Add comment processing.
28 Only release one element of the list.
30 * test/markup.c: Incorporate the kind of code that is used in Mono
31 for domain loading; Will test the rest later.
33 2006-09-01 Miguel de Icaza <miguel@novell.com>
35 * src/gmarkup.c (g_markup_parse_context_parse): Add text parsing
36 support, and end-element support; not tested yet.
38 2006-09-01 Atsushi Enomoto <atsushi@ximian.com>
40 * gutf8.c : bad allocation size. multiply sizeof gchar/gunichar2.
42 2006-09-01 Atsushi Enomoto <atsushi@ximian.com>
44 * gutf8.c : when error is null, utf8_to_utf16_len() and
45 utf16_to_utf8_len() could return -1, so return NULL for those
46 cases in g_utf8_to_utf16() and g_utf16_to_utf8().
48 2006-09-01 Miguel de Icaza <miguel@novell.com>
50 * src/gmarkup.c: Builds and does minimal parsing.
52 * test/markup.c: Sample test cases I have been using
54 2006-08-31 Atsushi Enomoto <atsushi@ximian.com>
57 src/gerror.c : added g_set_error().
59 g_utf8_to_utf16() and g_utf16_to_utf8() implementation.
60 * src/glib.h : added all above, and some dependent bits.
61 * src/Makefile.am : added gutf8.c.
62 * TODO: removed above.
64 test/tests.h : added utf8 tests.
65 * test/utf8.c : test for g_utf8_to_utf16 and g_utf16_to_utf8.
66 It still needs more tests e.g. for multibytes.
68 2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
70 * src/gspawn.c: small touch-ups and make read/write EINTR-proof.
72 2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
74 * test/file.c: remove useless test.
76 * test/spawn.c: new g_spawn_async_with_pipes test.
77 * src/glib.h: Modified file.
78 * src/gspawn.c: implemented g_spawn_async_with_pipes. Needs fine tuning.
80 2006-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
82 * TODO: Modified file.
90 * src/gfile.c: implemented g_dir_*, unix version.
92 2006-08-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
95 * test/Makefile.am: Modified file.
97 * src/Makefile.am: Modified file.
99 * src/gpattern.c: implemented the 3 pattern matching functions used.
101 * test/ptrarray.c: fix the compare function to work with qsort.
106 * src/gpath.c: made valgrind happy.
108 2006-08-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
112 * src/gfile.c: implemented g_file_test. Changed the default mask to
115 2006-08-26 Raja R Harinath <rharinath@novell.com>
117 * src/sort.frag.h (digit): Declare here based on externally
118 provided typedef 'list_node'.
119 (MAX_DIGITS): Use 'sizeof (list_node)'.
120 * src/gslist.c (list_node): Declare instead of 'digit'.
121 * src/glist.c: Likewise.
123 * test/slist.c (verify_sort): Verify the length of the list too.
124 (test_slist_sort): Free the correct list.
125 * test/list.c: Likewise.
126 * src/sort.frag.h (MAX_DIGITS): Rename from N_DIGITS.
127 (combine_sort): Change 'max_pos' argument to more natural
129 (increment): Likewise. Use 'n_digits' to avoid reading at an
130 offset that hasn't been initialized.
131 (do_sort): Remove memset.
133 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
138 * src/gfile.c: implement g_file_open_tmp.
140 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
144 * src/gdate.c: New file.
145 * src/gfile.c: New file.
146 * src/Makefile.am: implemented g_file_get_contents and
150 * test/file.c: New file.
151 * test/Makefile.am: tests for the above.
153 2006-08-26 Raja R Harinath <rharinath@novell.com>
155 * src/sort.frag.h: Add copyright notice and some explanation.
156 (increment): Remove null check.
157 (combine_digits): Add 'list' argument to seed the summation.
158 (do_sort): Use the empty or singleton tail as the seed, rather
159 than calling 'increment'.
161 2006-08-25 Raja R Harinath <rharinath@novell.com>
163 * TODO: Remove 'List' entries.
164 * src/Makefile.am (libeglib_la_SOURCES): Add sort.frag.h.
165 * src/sort.frag.h: New. Implements a "generic" bottom-up "counting"
166 mergesort that works both on singly- and doubly-linked lists.
167 * src/gslist.c (g_slist_sort): Use it.
168 * src/glist.c (g_list_sort): Likewise.
169 * src/glib.h (g_slist_sort, g_list_sort): Declare.
170 * test/slist.c, test/list.c: Add basic testcases.
172 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
174 * src/gspawn.c: propagate errors from reads.
175 * src/gpath.c: an empty PATH is like a NULL one.
177 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
185 * src/Makefile.am: implemented GTimer.
187 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
194 * src/Makefile.am: initial implentation of g_spawn_command_line_sync.
195 Still need better error handling, but works for the most part.
197 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
199 * src/garray.c: grow faster so that the 'big' test does not crawl.
201 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
204 * src/gqueue.c: plugged leaks.
206 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
209 * src/gpath.c: when PATH is not defined, the current dir is used.
212 2006-08-25 Alp Toker <alp@atoker.com>
214 * src/gstr.c: g_strv_length() should return guint, not gint
215 * src/glib.h: Add g_strv_length() prototype
217 2006-08-24 Miguel de Icaza <miguel@novell.com>
219 * src/gpath.c (g_get_home_dir, g_get_tmp_dir, g_get_user_name,
220 g_get_prgname, g_set_prgname): implemented.
224 * src/gpath.c (g_get_current_dir): Implement.
226 (g_find_program_in_path, g_path_is_absolute): implement.
228 Add g_path_get_dirname, g_path_get_basename
230 * src/gpath.c: Path routines
232 2006-08-23 Miguel de Icaza <miguel@novell.com>
234 * src/gerror.c: Implement.
236 * src/glist.c (g_list_sort): Remove routine instead of hoping that
237 it wont crash when we run it.
239 2006-08-23 Raja R Harinath <rharinath@novell.com>
241 * src/glist.c (g_list_insert_before): Avoid non-head declaration.
243 * test/slist.c (test_slist_insert_before): Add.
244 * src/gslist.c (g_slist_insert_before): Append if 'sibling' is null.
246 * test/list.c (test_list_insert_before): Add test for return value
247 of g_list_insert_before.
248 * test/Makefile.am (test_eglib_LDADD): Refer to the .la file so as
249 to rebuild test if eglib changes.
250 * src/glist.c (new_node, disconnect_node): New helpers that
251 maintain doubly-linked list invariants.
252 (g_list_prepend, g_list_append): Express in terms of new_node.
253 (g_list_insert_before): Likewise. Fix return value when inserting
254 in the middle of the list.
255 (g_list_concat): Reorganize to make more compact.
256 (g_list_nth): Likewise.
257 (g_list_nth_data): Don't segfault if 'n' is too large.
258 (g_list_remove): Rewrite using _find and disconnect_node.
259 (g_list_remove_link): Don't traverse list: use disconnect_node.
260 (g_list_insert_sorted): Rewrite to make more compact. Use new_node.
261 (g_list_copy): Likewise.
262 (_prepend, _concat): Remove.
263 * src/gslist.c (insert_after, find_prev, find_prev_link):
265 (g_slist_copy): Simplify slightly, using insert_after.
266 (g_slist_concat): Reorganize to make more compact.
267 (g_slist_find): Likewise.
268 (g_slist_insert_sorted): Likewise.
269 (g_slist_remove): Rewrite using find_prev.
270 (g_slist_remove_link): Rewrite using find_prev_link.
271 (g_slist_remove_all, g_slist_insert_before): New.
273 2006-08-21 Duncan Mak <duncan@a-chinaman.com>
275 * src/gqueue.c: GQueue implementation.
276 * src/glib.h: Add prototypes.
277 * src/Makefile.am (libeglib_la_SOURCES): Include gqueue.c.
280 * test/Makefile.am (SOURCES):
281 * test/tests.h (DEFINE_TEST_GROUP_INIT_H): add tests for GQueue.
283 2006-08-21 Aaron Bockover <abockover@novell.com>
285 * src/gstr.c: fixed bug/invalid read/write on malloc-only case (no
286 realloc/delimiter token not found); use memcpy instead of strncpy for
289 * test/test.c (run_group): allow running specific tests under a group;
290 added copied g_strsplit/g_strfreev from EGlib source as eg_strsplit
291 and eg_strfreev to avoid performance skews in the driver
293 * test/driver.c: allow user-specified group name to contain specific
294 test to run under the group as 'group_name:test1,test2,...testN'
296 * test/string-util.c: Added more g_strsplit tests
304 * test/hashtable.c: make test names shorter (no need to prefix with
305 the group since it runs under the group)
307 2006-08-21 Miguel de Icaza <miguel@novell.com>
309 * src/glib.h (g_hash_table_new_full): Add missing prototype.
310 Replace g_free(x) with plain free, so it can be used as a function
314 * src/ghashtable.c: Add rehashing.
316 * test/hashtable.c: Add a bunch of extra tests.
318 * src/goutput.c: Fix g_log so it actually formats the data.
320 * src/ghashtable.c (g_hash_table_new): The glib test suite
321 uncovered a bunch of bugs, the g_hash_table_new should actually
324 (g_hash_table_remove, g_hash_table_foreach_remove): Fixed bugs
327 2006-08-20 Aaron Bockover <abockover@novell.com>
329 * src/gmisc.c: added g_setenv, g_getenv, g_unsetenv
331 * src/gstr.c: added g_snprintf, g_sprintf, g_fprintf, g_printf
333 * src/glib.h: added macros for above va_args printf functions
335 * src/Makefile.am: added gmisc.c
337 * test/whats-implemented: script to see what needs to be implemented
339 2006-08-20 Chris Toshok <toshok@ximian.com>
341 * test/array.c (test_array_big): add a test from the glib
344 2006-08-20 Chris Toshok <toshok@ximian.com>
346 * test/tests.h: add array tests to the mix.
348 * test/array.c: a few array tests.
350 * src/glib.h: add array prototypes.
352 * src/garray.c: initial array foo.
354 * test/Makefile.am (SOURCES): add array.c
356 * src/Makefile.am (libeglib_la_SOURCES): add garray.c
358 2006-08-19 Aaron Bockover <abockover@novell.com>
360 * src/gstring.c: optimize and generalize reallocation by providing
361 a GROW_IF_NECESSARY macro, do not use strcpy/strcat as they are
362 very, very slow; GString is now much closer to GLib's implementation
363 in terms of performance
365 * test/string.c: added speed-specific tests to beat on reallocation code
367 * test/test-both: run make if the test drivers don't exist
369 2006-08-19 Jonathan Chambers <jonathan.chambers@gmail.com>
371 * src/gmodule.c: Add gmodule support for windows and fix
372 windows build. Contribution is licensed as MIT/X11.
374 2006-08-19 Aaron Bockover <abockover@novell.com>
376 * test/driver.c: Added --debug mode that allows for testing all paths
377 of the driver without actually running real tests; runs only the 'fake'
378 test, which does nothing; useful for running the driver through valgrind
382 * test/fake.c: Added fake test for valgrinding the driver
384 * test/ptrarray.c: update sort test
386 2006-08-19 Aaron Bockover <abockover@novell.com>
388 * test/test-both: added --help
390 2006-08-19 Aaron Bockover <abockover@novell.com>
392 * test/driver.c: added -n mode to show only raw global run times,
393 which is useful for scripts (test-both --speed-compare)
395 * test/test-both: added --speed-compare mode
397 * test/README: updated with information on --speed-compare
399 2006-08-19 Aaron Bockover <abockover@novell.com>
401 * test/test.c: do not print times if -t is not passed
403 * test/driver.c: removed use of GList from the driver to avoid skews due
404 to performance differences between GLib and EGLib
406 2006-08-19 Aaron Bockover <abockover@novell.com>
408 * test/test.c: Perform iterations at the test level, only output one
409 report for all iterations of tests in a group to produce more usable
410 output; add timing for the tests and group; added get_timestamp for
413 * test/test.h: Removed run_test as it should only be called from
414 run_group, added get_timestamp
416 * test/Makefile.am: Added -DDRIVER_NAME
418 * test/test-both: simple script to run both drivers with the same options
420 * test/driver.c: Iterations are now run at the test level, show a global
421 status (OK/FAIL) indicator
423 * test/README: Updated
425 * configure.ac: Renamed from configure.in as configure.in naming
426 convention is deprecated in favor of configure.ac
428 * autogen.sh: s/configure.in/configure.ac/
430 2006-08-19 Miguel de Icaza <miguel@novell.com>
432 * Makefile.am: Removed MAINTAINERCLEANFILES that was too
433 aggresive, it failed make distcheck and the resulting tarball was
436 * src/glib.h: remove the various GPOINTER_TO_*, G*_TO_POINTER,
437 GSIZE_FORMAT macros, and move them into src/eglib-config.h
439 Moved also gssize and gsize to be arch specific. This should fix
440 the 32/64 problems that Jon Chambers reported.
442 * configure.in: test for pointer size, define the various values
443 depending on 32 vs 32/64 worlds, might need further porting in the
446 Change package name to eglib
448 * test/slist.c, test/list.c, test/hashtable.c: Update tests to use
451 * test/string-util.c: fix leak for valgrind tests.
453 * test/tests.h: New size test, for testing datatypes.
455 * test/sizes.c: New tests.
457 2006-08-19 Aaron Bockover <abockover@novell.com>
459 * test/README: Added quick guide on adding new tests/groups to the
460 driver and some examples on how to perform various tests with the driver
462 2006-08-18 Aaron Bockover <abockover@novell.com>
464 * test/driver.c: Added getopt support and code timing, among other
465 nice features to make testing/profiling easier
467 * test/test.c: Add support for suppressing output (quiet) and
468 define RESULT, FAILED, and OK
471 * src/glist.c: Added g_list_nth_data implementation
474 * test/string-util.c:
478 * test/list.c: Use RESULT, FAILURE, and OK for tests
480 2006-08-18 Miguel de Icaza <miguel@novell.com>
482 * src/gstring.c (g_string_truncate): Implement truncate.
483 (g_string_prepend): implement.
485 Fix various bugs uncovered by new tests.
487 * src/glib.h: introduce gssize type, the signed one. Important.
489 * src/eglib-config.h (G_OS_): Add the G_OS_UNIX and G_OS_WIN32
490 defines that we can use to check on the host OS.
492 2006-08-18 Aaron Bockover <abockover@novell.com>
495 * test/driver.c: Support pass/fail logging on tests to show group report
497 2006-08-18 Aaron Bockover <abockover@novell.com>
500 * test/test.h: Added result() to be used in place of g_strdup_printf(),
501 it's shorter to write and allows the duped string to be freed safely;
502 added license header to file
504 * test/driver.c: Added license header to file
506 * test/string-util.c:
509 * test/list.c: Use result() in place of g_strdup_printf(), it's nicer
511 2006-08-18 Aaron Bockover <abockover@novell.com>
513 * src/gptrarray.c: Implemented g_ptr_array_sort
515 * test/ptrarray.c: Added sort test
517 * test/driver.c: Added --help; support running N iterations and allow
518 selecting which test groups to run; uses the test group table in tests.h
520 * test/tests.h: Added group table
523 * test/test.c: Using a Group structure and table, removed run_groups
524 as we only need run_group now
526 * test/slist.h: Removed, not needed, tests/groups defined in tests.h
528 2006-08-18 Miguel de Icaza <miguel@novell.com>
530 * src/unicode.c: New file, to host unicode code, it will throw as
531 this code is no longer used in the Mono runtime anyways.
533 * src/glib.h: Use stdint.h types, a lot of the good stuff is
536 2006-08-18 Duncan Mak <duncan@a-chinaman.com>
538 * src/glist.c (g_list_remove, g_list_remove_link): Implemented.
540 * src/gslist.c (g_slist_remove): Remember to set the next pointer
541 to NULL when the item to remove is the first item in the list.
543 2006-08-18 Duncan Mak <duncan@a-chinaman.com>
545 * src/glist.c: Implemented. Missing remove,
546 remove_link and insert_before.
548 * test/list.c: Tests for GList.
550 2006-08-17 Aaron Bockover <abockover@novell.com>
552 * src/gptrarray.c: Implemented g_ptr_array_remove and
553 g_ptr_array_remove_index
555 * test/other: Removed, rewritten in Makefile.am
557 * test/Makefile.am: Build test-eglib against local eglib and
558 test-glib against GLib 2.0 (replaces 'other')
560 * test/ptrarray.c: Added tests for g_ptr_array_remove and
561 g_ptr_array_remove_index
563 2006-08-17 Duncan Mak <duncan@a-chinaman.com>
565 * src/gslist.c: Added MIT license.
566 (g_slist_insert_sorted): Forgot the case where the data is
567 appended to the end of the list.
569 * test/slist.c (test_slist_insert_sorted): Fix the test.
571 2006-08-17 Aaron Bockover <abockover@novell.com>
573 * src/gptrarray.c: Added g_ptr_array_set_size implementation
575 * test/ptrarray.c: Added test for g_ptr_array_set_size
577 2006-08-17 Miguel de Icaza <miguel@novell.com>
579 * src/glib.h: A handful of extra macros
581 * configure.in, src/eglib-config.h.in: Set some system-specific
582 settings that are probed at configure time.
584 2006-08-17 Aaron Bockover <abockover@novell.com>
586 * src/gptrarray.c: Added beginnings of GPtrArray (alloc, free, add, iterate)
588 * src/glib.h: Added GPtrArray signatures
590 * src/Makefile.am: Added gptrarray.c to build
595 * test/Makefile.am: Add ptrarray tests for available functionality
597 2006-08-17 Aaron Bockover <abockover@novell.com>
600 * test/test.c: Added group iterator/test driver functionality
602 * test/driver.c: Added groups to run using new test functionality
606 * test/string-util.h: Test group definitions for string util/hashtable
610 * test/hash.c: Added test definition table
612 * test/Makefile.am: Added -Wall -Werror -D_FORTIFY_SOURCE=2
614 * src/gstr.c: Added implementation for g_str_has_prefix, g_str_has_suffix
616 * src/glib.h: Added missing function signatures
618 * src/Makefile.am: added -D_FORTIFY_SOURCE=2
620 2006-08-17 Duncan Mak <duncan@a-chinaman.com>
622 * src/gslist.c (g_slist_remove_link): I misread the function
623 signature. Re-implemented.
624 (g_slist_delete_link): Implemented.
625 (g_slist_reverse): Implemented.
626 (g_slist_insert_sorted): Implemented.
628 2006-08-17 Duncan Mak <duncan@a-chinaman.com>
630 * src/gslist.c (g_slist_find):
633 (g_slist_remove_link): Implemented.
635 * test/slist.c: Tests for GSList.
637 2006-08-17 Raja R Harinath <harinath@gmail.com>
639 * src/gslist.c (g_slist_free_1): New. Free a single list node.
640 (g_slist_free): Use it to free the list nodes. Don't free the
641 data, since the list doesn't own it.
642 (g_slist_append): Convert into a one-liner.
643 (g_slist_foreach): Remove redundant null check.
644 (g_slist_last): Actually return the last node.
645 (g_slist_copy): Simplify.
646 * src/gslist.h (g_slist_free_1): Add.
648 2006-08-16 Duncan Mak <duncan@a-chinaman.com>
652 * src/gslist.h: First attempt at implementing GSList, incomplete.
654 * src/Makefile.am (libeglib_la_SOURCES): add gslist.c
655 * src/glib.h: Add GFunc definition. #include the new gslist.h.
657 2006-08-16 Miguel de Icaza <miguel@novell.com>
659 * src/Makefile.am: Added -Wall,-Werror, corrected lots of
662 * src/gstring.c: Gstring implementation.
664 * test/str.c (test_gstring): string tests.
666 2006-08-16 Aaron Bockover <abockover@novell.com>
668 * src/gstr.c: Added g_strsplit implementation
670 * test/driver.c: Run the split test
672 * test/str.c: Added a test for g_strsplit
676 * test/Makefile.am: Added MAINTAINERCLEANFILES
678 2006-08-16 Miguel de Icaza <miguel@novell.com>
680 * src/gouput.c: Implement some output routines, update missing
683 * test: Add test driver, and initial tests.
685 2006-08-15 Miguel de Icaza <miguel@novell.com>
687 * src/ghashtable.c: Implement most of this, it is completely
688 untested at this point.