* LinkLabelTest.cs: Put LinkTest and LinkCollectionTest classes outside of
[mono.git] / eglib / ChangeLog
1 2008-05-01  Bill Holmes  <billholmes54@gmail.com>
2
3         * src/glib.h : Adding declarations for g_ucs4_to_utf16 and g_utf16_to_ucs4.
4
5         * src/gutf8.c : Adding implementation for g_ucs4_to_utf16 and g_utf16_to_ucs4.
6
7         * test/utf8.c Adding tests for g_ucs4_to_utf16 and g_utf16_to_ucs4.
8
9         Contributed under MIT/X11 license.
10
11 2008-04-20  Geoff Norton  <gnorton@novell.com>
12
13         * src/gspan.c: Fix the _NSGetEnviron define to prevent an impropoer
14         pointer dereference.
15
16 2008-03-19  Bill Holmes  <billholmes54@gmail.com>
17
18         * src/gpath.c (g_path_is_absolute) : Adding a case for '/'
19           on Windows.
20         
21         * src/gpath.c (g_get_user_name) : On Windows add a check for %USERNAME%
22           when %USER% fails.
23
24         * src/gstr.c (g_strsplit, g_strsplit_set):  Change to remove truncation
25           errors with MSVC build.
26
27         * src/gstr.c (g_filename_to_uri, g_filename_from_uri):  Fixes to handle
28           Windows paths.
29
30         * src/gstr.c (g_ascii_strncasecmp):  Convert each character to lower case
31           before comparing.
32
33         * src/gunicode.c (g_get_charset):  Implement for Windows.
34
35         Contributed under MIT/X11 license.
36
37 2008-03-12  Geoff Norton  <gnorton@novell.com>
38
39         * src/gutf8.c: Implement g_ucs4_to_utf16 and g_utf16_to_ucs4 as
40         asserts.  They're needed to build mono with eglib.
41         * src/gutil.h: Add a few missing function declarations to the header.
42         * src/gspawn.c: Some darwin implementations don't have crt_externs.h
43         So we'll just define _NSGetEnviron() ourselves.
44         * Makefile.am: Dont build test when cross compiling.
45         * configure.ac: Define CROSS_COMPILING when cross compiling.
46         Undefine _FORTIFY_SOURCE on arm-apple-darwin as the headers it 
47         requires are not available.
48
49 2008-01-15  Andreas Faerber  <andreas.faerber@web.de>
50
51         * configure.ac: Add default G_BREAKPOINT implementation.
52         Fix typo in breakpoint CPU output.
53
54 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
55
56         * src/glib.h: Include <limits.h>. Fixes #350482.
57
58 2007-11-21  Dick Porter  <dick@ximian.com>
59
60         * src/gslist.c (g_slist_find_custom): Implement
61
62         * src/glist.c (g_list_find_custom): Implement
63
64         * test/list.c: Test g_list_find_custom()
65
66         * test/slist.c: Test g_slist_find_custom()
67
68 2007-11-20  Dick Porter  <dick@ximian.com>
69
70         * src/gstr.c: Implement g_strsplit_set() and re-implement
71         g_strsplit() so it passes the additional tests. (g_strsplit()
72         should treat multi-char delimiters as just a single token, rather
73         than a set of delimiters.)
74
75         * src/gslist.c: Implement g_slist_index(), g_slist_nth() and
76         g_slist_nth_data().
77
78         * test/string-util.c: Test g_strsplit_set() and more tests for
79         g_strsplit().
80
81         * test/slist.c: Test g_slist_nth() and
82         g_slist_index().
83
84 2007-11-06  Geoff Norton  <gnorton@novell.com>
85
86         * configure.ac: Check for libiconv_open as the previous check was failing against 
87         some versions of libiconv.
88
89 2007-11-06  Andreas Faerber  <andreas.faerber@web.de>
90
91         * test/Makefile.am: Fix noinst_PROGRAMS for automake 1.6.3
92                             Add support for VPATH
93
94 2007-11-06  Geoff Norton  <gnorton@novell.com>
95
96         * configure.ac: Determing if glib-2.0 is installed and set HAVE_GLIB appropriately
97         * test/Makefile.am: Only build test-glib if glib-2.0 is available
98
99 2007-11-05  Geoff Norton  <gnorton@novell.com>
100
101         * configure.ac: Check for getpwent_r and wether libiconv is needed to be linked.
102         Also look to see if we can use export-dynamic in the test suite.
103         * test/Makefile.am: Get LDFLAGS from configure instead of setting them.
104         * src/gerror.c: Implement g_clear_error.
105         * src/glib.h: Only use the format, ... convention is HAVE_C99_SUPPORT is available.
106         * src/gpath.c: Only use the getpwent_r codepath if getpwent_r is available.
107         * src/gspawn.c: Define environ to call _NSGetEnviron() on Apple.
108         * src/Makefile.am: Remove -Werror so we dont fail on different function declarations.
109                 Portions of all of the above are from Andreas Faerber & Jonathan Chambers
110         
111 2007-10-31  Jonathan Chambers <joncham@gmail.com>
112         
113         * src/ghashtable.c: Add g_hash_table_foreach_steal.
114         * src/garray.c: Add g_array_remove_index_fast.
115         * src/gpath.c (g_path_is_absolute): Handle windows paths.
116         * src/glib.h: Add g_hash_table_foreach_steal and g_array_remove_index_fast
117         
118         Contribution is licensed as MIT/X11.
119
120 2007-06-13  Jonathan Chambers <joncham@gmail.com>
121         
122         * src/gunicode.c: Add g_unichar_isxdigit and g_unichar_xdigit_value.
123         * src/gmisc.c: Add g_win32_getlocale stub.
124         * src/glib.h: Add declarations of above functions,
125         GFreeFunc typedef, and CLAMP, GUINT_TO_LE, and threading
126         macros.
127         
128         * test/string-util.c: Fix warning.
129         * test/utf8.c: Add test for g_unichar_xdigit_value.
130         
131         Contribution is licensed as MIT/X11.
132
133 2007-05-05  Aaron Bockover  <abockover@novell.com>
134
135         * src/gstr.c:
136         * src/glib.h: Added g_ascii_tolower implementation; make g_ascii_strdown
137         use it to do the transformation
138
139         * test/string-util.c: Added a test for g_ascii_strdown
140
141 2007-04-27  Jonathan Chambers <joncham@gmail.com>
142         
143         * src/gstr.c: Fix off by one error in g_strdup allocation.
144
145 2007-04-27  Jonathan Chambers <joncham@gmail.com>
146         
147         * src/eglib-config.hw: Forgot to add for msvc build.
148         * src/vasprintf: Forgot to add for msvc build.
149
150 2007-04-27  Jonathan Chambers <joncham@gmail.com>
151         
152         * src/gstr.c: Fix off by one error for NULL terminator.
153
154 2007-04-27  Jonathan Chambers <joncham@gmail.com>
155         
156         Combined patch from Michael Jerris <mike@jerris.com> and me.
157         * winconfig.h: Config file for msvc builds.
158         * configure.ac: Add AC_CHECK_HEADERS for getopt.h,  sys/time.h,
159         sys/wait.h, and pwd.h.
160         
161         * src/gspawn.c: Include config.h and use HAVE_* macros.
162         * src/eglib-config.h.in: Add inclusion guards.
163         * src/ghashtable.c: Fix warnings.
164         * src/gmisc.c: Windows implementation of g_getenv, g_setenv,
165         and g_unsetenv.
166         * src/gpath.c: Include config.h and use HAVE_* macros.
167         * src/gmarkup.c: Fix warnings.
168         * src/gptrarray.c: Fix warnings.
169         * src/gstr.c: Fix warnings and use HAVE_* macros.
170         * src/glib.h: Move macros to eglib-config.h and include it.
171         * src/gdate.c: Implement g_get_current_time on windows.
172         * src/gpattern.c: Fix warnings.
173         * src/gdir.c: Implement g_dir on windows.
174         * src/gfile.c: Implement mkstemp and g_file_test on windows.
175         * src/gtimer.c: Implement g_timer on windows.
176         * src/gmodule.c: Fix warnings.
177         * src/gunicode.c: Fix warnings.
178         * src/gutf8.c: Fix warnings.
179         
180         * test/ptrarray.c: Fix warnings.
181         * test/string.c: Fix warnings.
182         * test/list.c: Fix warnings.
183         * test/pattern.c: Use HAVE_* macros.
184         * test/dir.c: Use HAVE_* macros.
185         * test/file.c: Use HAVE_* macros and use system specific files for tests.
186         * test/test.c: Fix warnings and use HAVE_* macros.
187         * test/timer.c: Use HAVE_* macros.
188         * test/string-util.c: Fix warnings.
189         * test/test.h: Supress warnings on msvc.
190         * test/module.c: Use HAVE_* macros.
191         * test/utf8.c: Fix warnings.
192         * test/spawn.c: Use HAVE_* macros.
193         * test/driver.c: Fix warnings and use HAVE_* macros.
194         * test/path.c: Use HAVE_* macros and use system specific files for tests.
195         * test/sizes.c: Fix warnings.
196
197 2007-04-24  Jonathan Chambers <joncham@gmail.com>
198         
199         Patch from Michael Jerris <mike@jerris.com>
200         * src/gspawn.c: Start msvc build.
201         * src/gpath.c: Start msvc build.
202         * src/gmarkup.c: Start msvc build.
203         * src/gshell.c: Start msvc build.
204         * src/gstr.c: Start msvc build.
205         * src/glist.c: Start msvc build.
206         * src/glib.h: Start msvc build.
207         * src/gdate.c: Start msvc build.
208         * src/gpattern.c: Start msvc build.
209         * src/gdir.c: Start msvc build.
210         * src/gfile.c: Start msvc build.
211         * src/gtimer.c: Start msvc build.
212         * src/gmodule.c: Start msvc build.
213         * src/gunicode.c: Start msvc build.
214
215 2007-01-27  Robert Jordan  <robertj@gmx.net>
216
217         * test/Makefile.am: Add linker option to be able to
218         load symbols from the main program.
219         * test/module.c: Clean-ups.
220
221 2007-01-26  Robert Jordan  <robertj@gmx.net>
222
223         * configure.ac: Add PLATFORM_WIN32 conditional.
224         * src/Makefile.ac: Use PLATFORM_WIN32 conditional for psapi, iconv
225         * test/module.c, test/tests.h, test/Makefile.am: New test for gmodule.
226         * src/gmodule.h: Add G_MODULE_{IMPORT|EXPORT} defines.
227         * src/gmodule.c (g_module_symbol): Implement in-proc symbol lookup
228         for Win32.
229         * src/gmodule.c: Add GModule.main_module, consider it in
230         g_module_close ().
231         * src/gpath.c (g_get_home_dir): Add dummy Win32 implementation to
232         fix the build.
233
234 2006-11-03  Miguel de Icaza  <miguel@novell.com>
235
236         * src/gpath.c (g_path_get_dirname): If the pathname starts with a
237         "/", return the "/".
238
239         * test/string-util.c (test_strlcpy): Add new test.
240
241         * src/gunicode.c (g_filename_from_utf8): g_strlcpy needs the full
242         size, with the extra zero at the end;  Fixes the stack trace
243         issue. 
244
245 2006-10-30  Miguel de Icaza  <miguel@novell.com>
246
247         * test/utf8.c (test_utf8_seq): Add new failing test.
248
249 2006-10-30  Atsushi Enomoto  <atsushi@ximian.com>
250
251         * src/gutf8.c : several fixes:
252           - fixed incorrect mb_size clear and mb_remain computation.
253           - initialize items_written to 0 for error case.
254           - in utf8_to_utf16_len differentiate error messages completely.
255           - in g_utf8_to_utf16 use guchar instead of gchar.
256         * test/utf8.c : added test case string in test_utf8_seq() to
257           both test_utf8_to_utf16() and test_utf16_to_utf8().
258
259 2006-10-21  Miguel de Icaza  <miguel@novell.com>
260
261         * src/gunicode.c (g_filename_from_utf8): Use g_strlcpy here. 
262
263         * src/gmarkup.c (g_markup_parse_context_parse): Do not dereference
264         null values here.   This gets things a little bit further in
265         corlib, but not too far.
266
267         * src/gdir.c (g_dir_read_name): Do not return . or ..
268
269         * src/gstr.c (g_ascii_xdigit_value): Make this into a function,
270         thanks to Paolo for pointing the problem with the double macro
271         expansion. 
272
273         * src/gmodule.c (g_module_open): Actually return NULL if we fail
274         to load the module (was hiding the real bug in the pinvoke tests).
275
276         (g_module_build_path): Do not prepend "lib" if the "lib" is part
277         of the call.
278
279         * src/gstr.c (g_strsplit): this routine has some non-expected
280         behavior, if the string begins with the delimiter, it will return
281         an empty first string, unlike strtok
282
283         * src/gpath.c (g_path_get_dirname): Return "." as a dirname for
284         paths that do not contain a directory.
285
286 2006-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
287
288         * test/array.c: new test for insertion in the middle of other values.
289         * src/garray.c: fixed destination index.
290
291 2006-10-18  Miguel de Icaza  <miguel@novell.com>
292
293         * src/gpath.c (g_build_path): Do not append terminator if the next
294         string is empty.
295
296         * src/gutf8.c (g_utf8_to_utf16): Include trailing zero as
297         documented.
298         (g_utf16_to_utf8): Include trailing zero as documented.
299
300 2006-10-17  Miguel de Icaza  <miguel@novell.com>
301
302         * src/gstr.c (g_strdown): Actually move.
303
304         * src/gmarkup.c (g_markup_parse_context_parse): Accept dots in the
305         sequence, reset the state after a closing element.
306
307         * src/garray.c (g_array_insert_vals): Shift the elements the
308         correct amount.
309
310         (g_array_insert_vals): Should actually use the
311         number of elements to insert.
312
313         * test/array.c: Add new test case, this was happening in the JIT. 
314
315         * Add _GNU_SOURCE at configure time, remove from sources.
316         
317         * src/gstr.c (g_strsplit): Empty strings return a 0 value vector.
318
319         * src/glib.h (G_MAXINT64, G_MININT64): Add another set of macros
320         for the support stuff.
321         
322         Move private prototypes elsewhere
323
324         * src/glib.h (g_thread_init): Adding missing brace
325         (g_list_next): remove ; from the macro definition.
326
327 2006-10-17  Miguel de Icaza  <miguel@novell.com>
328
329         * src/gutf8.c: internal methods
330
331         * src/ghashtable.c: internal methods.
332
333 2006-10-16  Miguel de Icaza  <miguel@novell.com>
334
335         * src/gerror.c (g_propagate_error): Implement.
336
337         * src/gstr.c (g_strjoinv, g_ascii_strncasecmp): implement.
338
339         * test/string-util.c (test_ascii_strncasecmp): test
340
341 2006-10-15  Miguel de Icaza  <miguel@novell.com>
342
343         * configure.in: Fix detection of platforms the [3456] stuff does
344         not work inside autoconf.
345
346         * src/eglib-config.h.in: Make G_BREAKPOINT into a function-macro
347
348         * src/glib.h (offsetof): Mono sources depend on this, bring this
349         from the standard definition.  Redefine G_STRUCT_OFFSET in terms
350         of this. 
351         
352         * src/glib.h (G_STRUCT_OFFSET): fix macro definition. 
353         fix typo.
354
355         * src/sizes.c: Add test.
356
357         * src/gshell.c: Make it build
358         
359 2006-10-14  Miguel de Icaza  <miguel@novell.com>
360
361         * src/glib.h: add various _TO_LE and _FROM_LE macros.
362
363         * test/endian.c: tests for endian conversion macros.
364
365 2006-10-09  Miguel de Icaza  <miguel@novell.com>
366
367         * src/gmodule.h: Move definitions of gmodule to gmodule.h because
368         Mono expects it there.
369
370 Mon Oct 9 12:59:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
371
372         * src/ghashtable.c: s/to_prime/g_spaced_primes_closest/g
373         and put the array in readonly memory.
374         * src/gstr.c: fixed the build and made array const.
375         * src/gmodule.c: fixed thinko.
376
377 2006-10-08  Miguel de Icaza  <miguel@novell.com>
378
379         * src/gstr.c (g_strdup): should allow NULL as an argument.
380
381 2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
382
383         * test/string-util.c:
384         * TODO:
385         * src/gstr.c:
386         * src/glib.h: implemented g_strescape.
387
388 2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
389
390         * test/string-util.c:
391         * configure.ac:
392         * TODO:
393         * src/gstr.c:
394         * src/glib.h: implemented g_strlcpy.
395
396 2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
397
398         * test/string-util.c:
399         * TODO:
400         * src/gstr.c:
401         * src/glib.h: implemented g_strdelimit.
402
403 2006-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
404
405         * test/spawn.c: add search path flag when running ls.
406         * src/gspawn.c: g_spawn_command_line_sync searches the program in the
407         PATH if it's not an absolute path.
408
409 2006-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
410
411         * test/string-util.c:
412         * src/glib.h: implement g_ascii_xdigit_value and tests.
413
414 2006-10-06  Miguel de Icaza  <miguel@novell.com>
415
416         * src/gstr.c (g_ascii_strdown): Implement.
417
418         * str/glib.c (g_log_set_handler): empty.
419         (g_printerr): empty.
420         (GMemVTable): define, empty, ignored.
421         (G_USEC_PER_SEC) :-)
422
423         * src/gunicode.c (g_convert): Add bytes_read, bytes_written
424         support;   Small fixes to avoid valgrind errors. 
425         
426         (g_utf8_validate): Add, based on the libxml code.
427
428         gstr.c: implement g_strdown. 
429
430 2006-10-05  Miguel de Icaza  <miguel@novell.com>
431
432         * src/gunicode.c: Some work in progress to implement g_convert
433         (which is needed by g_locale_to_utf8).    
434
435 2006-09-18  Miguel de Icaza  <miguel@novell.com>
436
437         * test/string-util.c (test_filename_from_uri): tests for new
438         methods.
439
440         * src/gstr.c (g_filename_to_uri, g_filename_from_uri): implement. 
441
442 2006-09-14  Atsushi Enomoto  <atsushi@ximian.com>
443
444         * src/gutf8.c, test/utf8.c : EOL fix.
445
446 2006-09-04  Miguel de Icaza  <miguel@novell.com>
447
448         * src/gmarkup.c: The leak fixing commit.
449         
450         * src/gmarkup.c (g_markup_parse_context_end_parse): Add missing
451         method. 
452         (g_markup_parse_context_free): Implement. 
453         (parse_attributes): Store the value, not the attribute name
454         twice. 
455         Properly check the /> section.
456         (g_markup_parse_context_parse): When checking for error, use the
457         "error!=NULL && *error != NULL" upon return from callbacks,
458         it is only then that its valid to check for *error for error
459         conditions. 
460         (g_markup_parse_context_parse): Add comment processing.
461
462         Only release one element of the list.
463
464         * test/markup.c: Incorporate the kind of code that is used in Mono
465         for domain loading;  Will test the rest later. 
466
467 2006-09-01  Miguel de Icaza  <miguel@novell.com>
468
469         * src/gmarkup.c (g_markup_parse_context_parse): Add text parsing
470         support, and end-element support; not tested yet.
471
472 2006-09-01 Atsushi Enomoto <atsushi@ximian.com>
473
474         * gutf8.c : bad allocation size. multiply sizeof gchar/gunichar2.
475
476 2006-09-01 Atsushi Enomoto <atsushi@ximian.com>
477
478         * gutf8.c : when error is null, utf8_to_utf16_len() and
479           utf16_to_utf8_len() could return -1, so return NULL for those
480           cases in g_utf8_to_utf16() and g_utf16_to_utf8().
481
482 2006-09-01  Miguel de Icaza  <miguel@novell.com>
483
484         * src/gmarkup.c: Builds and does minimal parsing.
485
486         * test/markup.c: Sample test cases I have been using
487
488 2006-08-31 Atsushi Enomoto <atsushi@ximian.com>
489
490         * src/gerror.h,
491           src/gerror.c : added g_set_error().
492         * src/gutf8.c :
493           g_utf8_to_utf16() and g_utf16_to_utf8() implementation.
494         * src/glib.h : added all above, and some dependent bits.
495         * src/Makefile.am : added gutf8.c.
496         * TODO: removed above.
497         * test/Makefile.am,
498           test/tests.h : added utf8 tests.
499         * test/utf8.c : test for g_utf8_to_utf16 and g_utf16_to_utf8.
500           It still needs more tests e.g. for multibytes.
501
502 2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
503
504         * src/gspawn.c: small touch-ups and make read/write EINTR-proof.
505
506 2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
507
508         * test/file.c: remove useless test.
509
510         * test/spawn.c: new g_spawn_async_with_pipes test.
511         * src/glib.h: Modified file.
512         * src/gspawn.c: implemented g_spawn_async_with_pipes. Needs fine tuning.
513
514 2006-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
515
516         * TODO: Modified file.
517         * test/tests.h:
518         * test/pattern.c:
519         * test/dir.c:
520         * test/Makefile.am:
521         * src/Makefile.am:
522         * src/glib.h:
523         * src/gdir.c:
524         * src/gfile.c: implemented g_dir_*, unix version.
525
526 2006-08-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
527
528         * src/glib.h:
529         * test/Makefile.am: Modified file.
530         * test/tests.h:
531         * src/Makefile.am: Modified file.
532         * test/pattern.c:
533         * src/gpattern.c: implemented the 3 pattern matching functions used.
534
535         * test/ptrarray.c: fix the compare function to work with qsort.
536
537         * test/file.c:
538         * test/path.c:
539         * src/gspawn.c:
540         * src/gpath.c: made valgrind happy.
541
542 2006-08-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
543
544         * test/file.c:
545         * src/glib.h:
546         * src/gfile.c:  implemented g_file_test. Changed the default mask to
547         .XXXXXX. Add tests.
548
549 2006-08-26  Raja R Harinath  <rharinath@novell.com>
550
551         * src/sort.frag.h (digit): Declare here based on externally
552         provided typedef 'list_node'.
553         (MAX_DIGITS): Use 'sizeof (list_node)'.
554         * src/gslist.c (list_node): Declare instead of 'digit'.
555         * src/glist.c: Likewise.
556
557         * test/slist.c (verify_sort): Verify the length of the list too.
558         (test_slist_sort): Free the correct list.
559         * test/list.c: Likewise.
560         * src/sort.frag.h (MAX_DIGITS): Rename from N_DIGITS.
561         (combine_sort): Change 'max_pos' argument to more natural
562         'n_digits'.
563         (increment): Likewise.  Use 'n_digits' to avoid reading at an
564         offset that hasn't been initialized.
565         (do_sort): Remove memset.
566
567 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
568
569         * TODO:
570         * test/file.c:
571         * src/glib.h:
572         * src/gfile.c: implement g_file_open_tmp.
573
574 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
575
576         * TODO:
577         * src/glib.h:
578         * src/gdate.c: New file.
579         * src/gfile.c: New file.
580         * src/Makefile.am: implemented g_file_get_contents and
581         g_get_current_time.
582
583         * test/tests.h:
584         * test/file.c: New file.
585         * test/Makefile.am: tests for the above.
586
587 2006-08-26  Raja R Harinath  <rharinath@novell.com>
588
589         * src/sort.frag.h: Add copyright notice and some explanation.
590         (increment): Remove null check.
591         (combine_digits): Add 'list' argument to seed the summation.
592         (do_sort): Use the empty or singleton tail as the seed, rather
593         than calling 'increment'.
594
595 2006-08-25  Raja R Harinath  <rharinath@novell.com>
596
597         * TODO: Remove 'List' entries.
598         * src/Makefile.am (libeglib_la_SOURCES): Add sort.frag.h.
599         * src/sort.frag.h: New.  Implements a "generic" bottom-up "counting"
600         mergesort that works both on singly- and doubly-linked lists.
601         * src/gslist.c (g_slist_sort): Use it.
602         * src/glist.c (g_list_sort): Likewise.
603         * src/glib.h (g_slist_sort, g_list_sort): Declare.
604         * test/slist.c, test/list.c: Add basic testcases.
605
606 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
607
608         * src/gspawn.c: propagate errors from reads.
609         * src/gpath.c: an empty PATH is like a NULL one.
610
611 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
612
613         * test/tests.h:
614         * test/timer.c:
615         * test/Makefile.am:
616         * TODO:
617         * src/glib.h:
618         * src/gtimer.c:
619         * src/Makefile.am: implemented GTimer.
620
621 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
622
623         * test/tests.h:
624         * test/Makefile.am:
625         * test/spawn.c:
626         * src/gspawn.c:
627         * src/glib.h:
628         * src/Makefile.am: initial implentation of g_spawn_command_line_sync.
629         Still need better error handling, but works for the most part.
630
631 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
632
633         * src/garray.c: grow faster so that the 'big' test does not crawl.
634
635 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
636
637         * test/shell.c:
638         * src/gqueue.c: plugged leaks.
639
640 2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
641
642         * test/path.c:
643         * src/gpath.c: when PATH is not defined, the current dir is used.
644         See execvp(3).
645
646 2006-08-25  Alp Toker  <alp@atoker.com>
647
648         * src/gstr.c: g_strv_length() should return guint, not gint
649         * src/glib.h: Add g_strv_length() prototype
650         
651 2006-08-24  Miguel de Icaza  <miguel@novell.com>
652
653         * src/gpath.c (g_get_home_dir, g_get_tmp_dir, g_get_user_name,
654         g_get_prgname, g_set_prgname): implemented.
655
656         * test/ Fix leaks.
657         
658         * src/gpath.c (g_get_current_dir): Implement.
659
660         (g_find_program_in_path, g_path_is_absolute): implement.
661         
662         Add g_path_get_dirname, g_path_get_basename
663
664         * src/gpath.c: Path routines
665
666 2006-08-23  Miguel de Icaza  <miguel@novell.com>
667
668         * src/gerror.c: Implement. 
669
670         * src/glist.c (g_list_sort): Remove routine instead of hoping that
671         it wont crash when we run it.
672
673 2006-08-23  Raja R Harinath  <rharinath@novell.com>
674
675         * src/glist.c (g_list_insert_before): Avoid non-head declaration.
676
677         * test/slist.c (test_slist_insert_before): Add.
678         * src/gslist.c (g_slist_insert_before): Append if 'sibling' is null.
679
680         * test/list.c (test_list_insert_before): Add test for return value
681         of g_list_insert_before.
682         * test/Makefile.am (test_eglib_LDADD): Refer to the .la file so as
683         to rebuild test if eglib changes.
684         * src/glist.c (new_node, disconnect_node): New helpers that
685         maintain doubly-linked list invariants.
686         (g_list_prepend, g_list_append): Express in terms of new_node.
687         (g_list_insert_before): Likewise.  Fix return value when inserting
688         in the middle of the list.
689         (g_list_concat): Reorganize to make more compact.
690         (g_list_nth): Likewise.
691         (g_list_nth_data): Don't segfault if 'n' is too large.
692         (g_list_remove): Rewrite using _find and disconnect_node.
693         (g_list_remove_link): Don't traverse list: use disconnect_node.
694         (g_list_insert_sorted): Rewrite to make more compact.  Use new_node.
695         (g_list_copy): Likewise.
696         (_prepend, _concat): Remove.
697         * src/gslist.c (insert_after, find_prev, find_prev_link):
698         New helpers.
699         (g_slist_copy): Simplify slightly, using insert_after.
700         (g_slist_concat): Reorganize to make more compact.
701         (g_slist_find): Likewise.
702         (g_slist_insert_sorted): Likewise.
703         (g_slist_remove): Rewrite using find_prev.
704         (g_slist_remove_link): Rewrite using find_prev_link.
705         (g_slist_remove_all, g_slist_insert_before): New.
706
707 2006-08-21  Duncan Mak  <duncan@a-chinaman.com>
708
709         * src/gqueue.c: GQueue implementation.
710         * src/glib.h: Add prototypes.
711         * src/Makefile.am (libeglib_la_SOURCES): Include gqueue.c.
712
713         * test/queue.c:         
714         * test/Makefile.am (SOURCES):
715         * test/tests.h (DEFINE_TEST_GROUP_INIT_H): add tests for GQueue.
716
717 2006-08-21  Aaron Bockover  <abockover@novell.com>
718
719         * src/gstr.c: fixed bug/invalid read/write on malloc-only case (no
720         realloc/delimiter token not found); use memcpy instead of strncpy for
721         better performance
722
723         * test/test.c (run_group): allow running specific tests under a group;
724         added copied g_strsplit/g_strfreev from EGlib source as eg_strsplit
725         and eg_strfreev to avoid performance skews in the driver
726         
727         * test/driver.c: allow user-specified group name to contain specific
728         test to run under the group as 'group_name:test1,test2,...testN'
729
730         * test/string-util.c: Added more g_strsplit tests
731
732         * test/slist.c:
733         * test/ptrarray.c:
734         * test/fake.c:
735         * test/string.c:
736         * test/list.c:
737         * test/array.c:
738         * test/hashtable.c: make test names shorter (no need to prefix with
739         the group since it runs under the group)
740
741 2006-08-21  Miguel de Icaza  <miguel@novell.com>
742
743         * src/glib.h (g_hash_table_new_full): Add missing prototype.
744         Replace g_free(x) with plain free, so it can be used as a function
745         argument. 
746         Add ABS
747
748         * src/ghashtable.c: Add rehashing. 
749
750         * test/hashtable.c: Add a bunch of extra tests.
751
752         * src/goutput.c: Fix g_log so it actually formats the data. 
753
754         * src/ghashtable.c (g_hash_table_new): The glib test suite
755         uncovered a bunch of bugs, the g_hash_table_new should actually
756         have parameters.
757
758         (g_hash_table_remove, g_hash_table_foreach_remove): Fixed bugs
759         uncovered. 
760
761 2006-08-20  Aaron Bockover  <abockover@novell.com>
762
763         * src/gmisc.c: added g_setenv, g_getenv, g_unsetenv
764
765         * src/gstr.c: added g_snprintf, g_sprintf, g_fprintf, g_printf
766
767         * src/glib.h: added macros for above va_args printf functions
768
769         * src/Makefile.am: added gmisc.c
770
771         * test/whats-implemented: script to see what needs to be implemented
772
773 2006-08-20  Chris Toshok  <toshok@ximian.com>
774
775         * test/array.c (test_array_big): add a test from the glib
776         documentation.
777
778 2006-08-20  Chris Toshok  <toshok@ximian.com>
779
780         * test/tests.h: add array tests to the mix.
781
782         * test/array.c: a few array tests.
783
784         * src/glib.h: add array prototypes.
785
786         * src/garray.c: initial array foo.
787
788         * test/Makefile.am (SOURCES): add array.c
789
790         * src/Makefile.am (libeglib_la_SOURCES): add garray.c
791
792 2006-08-19  Aaron Bockover  <abockover@novell.com>
793
794         * src/gstring.c: optimize and generalize reallocation by providing
795         a GROW_IF_NECESSARY macro, do not use strcpy/strcat as they are 
796         very, very slow; GString is now much closer to GLib's implementation
797         in terms of performance
798
799         * test/string.c: added speed-specific tests to beat on reallocation code
800
801         * test/test-both: run make if the test drivers don't exist
802
803 2006-08-19  Jonathan Chambers  <jonathan.chambers@gmail.com>
804
805         * src/gmodule.c: Add gmodule support for windows and fix
806         windows build. Contribution is licensed as MIT/X11.
807         
808 2006-08-19  Aaron Bockover  <abockover@novell.com>
809
810         * test/driver.c: Added --debug mode that allows for testing all paths
811         of the driver without actually running real tests; runs only the 'fake'
812         test, which does nothing; useful for running the driver through valgrind
813
814         * test/Makefile.am:
815         * test/tests.h:
816         * test/fake.c: Added fake test for valgrinding the driver
817
818         * test/ptrarray.c: update sort test
819
820 2006-08-19  Aaron Bockover  <abockover@novell.com>
821
822         * test/test-both: added --help
823
824 2006-08-19  Aaron Bockover  <abockover@novell.com>
825
826         * test/driver.c: added -n mode to show only raw global run times,
827         which is useful for scripts (test-both --speed-compare)
828
829         * test/test-both: added --speed-compare mode
830
831         * test/README: updated with information on --speed-compare
832
833 2006-08-19  Aaron Bockover  <abockover@novell.com>
834
835         * test/test.c: do not print times if -t is not passed
836
837         * test/driver.c: removed use of GList from the driver to avoid skews due
838         to performance differences between GLib and EGLib
839         
840 2006-08-19  Aaron Bockover  <abockover@novell.com>
841
842         * test/test.c: Perform iterations at the test level, only output one
843         report for all iterations of tests in a group to produce more usable
844         output; add timing for the tests and group; added get_timestamp for
845         easy code timing
846
847         * test/test.h: Removed run_test as it should only be called from 
848         run_group, added get_timestamp
849
850         * test/Makefile.am: Added -DDRIVER_NAME 
851
852         * test/test-both: simple script to run both drivers with the same options
853
854         * test/driver.c: Iterations are now run at the test level, show a global
855         status (OK/FAIL) indicator
856
857         * test/README: Updated
858
859         * configure.ac: Renamed from configure.in as configure.in naming 
860         convention is deprecated in favor of configure.ac
861
862         * autogen.sh: s/configure.in/configure.ac/
863
864 2006-08-19  Miguel de Icaza  <miguel@novell.com>
865
866         * Makefile.am: Removed MAINTAINERCLEANFILES that was too
867         aggresive, it failed make distcheck and the resulting tarball was
868         not buildable.
869
870         * src/glib.h: remove the various GPOINTER_TO_*, G*_TO_POINTER,
871         GSIZE_FORMAT macros, and move them into src/eglib-config.h
872
873         Moved also gssize and gsize to be arch specific.   This should fix
874         the 32/64 problems that Jon Chambers reported. 
875
876         * configure.in: test for pointer size, define the various values
877         depending on 32 vs 32/64 worlds, might need further porting in the
878         future. 
879
880         Change package name to eglib
881
882         * test/slist.c, test/list.c, test/hashtable.c: Update tests to use
883         FAILURE macro.
884
885         * test/string-util.c: fix leak for valgrind tests.
886
887         * test/tests.h: New size test, for testing datatypes.
888
889         * test/sizes.c: New tests.
890         
891 2006-08-19  Aaron Bockover  <abockover@novell.com>
892
893         * test/README: Added quick guide on adding new tests/groups to the 
894         driver and some examples on how to perform various tests with the driver
895
896 2006-08-18  Aaron Bockover  <abockover@novell.com>
897
898         * test/driver.c: Added getopt support and code timing, among other 
899         nice features to make testing/profiling easier
900
901         * test/test.c: Add support for suppressing output (quiet) and
902         define RESULT, FAILED, and OK
903
904         * src/glib.h:
905         * src/glist.c: Added g_list_nth_data implementation
906
907         * test/slist.c:
908         * test/string-util.c:
909         * test/ptrarray.c:
910         * test/string.c:
911         * test/hashtable.c:
912         * test/list.c: Use RESULT, FAILURE, and OK for tests
913
914 2006-08-18  Miguel de Icaza  <miguel@novell.com>
915
916         * src/gstring.c (g_string_truncate): Implement truncate. 
917         (g_string_prepend): implement. 
918
919         Fix various bugs uncovered by new tests. 
920
921         * src/glib.h: introduce gssize type, the signed one.  Important. 
922
923         * src/eglib-config.h (G_OS_): Add the G_OS_UNIX and G_OS_WIN32
924         defines that we can use to check on the host OS.
925
926 2006-08-18  Aaron Bockover  <abockover@novell.com>
927
928         * test/test.[ch]:
929         * test/driver.c: Support pass/fail logging on tests to show group report
930
931 2006-08-18  Aaron Bockover  <abockover@novell.com>
932
933         * test/test.c: 
934         * test/test.h: Added result() to be used in place of g_strdup_printf(),
935         it's shorter to write and allows the duped string to be freed safely;
936         added license header to file
937
938         * test/driver.c: Added license header to file
939
940         * test/string-util.c:
941         * test/ptrarray.c:
942         * test/string.c:
943         * test/list.c: Use result() in place of g_strdup_printf(), it's nicer
944
945 2006-08-18  Aaron Bockover  <abockover@novell.com>
946
947         * src/gptrarray.c: Implemented g_ptr_array_sort
948
949         * test/ptrarray.c: Added sort test
950         
951         * test/driver.c: Added --help; support running N iterations and allow
952         selecting which test groups to run; uses the test group table in tests.h
953         
954         * test/tests.h: Added group table
955         
956         * test/test.h:
957         * test/test.c: Using a Group structure and table, removed run_groups
958         as we only need run_group now
959
960         * test/slist.h: Removed, not needed, tests/groups defined in tests.h
961
962 2006-08-18  Miguel de Icaza  <miguel@novell.com>
963
964         * src/unicode.c: New file, to host unicode code, it will throw as
965         this code is no longer used in the Mono runtime anyways.
966         
967         * src/glib.h: Use stdint.h types, a lot of the good stuff is
968         replicated by glib.
969
970 2006-08-18  Duncan Mak  <duncan@a-chinaman.com>
971
972         * src/glist.c (g_list_remove, g_list_remove_link): Implemented. 
973
974         * src/gslist.c (g_slist_remove): Remember to set the next pointer
975         to NULL when the item to remove is the first item in the list.
976         
977 2006-08-18  Duncan Mak  <duncan@a-chinaman.com>
978
979         * src/glist.c: Implemented. Missing remove,
980         remove_link and insert_before.
981
982         * test/list.c: Tests for GList.
983
984 2006-08-17  Aaron Bockover  <abockover@novell.com>
985
986         * src/gptrarray.c: Implemented g_ptr_array_remove and 
987         g_ptr_array_remove_index
988
989         * test/other: Removed, rewritten in Makefile.am
990
991         * test/Makefile.am: Build test-eglib against local eglib and 
992         test-glib against GLib 2.0 (replaces 'other')
993
994         * test/ptrarray.c: Added tests for g_ptr_array_remove and
995         g_ptr_array_remove_index
996
997 2006-08-17  Duncan Mak  <duncan@a-chinaman.com>
998
999         * src/gslist.c: Added MIT license.
1000         (g_slist_insert_sorted): Forgot the case where the data is
1001         appended to the end of the list.
1002
1003         * test/slist.c (test_slist_insert_sorted): Fix the test.        
1004
1005 2006-08-17  Aaron Bockover  <abockover@novell.com>
1006
1007         * src/gptrarray.c: Added g_ptr_array_set_size implementation
1008
1009         * test/ptrarray.c: Added test for g_ptr_array_set_size
1010
1011 2006-08-17  Miguel de Icaza  <miguel@novell.com>
1012
1013         * src/glib.h: A handful of extra macros
1014
1015         * configure.in, src/eglib-config.h.in: Set some system-specific
1016         settings that are probed at configure time.
1017
1018 2006-08-17  Aaron Bockover  <abockover@novell.com>
1019
1020         * src/gptrarray.c: Added beginnings of GPtrArray (alloc, free, add, iterate)
1021
1022         * src/glib.h: Added GPtrArray signatures
1023
1024         * src/Makefile.am: Added gptrarray.c to build
1025
1026         * test/ptrarray.c:
1027         * test/tests.h:
1028         * test/driver.c:
1029         * test/Makefile.am: Add ptrarray tests for available functionality
1030
1031 2006-08-17  Aaron Bockover  <abockover@novell.com>
1032         
1033         * test/test.h: 
1034         * test/test.c: Added group iterator/test driver functionality
1035         
1036         * test/driver.c: Added groups to run using new test functionality
1037         
1038         * test/slist.h:
1039         * test/hashtable.h:
1040         * test/string-util.h: Test group definitions for string util/hashtable
1041
1042         * test/slist.c:
1043         * test/str.c: 
1044         * test/hash.c: Added test definition table 
1045
1046         * test/Makefile.am: Added -Wall -Werror -D_FORTIFY_SOURCE=2
1047
1048         * src/gstr.c: Added implementation for g_str_has_prefix, g_str_has_suffix
1049
1050         * src/glib.h: Added missing function signatures
1051
1052         * src/Makefile.am: added -D_FORTIFY_SOURCE=2 
1053
1054 2006-08-17  Duncan Mak  <duncan@a-chinaman.com>
1055
1056         * src/gslist.c (g_slist_remove_link): I misread the function
1057         signature. Re-implemented.
1058         (g_slist_delete_link): Implemented.
1059         (g_slist_reverse): Implemented.
1060         (g_slist_insert_sorted): Implemented.
1061
1062 2006-08-17  Duncan Mak  <duncan@a-chinaman.com>
1063
1064         * src/gslist.c (g_slist_find): 
1065         (g_slist_length):
1066         (g_slist_remove):
1067         (g_slist_remove_link): Implemented.
1068
1069         * test/slist.c: Tests for GSList.
1070
1071 2006-08-17  Raja R Harinath  <harinath@gmail.com>
1072
1073         * src/gslist.c (g_slist_free_1): New.  Free a single list node.
1074         (g_slist_free): Use it to free the list nodes.  Don't free the
1075         data, since the list doesn't own it.
1076         (g_slist_append): Convert into a one-liner.
1077         (g_slist_foreach): Remove redundant null check.
1078         (g_slist_last): Actually return the last node.
1079         (g_slist_copy): Simplify.
1080         * src/gslist.h (g_slist_free_1): Add.
1081
1082 2006-08-16  Duncan Mak  <duncan@a-chinaman.com>
1083
1084         * src/gslist.c:
1085
1086         * src/gslist.h: First attempt at implementing GSList, incomplete.
1087
1088         * src/Makefile.am (libeglib_la_SOURCES): add gslist.c
1089         * src/glib.h: Add GFunc definition. #include the new gslist.h.
1090
1091 2006-08-16  Miguel de Icaza  <miguel@novell.com>
1092
1093         * src/Makefile.am: Added -Wall,-Werror, corrected lots of
1094         mistakes.
1095
1096         * src/gstring.c: Gstring implementation.
1097
1098         * test/str.c (test_gstring): string tests.
1099
1100 2006-08-16  Aaron Bockover  <abockover@novell.com>
1101
1102         * src/gstr.c: Added g_strsplit implementation
1103
1104         * test/driver.c: Run the split test
1105
1106         * test/str.c: Added a test for g_strsplit
1107
1108         * Makefile.am:
1109         * src/Makefile.am:
1110         * test/Makefile.am: Added MAINTAINERCLEANFILES
1111
1112 2006-08-16  Miguel de Icaza  <miguel@novell.com>
1113
1114         * src/gouput.c: Implement some output routines, update missing
1115         progress. 
1116
1117         * test: Add test driver, and initial tests. 
1118
1119 2006-08-15  Miguel de Icaza  <miguel@novell.com>
1120
1121         * src/ghashtable.c: Implement most of this, it is completely
1122         untested at this point.
1123
1124