From 2ae91cff96404b401bdccef136a8d1204716a25a Mon Sep 17 00:00:00 2001 From: EST 1999 Jeff Garzik Date: Fri, 22 Jan 1999 05:02:37 +0000 Subject: [PATCH] New file. Short notes on what has been said in e-mail, plus a couple other Thu Jan 21 23:55:54 EST 1999 Jeff Garzik * TODO: New file. Short notes on what has been said in e-mail, plus a couple other new items. * glib.h, glist.c: New function g_list_delete(). Removes a node from the list, then frees it. --- ChangeLog | 10 ++++++ ChangeLog.pre-2-0 | 10 ++++++ ChangeLog.pre-2-10 | 10 ++++++ ChangeLog.pre-2-12 | 10 ++++++ ChangeLog.pre-2-2 | 10 ++++++ ChangeLog.pre-2-4 | 10 ++++++ ChangeLog.pre-2-6 | 10 ++++++ ChangeLog.pre-2-8 | 10 ++++++ TODO | 63 +++++++++++++++++++++++++++++++++++++ glib.h | 2 ++ glib/glib.h | 2 ++ glib/glist.c | 11 +++++++ glist.c | 11 +++++++ gmodule/gmoduleconf.h.win32 | 6 ++-- 14 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 TODO diff --git a/ChangeLog b/ChangeLog index eb3ed4db6..1bfa2342a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Thu Jan 21 23:55:54 EST 1999 Jeff Garzik + + * TODO: + New file. Short notes on what has been said in e-mail, plus a + couple other new items. + + * glib.h, glist.c: + New function g_list_delete(). Removes a node from the list, + then frees it. + Thu Jan 21 12:40:11 EST 1999 Jeff Garzik * tests/{Makefile.am, string-test.c, strfunc-test.c}: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index eb3ed4db6..1bfa2342a 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +Thu Jan 21 23:55:54 EST 1999 Jeff Garzik + + * TODO: + New file. Short notes on what has been said in e-mail, plus a + couple other new items. + + * glib.h, glist.c: + New function g_list_delete(). Removes a node from the list, + then frees it. + Thu Jan 21 12:40:11 EST 1999 Jeff Garzik * tests/{Makefile.am, string-test.c, strfunc-test.c}: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index eb3ed4db6..1bfa2342a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Thu Jan 21 23:55:54 EST 1999 Jeff Garzik + + * TODO: + New file. Short notes on what has been said in e-mail, plus a + couple other new items. + + * glib.h, glist.c: + New function g_list_delete(). Removes a node from the list, + then frees it. + Thu Jan 21 12:40:11 EST 1999 Jeff Garzik * tests/{Makefile.am, string-test.c, strfunc-test.c}: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index eb3ed4db6..1bfa2342a 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,13 @@ +Thu Jan 21 23:55:54 EST 1999 Jeff Garzik + + * TODO: + New file. Short notes on what has been said in e-mail, plus a + couple other new items. + + * glib.h, glist.c: + New function g_list_delete(). Removes a node from the list, + then frees it. + Thu Jan 21 12:40:11 EST 1999 Jeff Garzik * tests/{Makefile.am, string-test.c, strfunc-test.c}: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index eb3ed4db6..1bfa2342a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Thu Jan 21 23:55:54 EST 1999 Jeff Garzik + + * TODO: + New file. Short notes on what has been said in e-mail, plus a + couple other new items. + + * glib.h, glist.c: + New function g_list_delete(). Removes a node from the list, + then frees it. + Thu Jan 21 12:40:11 EST 1999 Jeff Garzik * tests/{Makefile.am, string-test.c, strfunc-test.c}: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index eb3ed4db6..1bfa2342a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Thu Jan 21 23:55:54 EST 1999 Jeff Garzik + + * TODO: + New file. Short notes on what has been said in e-mail, plus a + couple other new items. + + * glib.h, glist.c: + New function g_list_delete(). Removes a node from the list, + then frees it. + Thu Jan 21 12:40:11 EST 1999 Jeff Garzik * tests/{Makefile.am, string-test.c, strfunc-test.c}: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index eb3ed4db6..1bfa2342a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Thu Jan 21 23:55:54 EST 1999 Jeff Garzik + + * TODO: + New file. Short notes on what has been said in e-mail, plus a + couple other new items. + + * glib.h, glist.c: + New function g_list_delete(). Removes a node from the list, + then frees it. + Thu Jan 21 12:40:11 EST 1999 Jeff Garzik * tests/{Makefile.am, string-test.c, strfunc-test.c}: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index eb3ed4db6..1bfa2342a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Thu Jan 21 23:55:54 EST 1999 Jeff Garzik + + * TODO: + New file. Short notes on what has been said in e-mail, plus a + couple other new items. + + * glib.h, glist.c: + New function g_list_delete(). Removes a node from the list, + then frees it. + Thu Jan 21 12:40:11 EST 1999 Jeff Garzik * tests/{Makefile.am, string-test.c, strfunc-test.c}: diff --git a/TODO b/TODO new file mode 100644 index 000000000..3f55ef980 --- /dev/null +++ b/TODO @@ -0,0 +1,63 @@ +TODO for GLib 1.3: + +* alloca support, with replacement if native alloca not available + - check out gettext's implementation + + + +-------------------------------------------------------------------- + +Ideas for GLib 1.3: + +(jgarzik) +* wrap i18n routines on various platforms; wrap gettext libintl as a + fallback + +* benchmark garbage-collecting malloc (not for inclusion into GLib, just + general knowledge) + +* coneill's optimized MD5 checksum routine, maybe some other checksums + too, encapsulated in a GChecksum. Allow choice between a few built-in + checksum functions, MD5, CRC, ?, or a user-specified checksum + function pointer. + +* New ADTs: trie, skip list, red-black tree, queue (below), stack (below) + +* decent random numbers (really a portability thing) + +* 'make check' tests one per module, plus bug report regression tests + and such + +* new func g_list_delete, combines g_list_remove_link and g_list_free1 + +* primitive memory leak checking by g_malloc, g_free + +* alloca-based convenience macros, counterparts to: + g_new, g_new0, g_strdup, g_strndup, g_strconcat, ??? + +* GStack, opaque ADT with interface: + + stack = g_stack_new (); + count = g_stack_size (stack); + + g_stack_push (stack, data); + data = g_stack_pop (stack); + + slist = g_stack_get_list (stack); + +* GQueue, opaque ADT with interface: + + q = g_queue_new (); + count = g_queue_size (q); + + q_queue_push_front (q, data); + q_queue_push_back (q, data); + data = q_queue_pop_front (q); + data = q_queue_pop_back (q); + #define q_queue_push q_queue_push_back + #define q_queue_pop q_queue_pop_front + + list = g_queue_get_list (q); + #define g_queue_get_front g_queue_get_list + list_end = g_queue_get_back (q); + diff --git a/glib.h b/glib.h index a50f6d0f3..d170b83c0 100644 --- a/glib.h +++ b/glib.h @@ -852,6 +852,8 @@ GList* g_list_insert_sorted (GList *list, GCompareFunc func); GList* g_list_concat (GList *list1, GList *list2); +GList* g_list_delete (GList *list, + GList *link); GList* g_list_remove (GList *list, gpointer data); GList* g_list_remove_link (GList *list, diff --git a/glib/glib.h b/glib/glib.h index a50f6d0f3..d170b83c0 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -852,6 +852,8 @@ GList* g_list_insert_sorted (GList *list, GCompareFunc func); GList* g_list_concat (GList *list1, GList *list2); +GList* g_list_delete (GList *list, + GList *link); GList* g_list_remove (GList *list, gpointer data); GList* g_list_remove_link (GList *list, diff --git a/glib/glist.c b/glib/glist.c index 8656e3e41..c1e55004a 100644 --- a/glib/glist.c +++ b/glib/glist.c @@ -307,6 +307,17 @@ g_list_remove_link (GList *list, return list; } + +GList* +g_list_delete (GList *list, GList *link) +{ + list = g_list_remove_link (list, link); + g_list_free_1 (link); + + return list; +} + + GList* g_list_copy (GList *list) { diff --git a/glist.c b/glist.c index 8656e3e41..c1e55004a 100644 --- a/glist.c +++ b/glist.c @@ -307,6 +307,17 @@ g_list_remove_link (GList *list, return list; } + +GList* +g_list_delete (GList *list, GList *link) +{ + list = g_list_remove_link (list, link); + g_list_free_1 (link); + + return list; +} + + GList* g_list_copy (GList *list) { diff --git a/gmodule/gmoduleconf.h.win32 b/gmodule/gmoduleconf.h.win32 index fba7be6df..9d4fcf9f7 100644 --- a/gmodule/gmoduleconf.h.win32 +++ b/gmodule/gmoduleconf.h.win32 @@ -29,12 +29,14 @@ extern "C" { #define G_MODULE_IMPL_DL 1 #define G_MODULE_IMPL_DLD 2 #define G_MODULE_IMPL_WIN32 3 -#define G_MODULE_IMPL_OS2 4 -#define G_MODULE_IMPL_BEOS 5 #define G_MODULE_IMPL G_MODULE_IMPL_WIN32 #undef G_MODULE_HAVE_DLERROR +#ifdef __LCC__ +#define G_MODULE_NEED_USCORE +#endif + #ifdef __cplusplus } #endif /* __cplusplus */