]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
strcasecmp() and strncasecmp() are no longer used.
authorBruno Haible <bruno@clisp.org>
Tue, 16 Aug 2005 11:40:05 +0000 (11:40 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:47 +0000 (12:12 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/strcase.h [deleted file]
gettext-tools/lib/strcasecmp.c [deleted file]
gettext-tools/lib/strncasecmp.c [deleted file]

index b3ac78c886a118729ece7c8c9d979e34ffac4e3c..546dbfe06d328efafcad33a0c2a39bf653568ae2 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-16  Bruno Haible  <bruno@clisp.org>
+
+       * strcase.h: Remove file.
+       * strcasecmp.c: Remove file.
+       * strncasecmp.c: Remove file.
+
 2005-07-31  Bruno Haible  <bruno@clisp.org>
 
        * hash.c (resize): New function, extracted from insert_entry_2.
diff --git a/gettext-tools/lib/strcase.h b/gettext-tools/lib/strcase.h
deleted file mode 100644 (file)
index a51ed9a..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Case-insensitive string comparison functions.
-   Copyright (C) 1995-1996, 2001, 2003 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   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 this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef _STRCASE_H
-#define _STRCASE_H
-
-#include <stddef.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
-   greater than zero if S1 is lexicographically less than, equal to or greater
-   than S2.
-   Note: This function does not work correctly in multibyte locales.  */
-extern int strcasecmp (const char *s1, const char *s2);
-
-/* Compare no more than N characters of strings S1 and S2, ignoring case,
-   returning less than, equal to or greater than zero if S1 is
-   lexicographically less than, equal to or greater than S2.
-   Note: This function can not work correctly in multibyte locales.  */
-extern int strncasecmp (const char *s1, const char *s2, size_t n);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _STRCASE_H */
diff --git a/gettext-tools/lib/strcasecmp.c b/gettext-tools/lib/strcasecmp.c
deleted file mode 100644 (file)
index aa269c6..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/* strcasecmp.c -- case insensitive string comparator
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   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 this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef LENGTH_LIMIT
-# define STRXCASECMP_FUNCTION strncasecmp
-# define STRXCASECMP_DECLARE_N , size_t n
-# define LENGTH_LIMIT_EXPR(Expr) Expr
-#else
-# define STRXCASECMP_FUNCTION strcasecmp
-# define STRXCASECMP_DECLARE_N /* empty */
-# define LENGTH_LIMIT_EXPR(Expr) 0
-#endif
-
-#include <stddef.h>
-#include <ctype.h>
-
-#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
-
-/* Compare {{no more than N characters of }}strings S1 and S2,
-   ignoring case, returning less than, equal to or
-   greater than zero if S1 is lexicographically less
-   than, equal to or greater than S2.  */
-
-int
-STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N)
-{
-  register const unsigned char *p1 = (const unsigned char *) s1;
-  register const unsigned char *p2 = (const unsigned char *) s2;
-  unsigned char c1, c2;
-
-  if (p1 == p2 || LENGTH_LIMIT_EXPR (n == 0))
-    return 0;
-
-  do
-    {
-      c1 = TOLOWER (*p1);
-      c2 = TOLOWER (*p2);
-
-      if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0')
-       break;
-
-      ++p1;
-      ++p2;
-    }
-  while (c1 == c2);
-
-  return c1 - c2;
-}
diff --git a/gettext-tools/lib/strncasecmp.c b/gettext-tools/lib/strncasecmp.c
deleted file mode 100644 (file)
index 68d95aa..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#define LENGTH_LIMIT
-#include "strcasecmp.c"