* TODO: Remove 'List' entries.
[mono.git] / eglib / ChangeLog
1 2006-08-25  Raja R Harinath  <rharinath@novell.com>
2
3         * TODO: Remove 'List' entries.
4         * src/Makefile.am (libeglib_la_SOURCES): Add sort.frag.h.
5         * src/sort.frag.h: New.  Implements a "generic" bottom-up "counting"
6         mergesort that works both on singly- and doubly-linked lists.
7         * src/gslist.c (g_slist_sort): Use it.
8         * src/glist.c (g_list_sort): Likewise.
9         * src/glib.h (g_slist_sort, g_list_sort): Declare.
10         * test/slist.c, test/list.c: Add basic testcases.
11
12 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13
14         * src/gspawn.c: propagate errors from reads.
15         * src/gpath.c: an empty PATH is like a NULL one.
16
17 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18
19         * test/tests.h:
20         * test/timer.c:
21         * test/Makefile.am:
22         * TODO:
23         * src/glib.h:
24         * src/gtimer.c:
25         * src/Makefile.am: implemented GTimer.
26
27 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28
29         * test/tests.h:
30         * test/Makefile.am:
31         * test/spawn.c:
32         * src/gspawn.c:
33         * src/glib.h:
34         * src/Makefile.am: initial implentation of g_spawn_command_line_sync.
35         Still need better error handling, but works for the most part.
36
37 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
38
39         * src/garray.c: grow faster so that the 'big' test does not crawl.
40
41 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
42
43         * test/shell.c:
44         * src/gqueue.c: plugged leaks.
45
46 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
47
48         * test/path.c:
49         * src/gpath.c: when PATH is not defined, the current dir is used.
50         See execvp(3).
51
52 2006-08-25  Alp Toker  <alp@atoker.com>
53
54         * src/gstr.c: g_strv_length() should return guint, not gint
55         * src/glib.h: Add g_strv_length() prototype
56         
57 2006-08-24  Miguel de Icaza  <miguel@novell.com>
58
59         * src/gpath.c (g_get_home_dir, g_get_tmp_dir, g_get_user_name,
60         g_get_prgname, g_set_prgname): implemented.
61
62         * test/ Fix leaks.
63         
64         * src/gpath.c (g_get_current_dir): Implement.
65
66         (g_find_program_in_path, g_path_is_absolute): implement.
67         
68         Add g_path_get_dirname, g_path_get_basename
69
70         * src/gpath.c: Path routines
71
72 2006-08-23  Miguel de Icaza  <miguel@novell.com>
73
74         * src/gerror.c: Implement. 
75
76         * src/glist.c (g_list_sort): Remove routine instead of hoping that
77         it wont crash when we run it.
78
79 2006-08-23  Raja R Harinath  <rharinath@novell.com>
80
81         * src/glist.c (g_list_insert_before): Avoid non-head declaration.
82
83         * test/slist.c (test_slist_insert_before): Add.
84         * src/gslist.c (g_slist_insert_before): Append if 'sibling' is null.
85
86         * test/list.c (test_list_insert_before): Add test for return value
87         of g_list_insert_before.
88         * test/Makefile.am (test_eglib_LDADD): Refer to the .la file so as
89         to rebuild test if eglib changes.
90         * src/glist.c (new_node, disconnect_node): New helpers that
91         maintain doubly-linked list invariants.
92         (g_list_prepend, g_list_append): Express in terms of new_node.
93         (g_list_insert_before): Likewise.  Fix return value when inserting
94         in the middle of the list.
95         (g_list_concat): Reorganize to make more compact.
96         (g_list_nth): Likewise.
97         (g_list_nth_data): Don't segfault if 'n' is too large.
98         (g_list_remove): Rewrite using _find and disconnect_node.
99         (g_list_remove_link): Don't traverse list: use disconnect_node.
100         (g_list_insert_sorted): Rewrite to make more compact.  Use new_node.
101         (g_list_copy): Likewise.
102         (_prepend, _concat): Remove.
103         * src/gslist.c (insert_after, find_prev, find_prev_link):
104         New helpers.
105         (g_slist_copy): Simplify slightly, using insert_after.
106         (g_slist_concat): Reorganize to make more compact.
107         (g_slist_find): Likewise.
108         (g_slist_insert_sorted): Likewise.
109         (g_slist_remove): Rewrite using find_prev.
110         (g_slist_remove_link): Rewrite using find_prev_link.
111         (g_slist_remove_all, g_slist_insert_before): New.
112
113 2006-08-21  Duncan Mak  <duncan@a-chinaman.com>
114
115         * src/gqueue.c: GQueue implementation.
116         * src/glib.h: Add prototypes.
117         * src/Makefile.am (libeglib_la_SOURCES): Include gqueue.c.
118
119         * test/queue.c:         
120         * test/Makefile.am (SOURCES):
121         * test/tests.h (DEFINE_TEST_GROUP_INIT_H): add tests for GQueue.
122
123 2006-08-21  Aaron Bockover  <abockover@novell.com>
124
125         * src/gstr.c: fixed bug/invalid read/write on malloc-only case (no
126         realloc/delimiter token not found); use memcpy instead of strncpy for
127         better performance
128
129         * test/test.c (run_group): allow running specific tests under a group;
130         added copied g_strsplit/g_strfreev from EGlib source as eg_strsplit
131         and eg_strfreev to avoid performance skews in the driver
132         
133         * test/driver.c: allow user-specified group name to contain specific
134         test to run under the group as 'group_name:test1,test2,...testN'
135
136         * test/string-util.c: Added more g_strsplit tests
137
138         * test/slist.c:
139         * test/ptrarray.c:
140         * test/fake.c:
141         * test/string.c:
142         * test/list.c:
143         * test/array.c:
144         * test/hashtable.c: make test names shorter (no need to prefix with
145         the group since it runs under the group)
146
147 2006-08-21  Miguel de Icaza  <miguel@novell.com>
148
149         * src/glib.h (g_hash_table_new_full): Add missing prototype.
150         Replace g_free(x) with plain free, so it can be used as a function
151         argument. 
152         Add ABS
153
154         * src/ghashtable.c: Add rehashing. 
155
156         * test/hashtable.c: Add a bunch of extra tests.
157
158         * src/goutput.c: Fix g_log so it actually formats the data. 
159
160         * src/ghashtable.c (g_hash_table_new): The glib test suite
161         uncovered a bunch of bugs, the g_hash_table_new should actually
162         have parameters.
163
164         (g_hash_table_remove, g_hash_table_foreach_remove): Fixed bugs
165         uncovered. 
166
167 2006-08-20  Aaron Bockover  <abockover@novell.com>
168
169         * src/gmisc.c: added g_setenv, g_getenv, g_unsetenv
170
171         * src/gstr.c: added g_snprintf, g_sprintf, g_fprintf, g_printf
172
173         * src/glib.h: added macros for above va_args printf functions
174
175         * src/Makefile.am: added gmisc.c
176
177         * test/whats-implemented: script to see what needs to be implemented
178
179 2006-08-20  Chris Toshok  <toshok@ximian.com>
180
181         * test/array.c (test_array_big): add a test from the glib
182         documentation.
183
184 2006-08-20  Chris Toshok  <toshok@ximian.com>
185
186         * test/tests.h: add array tests to the mix.
187
188         * test/array.c: a few array tests.
189
190         * src/glib.h: add array prototypes.
191
192         * src/garray.c: initial array foo.
193
194         * test/Makefile.am (SOURCES): add array.c
195
196         * src/Makefile.am (libeglib_la_SOURCES): add garray.c
197
198 2006-08-19  Aaron Bockover  <abockover@novell.com>
199
200         * src/gstring.c: optimize and generalize reallocation by providing
201         a GROW_IF_NECESSARY macro, do not use strcpy/strcat as they are 
202         very, very slow; GString is now much closer to GLib's implementation
203         in terms of performance
204
205         * test/string.c: added speed-specific tests to beat on reallocation code
206
207         * test/test-both: run make if the test drivers don't exist
208
209 2006-08-19  Jonathan Chambers  <jonathan.chambers@gmail.com>
210
211         * src/gmodule.c: Add gmodule support for windows and fix
212         windows build. Contribution is licensed as MIT/X11.
213         
214 2006-08-19  Aaron Bockover  <abockover@novell.com>
215
216         * test/driver.c: Added --debug mode that allows for testing all paths
217         of the driver without actually running real tests; runs only the 'fake'
218         test, which does nothing; useful for running the driver through valgrind
219
220         * test/Makefile.am:
221         * test/tests.h:
222         * test/fake.c: Added fake test for valgrinding the driver
223
224         * test/ptrarray.c: update sort test
225
226 2006-08-19  Aaron Bockover  <abockover@novell.com>
227
228         * test/test-both: added --help
229
230 2006-08-19  Aaron Bockover  <abockover@novell.com>
231
232         * test/driver.c: added -n mode to show only raw global run times,
233         which is useful for scripts (test-both --speed-compare)
234
235         * test/test-both: added --speed-compare mode
236
237         * test/README: updated with information on --speed-compare
238
239 2006-08-19  Aaron Bockover  <abockover@novell.com>
240
241         * test/test.c: do not print times if -t is not passed
242
243         * test/driver.c: removed use of GList from the driver to avoid skews due
244         to performance differences between GLib and EGLib
245         
246 2006-08-19  Aaron Bockover  <abockover@novell.com>
247
248         * test/test.c: Perform iterations at the test level, only output one
249         report for all iterations of tests in a group to produce more usable
250         output; add timing for the tests and group; added get_timestamp for
251         easy code timing
252
253         * test/test.h: Removed run_test as it should only be called from 
254         run_group, added get_timestamp
255
256         * test/Makefile.am: Added -DDRIVER_NAME 
257
258         * test/test-both: simple script to run both drivers with the same options
259
260         * test/driver.c: Iterations are now run at the test level, show a global
261         status (OK/FAIL) indicator
262
263         * test/README: Updated
264
265         * configure.ac: Renamed from configure.in as configure.in naming 
266         convention is deprecated in favor of configure.ac
267
268         * autogen.sh: s/configure.in/configure.ac/
269
270 2006-08-19  Miguel de Icaza  <miguel@novell.com>
271
272         * Makefile.am: Removed MAINTAINERCLEANFILES that was too
273         aggresive, it failed make distcheck and the resulting tarball was
274         not buildable.
275
276         * src/glib.h: remove the various GPOINTER_TO_*, G*_TO_POINTER,
277         GSIZE_FORMAT macros, and move them into src/eglib-config.h
278
279         Moved also gssize and gsize to be arch specific.   This should fix
280         the 32/64 problems that Jon Chambers reported. 
281
282         * configure.in: test for pointer size, define the various values
283         depending on 32 vs 32/64 worlds, might need further porting in the
284         future. 
285
286         Change package name to eglib
287
288         * test/slist.c, test/list.c, test/hashtable.c: Update tests to use
289         FAILURE macro.
290
291         * test/string-util.c: fix leak for valgrind tests.
292
293         * test/tests.h: New size test, for testing datatypes.
294
295         * test/sizes.c: New tests.
296         
297 2006-08-19  Aaron Bockover  <abockover@novell.com>
298
299         * test/README: Added quick guide on adding new tests/groups to the 
300         driver and some examples on how to perform various tests with the driver
301
302 2006-08-18  Aaron Bockover  <abockover@novell.com>
303
304         * test/driver.c: Added getopt support and code timing, among other 
305         nice features to make testing/profiling easier
306
307         * test/test.c: Add support for suppressing output (quiet) and
308         define RESULT, FAILED, and OK
309
310         * src/glib.h:
311         * src/glist.c: Added g_list_nth_data implementation
312
313         * test/slist.c:
314         * test/string-util.c:
315         * test/ptrarray.c:
316         * test/string.c:
317         * test/hashtable.c:
318         * test/list.c: Use RESULT, FAILURE, and OK for tests
319
320 2006-08-18  Miguel de Icaza  <miguel@novell.com>
321
322         * src/gstring.c (g_string_truncate): Implement truncate. 
323         (g_string_prepend): implement. 
324
325         Fix various bugs uncovered by new tests. 
326
327         * src/glib.h: introduce gssize type, the signed one.  Important. 
328
329         * src/eglib-config.h (G_OS_): Add the G_OS_UNIX and G_OS_WIN32
330         defines that we can use to check on the host OS.
331
332 2006-08-18  Aaron Bockover  <abockover@novell.com>
333
334         * test/test.[ch]:
335         * test/driver.c: Support pass/fail logging on tests to show group report
336
337 2006-08-18  Aaron Bockover  <abockover@novell.com>
338
339         * test/test.c: 
340         * test/test.h: Added result() to be used in place of g_strdup_printf(),
341         it's shorter to write and allows the duped string to be freed safely;
342         added license header to file
343
344         * test/driver.c: Added license header to file
345
346         * test/string-util.c:
347         * test/ptrarray.c:
348         * test/string.c:
349         * test/list.c: Use result() in place of g_strdup_printf(), it's nicer
350
351 2006-08-18  Aaron Bockover  <abockover@novell.com>
352
353         * src/gptrarray.c: Implemented g_ptr_array_sort
354
355         * test/ptrarray.c: Added sort test
356         
357         * test/driver.c: Added --help; support running N iterations and allow
358         selecting which test groups to run; uses the test group table in tests.h
359         
360         * test/tests.h: Added group table
361         
362         * test/test.h:
363         * test/test.c: Using a Group structure and table, removed run_groups
364         as we only need run_group now
365
366         * test/slist.h: Removed, not needed, tests/groups defined in tests.h
367
368 2006-08-18  Miguel de Icaza  <miguel@novell.com>
369
370         * src/unicode.c: New file, to host unicode code, it will throw as
371         this code is no longer used in the Mono runtime anyways.
372         
373         * src/glib.h: Use stdint.h types, a lot of the good stuff is
374         replicated by glib.
375
376 2006-08-18  Duncan Mak  <duncan@a-chinaman.com>
377
378         * src/glist.c (g_list_remove, g_list_remove_link): Implemented. 
379
380         * src/gslist.c (g_slist_remove): Remember to set the next pointer
381         to NULL when the item to remove is the first item in the list.
382         
383 2006-08-18  Duncan Mak  <duncan@a-chinaman.com>
384
385         * src/glist.c: Implemented. Missing remove,
386         remove_link and insert_before.
387
388         * test/list.c: Tests for GList.
389
390 2006-08-17  Aaron Bockover  <abockover@novell.com>
391
392         * src/gptrarray.c: Implemented g_ptr_array_remove and 
393         g_ptr_array_remove_index
394
395         * test/other: Removed, rewritten in Makefile.am
396
397         * test/Makefile.am: Build test-eglib against local eglib and 
398         test-glib against GLib 2.0 (replaces 'other')
399
400         * test/ptrarray.c: Added tests for g_ptr_array_remove and
401         g_ptr_array_remove_index
402
403 2006-08-17  Duncan Mak  <duncan@a-chinaman.com>
404
405         * src/gslist.c: Added MIT license.
406         (g_slist_insert_sorted): Forgot the case where the data is
407         appended to the end of the list.
408
409         * test/slist.c (test_slist_insert_sorted): Fix the test.        
410
411 2006-08-17  Aaron Bockover  <abockover@novell.com>
412
413         * src/gptrarray.c: Added g_ptr_array_set_size implementation
414
415         * test/ptrarray.c: Added test for g_ptr_array_set_size
416
417 2006-08-17  Miguel de Icaza  <miguel@novell.com>
418
419         * src/glib.h: A handful of extra macros
420
421         * configure.in, src/eglib-config.h.in: Set some system-specific
422         settings that are probed at configure time.
423
424 2006-08-17  Aaron Bockover  <abockover@novell.com>
425
426         * src/gptrarray.c: Added beginnings of GPtrArray (alloc, free, add, iterate)
427
428         * src/glib.h: Added GPtrArray signatures
429
430         * src/Makefile.am: Added gptrarray.c to build
431
432         * test/ptrarray.c:
433         * test/tests.h:
434         * test/driver.c:
435         * test/Makefile.am: Add ptrarray tests for available functionality
436
437 2006-08-17  Aaron Bockover  <abockover@novell.com>
438         
439         * test/test.h: 
440         * test/test.c: Added group iterator/test driver functionality
441         
442         * test/driver.c: Added groups to run using new test functionality
443         
444         * test/slist.h:
445         * test/hashtable.h:
446         * test/string-util.h: Test group definitions for string util/hashtable
447
448         * test/slist.c:
449         * test/str.c: 
450         * test/hash.c: Added test definition table 
451
452         * test/Makefile.am: Added -Wall -Werror -D_FORTIFY_SOURCE=2
453
454         * src/gstr.c: Added implementation for g_str_has_prefix, g_str_has_suffix
455
456         * src/glib.h: Added missing function signatures
457
458         * src/Makefile.am: added -D_FORTIFY_SOURCE=2 
459
460 2006-08-17  Duncan Mak  <duncan@a-chinaman.com>
461
462         * src/gslist.c (g_slist_remove_link): I misread the function
463         signature. Re-implemented.
464         (g_slist_delete_link): Implemented.
465         (g_slist_reverse): Implemented.
466         (g_slist_insert_sorted): Implemented.
467
468 2006-08-17  Duncan Mak  <duncan@a-chinaman.com>
469
470         * src/gslist.c (g_slist_find): 
471         (g_slist_length):
472         (g_slist_remove):
473         (g_slist_remove_link): Implemented.
474
475         * test/slist.c: Tests for GSList.
476
477 2006-08-17  Raja R Harinath  <harinath@gmail.com>
478
479         * src/gslist.c (g_slist_free_1): New.  Free a single list node.
480         (g_slist_free): Use it to free the list nodes.  Don't free the
481         data, since the list doesn't own it.
482         (g_slist_append): Convert into a one-liner.
483         (g_slist_foreach): Remove redundant null check.
484         (g_slist_last): Actually return the last node.
485         (g_slist_copy): Simplify.
486         * src/gslist.h (g_slist_free_1): Add.
487
488 2006-08-16  Duncan Mak  <duncan@a-chinaman.com>
489
490         * src/gslist.c:
491
492         * src/gslist.h: First attempt at implementing GSList, incomplete.
493
494         * src/Makefile.am (libeglib_la_SOURCES): add gslist.c
495         * src/glib.h: Add GFunc definition. #include the new gslist.h.
496
497 2006-08-16  Miguel de Icaza  <miguel@novell.com>
498
499         * src/Makefile.am: Added -Wall,-Werror, corrected lots of
500         mistakes.
501
502         * src/gstring.c: Gstring implementation.
503
504         * test/str.c (test_gstring): string tests.
505
506 2006-08-16  Aaron Bockover  <abockover@novell.com>
507
508         * src/gstr.c: Added g_strsplit implementation
509
510         * test/driver.c: Run the split test
511
512         * test/str.c: Added a test for g_strsplit
513
514         * Makefile.am:
515         * src/Makefile.am:
516         * test/Makefile.am: Added MAINTAINERCLEANFILES
517
518 2006-08-16  Miguel de Icaza  <miguel@novell.com>
519
520         * src/gouput.c: Implement some output routines, update missing
521         progress. 
522
523         * test: Add test driver, and initial tests. 
524
525 2006-08-15  Miguel de Icaza  <miguel@novell.com>
526
527         * src/ghashtable.c: Implement most of this, it is completely
528         untested at this point.
529