Blame gnulib/lib/isblank.c

Packit Service a2ae7a
/* Test whether a character is a blank.
Packit Service a2ae7a
Packit Service a2ae7a
   Copyright (C) 2009-2019 Free Software Foundation, Inc.
Packit Service a2ae7a
Packit Service a2ae7a
   This program is free software: you can redistribute it and/or modify
Packit Service a2ae7a
   it under the terms of the GNU Lesser General Public License as published by
Packit Service a2ae7a
   the Free Software Foundation; either version 2.1 of the License, or
Packit Service a2ae7a
   (at your option) any later version.
Packit Service a2ae7a
Packit Service a2ae7a
   This program is distributed in the hope that it will be useful,
Packit Service a2ae7a
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a2ae7a
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service a2ae7a
   GNU Lesser General Public License for more details.
Packit Service a2ae7a
Packit Service a2ae7a
   You should have received a copy of the GNU Lesser General Public License
Packit Service a2ae7a
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
Packit Service a2ae7a
Packit Service a2ae7a
#include <config.h>
Packit Service a2ae7a
Packit Service a2ae7a
/* Specification.  */
Packit Service a2ae7a
#include <ctype.h>
Packit Service a2ae7a
Packit Service a2ae7a
int
Packit Service a2ae7a
isblank (int c)
Packit Service a2ae7a
{
Packit Service a2ae7a
  /* On all known platforms, in all predefined locales, isblank(c) is likely
Packit Service a2ae7a
     equivalent with  (c == ' ' || c == '\t').  Look at the glibc definition
Packit Service a2ae7a
     (in glibc/localedata/locales/i18n): The "blank" characters are '\t', ' ',
Packit Service a2ae7a
     U+1680, U+180E, U+2000..U+2006, U+2008..U+200A, U+205F, U+3000, and none
Packit Service a2ae7a
     except the first two is present in a common 8-bit encoding.  Therefore
Packit Service a2ae7a
     the substitute for other platforms is not more complicated than this.  */
Packit Service a2ae7a
  return (c == ' ' || c == '\t');
Packit Service a2ae7a
}