X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/6a43ef8e8508df7d732e639ec75f657f4363e27a..b5071fc755c4f287c7befba1150d91a985762ebd:/lwlib/lwlib.c diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index 49c1b8df2e..7d9920e8bc 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c @@ -1,7 +1,7 @@ /* A general interface to the widgets of different toolkits. Copyright (C) 1992, 1993 Lucid, Inc. -Copyright (C) 1994-1996, 1999-2012 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2013 Free Software Foundation, Inc. This file is part of the Lucid Widget Library. @@ -16,20 +16,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. */ +along with GNU Emacs. If not, see . */ -#ifdef HAVE_CONFIG_H #include -#endif #include #include +#include #include #include -#include #include "lwlib-int.h" #include "lwlib-utils.h" #include @@ -75,7 +71,6 @@ static widget_value *merge_widget_value (widget_value *, widget_value *, int, int *); static void instantiate_widget_instance (widget_instance *); -static int my_strcasecmp (const char *, const char *); static void safe_free_str (char *); static void free_widget_value_tree (widget_value *); static widget_value *copy_widget_value_tree (widget_value *, @@ -115,26 +110,6 @@ safe_strdup (const char *s) return result; } -/* Like strcmp but ignore differences in case. */ - -static int -my_strcasecmp (const char *s1, const char *s2) -{ - while (1) - { - int c1 = *s1++; - int c2 = *s2++; - if (isupper (c1)) - c1 = tolower (c1); - if (isupper (c2)) - c2 = tolower (c2); - if (c1 != c2) - return (c1 > c2 ? 1 : -1); - if (c1 == 0) - return 0; - } -} - static void safe_free_str (char *s) { @@ -731,7 +706,7 @@ find_in_table (const char *type, const widget_creation_entry *table) { const widget_creation_entry* cur; for (cur = table; cur->type; cur++) - if (!my_strcasecmp (type, cur->type)) + if (!c_strcasecmp (type, cur->type)) return cur->function; return NULL; }