Browse Source

Provide a compatibility implementation of iswblank for C89 compilers.

master
Reece H. Dunn 8 years ago
parent
commit
bdc255835e
3 changed files with 10 additions and 0 deletions
  1. 1
    0
      .gitignore
  2. 1
    0
      configure.ac
  3. 8
    0
      tests/printcdata.c

+ 1
- 0
.gitignore View File

@@ -1,4 +1,5 @@
.*.swp
*~

# intermediate files:


+ 1
- 0
configure.ac View File

@@ -24,6 +24,7 @@ dnl library checks.
dnl ================================================================

AC_CHECK_HEADERS([stddef.h]) dnl C89
AC_CHECK_FUNCS([iswblank]) dnl C99

AC_TYPE_UINT8_T
AC_TYPE_UINT32_T

+ 8
- 0
tests/printcdata.c View File

@@ -17,6 +17,7 @@
* along with ucd-tools. If not, see <http://www.gnu.org/licenses/>.
*/

#include "config.h"
#include "ucd/ucd.h"

#include <locale.h>
@@ -25,6 +26,13 @@
#include <wchar.h>
#include <wctype.h>

#ifndef HAVE_ISWBLANK
static int iswblank(wint_t c)
{
return iswspace(c) && !(c >= 0x0A && c <= 0x0D);
}
#endif

void fput_utf8c(FILE *out, codepoint_t c)
{
if (c < 0x80)

Loading…
Cancel
Save