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