Mail Archives: djgpp-workers/1999/04/08/14:20:58
It returns non-zero, if arg is ' ' or '\t'
Very small function - but requires
two patches and two new files:
File isblank.c:
---------------------
/* Copyright (C) 1999 Laurynas Biveinis, see COPYING.DJ for details */
#include <ctype.h>
#include <inlines/ctype.ha>
int (isblank)(int c)
{
return isblank(c);
}
---------------------
File isblank.txh:
---------------------
@c ----------------------------------------------------------------------
@node isblank, ctype
@subheading Syntax
@example
#include <ctype.h>
int isalnum(int c);
@end example
@subheading Description
Tells if @var{c} is one of standard blank characters (space or horizontal
tab).
@subheading Return Value
Nonzero if @var{c} is a standard blank character, else zero.
@subheading Portability
@portability ansi, posix
---------------------------------------------------
*** ctype.h Wed Dec 7 02:02:10 1994
--- ctype2.h Thu Apr 8 18:21:40 1999
***************
*** 10,15 ****
--- 10,16 ----
int isalnum(int c);
int isalpha(int c);
+ int isblank(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
-----------------------------------------------------------
*** ct_flags.c Mon Jul 24 02:18:06 1995
--- ct_flags2.c Thu Apr 8 18:30:06 1999
***************
*** 13,19 ****
__dj_ISCNTRL, /* CTRL+F, 0x06 */
__dj_ISCNTRL, /* CTRL+G, 0x07 */
__dj_ISCNTRL, /* CTRL+H, 0x08 */
! __dj_ISCNTRL | __dj_ISSPACE, /* CTRL+I, 0x09 */
__dj_ISCNTRL | __dj_ISSPACE, /* CTRL+J, 0x0a */
__dj_ISCNTRL | __dj_ISSPACE, /* CTRL+K, 0x0b */
__dj_ISCNTRL | __dj_ISSPACE, /* CTRL+L, 0x0c */
--- 13,19 ----
__dj_ISCNTRL, /* CTRL+F, 0x06 */
__dj_ISCNTRL, /* CTRL+G, 0x07 */
__dj_ISCNTRL, /* CTRL+H, 0x08 */
! __dj_ISCNTRL | __dj_ISSPACE | __dj_ISBLANK, /* CTRL+I, 0x09 */
__dj_ISCNTRL | __dj_ISSPACE, /* CTRL+J, 0x0a */
__dj_ISCNTRL | __dj_ISSPACE, /* CTRL+K, 0x0b */
__dj_ISCNTRL | __dj_ISSPACE, /* CTRL+L, 0x0c */
***************
*** 36,42 ****
__dj_ISCNTRL, /* CTRL+], 0x1d */
__dj_ISCNTRL, /* CTRL+^, 0x1e */
__dj_ISCNTRL, /* CTRL+_, 0x1f */
! __dj_ISPRINT | __dj_ISSPACE, /* ` ', 0x20 */
__dj_ISGRAPH | __dj_ISPRINT | __dj_ISPUNCT, /* `!', 0x21 */
__dj_ISGRAPH | __dj_ISPRINT | __dj_ISPUNCT, /* 0x22 */
__dj_ISGRAPH | __dj_ISPRINT | __dj_ISPUNCT, /* `#', 0x23 */
--- 36,42 ----
__dj_ISCNTRL, /* CTRL+], 0x1d */
__dj_ISCNTRL, /* CTRL+^, 0x1e */
__dj_ISCNTRL, /* CTRL+_, 0x1f */
! __dj_ISPRINT | __dj_ISSPACE | __dj_ISBLANK, /* ` ', 0x20 */
__dj_ISGRAPH | __dj_ISPRINT | __dj_ISPUNCT, /* `!', 0x21 */
__dj_ISGRAPH | __dj_ISPRINT | __dj_ISPUNCT, /* 0x22 */
__dj_ISGRAPH | __dj_ISPRINT | __dj_ISPUNCT, /* `#', 0x23 */
- Raw text -