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