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