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

.*.swp .*.swp
*~


# intermediate files: # intermediate files:



+ 1
- 0
configure.ac View File

dnl ================================================================ dnl ================================================================


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


AC_TYPE_UINT8_T AC_TYPE_UINT8_T
AC_TYPE_UINT32_T AC_TYPE_UINT32_T

+ 8
- 0
tests/printcdata.c View File

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


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


#include <locale.h> #include <locale.h>
#include <wchar.h> #include <wchar.h>
#include <wctype.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) void fput_utf8c(FILE *out, codepoint_t c)
{ {
if (c < 0x80) if (c < 0x80)

Loading…
Cancel
Save