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