Change a few more uses of is* ctype macros to (protected) upper case versions.
#include <stdio.h>
#include <getopt.h>
-#include <ctype.h>
#include <sys/types.h>
#include <signal.h>
#include "regex.h"
while ((ch = *num++))
{
- if (!isdigit (ch))
+ if (!ISDIGIT (ch))
return FALSE;
val = val * 10 + ch - '0';
}
/* Get isblank from GNU libc. */
#define _GNU_SOURCE
-#include <ctype.h>
-#ifndef isblank
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#endif
+
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
-#ifdef isascii
-#define ISDIGIT(c) (isascii ((c)) && isdigit ((c)))
-#else
-#define ISDIGIT(c) (isdigit ((c)))
-#endif
-
char *xmalloc ();
char *xrealloc ();
void error ();
else
initial = 1;
}
- else if (*fieldstr == ',' || isblank (*fieldstr) || *fieldstr == '\0')
+ else if (*fieldstr == ',' || ISBLANK (*fieldstr) || *fieldstr == '\0')
{
/* Ending the string, or this field/byte sublist. */
if (dash_found)
/* Get isblank from GNU libc. */
#define _GNU_SOURCE
-#include <ctype.h>
-#ifndef isblank
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#endif
+
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
-#ifdef isascii
-#define ISDIGIT(c) (isascii ((c)) && isdigit ((c)))
-#else
-#define ISDIGIT(c) (isdigit ((c)))
-#endif
-
/* The number of bytes added at a time to the amount of memory
allocated for the output line. */
#define OUTPUT_BLOCK 256
for (; *stops; stops++)
{
- if (*stops == ',' || isblank (*stops))
+ if (*stops == ',' || ISBLANK (*stops))
{
add_tabstop (tabval);
tabval = -1;
/* Get isblank from GNU libc. */
#define _GNU_SOURCE
-#include <ctype.h>
-#ifndef isblank
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#endif
+
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
for (logical_end = offset_out - 1; logical_end >= 0;
logical_end--)
- if (isblank (line_out[logical_end]))
+ if (ISBLANK (line_out[logical_end]))
break;
if (logical_end >= 0)
{
#include <stdio.h>
#include <getopt.h>
-#include <ctype.h>
#include <sys/types.h>
#include "system.h"
-#ifdef isascii
-#define ISDIGIT(c) (isascii ((c)) && isdigit ((c)))
-#else
-#define ISDIGIT(c) (isdigit ((c)))
-#endif
-
/* Number of lines/chars/blocks to head. */
#define DEFAULT_NUMBER 10
/* Get isblank from GNU libc. */
#define _GNU_SOURCE
-#include <ctype.h>
-#ifndef isblank
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#endif
+
#include <stdio.h>
#include <sys/types.h>
#include <getopt.h>
#include "system.h"
-#ifdef isascii
-#define ISSPACE(c) (isascii(c) && isspace(c))
-#define ISDIGIT(c) (isascii(c) && isdigit(c))
-#else
-#define ISSPACE(c) isspace(c)
-#define ISDIGIT(c) isdigit(c)
-#endif
-
char *xmalloc ();
char *xrealloc ();
void error ();
for (; *str; str++)
{
- if (*str == ',' || isblank (*str))
+ if (*str == ',' || ISBLANK (*str))
{
added += add_field (file, field);
file = field = -1;
#endif /* not __GNUC__ */
#include <stdio.h>
-#include <ctype.h>
#include <assert.h>
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
-#ifdef isascii
-#define ISPRINT(c) (isascii (c) && isprint (c))
-#define ISDIGIT(c) (isascii (c) && isdigit (c))
-#else
-#define ISPRINT(c) isprint (c)
-#define ISDIGIT(c) isdigit (c)
-#endif
-
#if defined(__GNUC__) || defined(STDC_HEADERS)
#include <float.h>
#endif
-w width Set the page width to WIDTH characters. */
\f
+
#include <stdio.h>
#include <getopt.h>
-#include <ctype.h>
#include <sys/types.h>
#include <time.h>
#include "system.h"
-#ifdef isascii
-#define ISPRINT(c) (isascii (c) && isprint (c))
-#define ISDIGIT(c) (isascii (c) && isdigit (c))
-#else
-#define ISPRINT(c) isprint (c)
-#define ISDIGIT(c) isdigit (c)
-#endif
-
char *xmalloc ();
char *xrealloc ();
void error ();
/* Get isblank from GNU libc. */
#define _GNU_SOURCE
-#include <ctype.h>
-#ifndef isblank
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#endif
+
#include <sys/types.h>
#include <signal.h>
#include <stdio.h>
#define UCHAR_LIM (UCHAR_MAX + 1)
#define UCHAR(c) ((unsigned char) (c))
-#ifdef isascii
-#define ISALNUM(c) (isascii(c) && isalnum(c))
-#define ISDIGIT(c) (isascii(c) && isdigit(c))
-#define ISPRINT(c) (isascii(c) && isprint(c))
-#define ISLOWER(c) (isascii(c) && islower(c))
-#else
-#define ISALNUM(c) isalnum(c)
-#define ISDIGIT(c) isdigit(c)
-#define ISPRINT(c) isprint(c)
-#define ISLOWER(c) islower(c)
-#endif
-
/* The kind of blanks for '-b' to skip in various options. */
enum blanktype { bl_start, bl_end, bl_both };
for (i = 0; i < UCHAR_LIM; ++i)
{
- if (isblank (i))
+ if (ISBLANK (i))
blanks[i] = 1;
if (ISDIGIT (i))
digits[i] = 1;
if (!ISPRINT (i))
nonprinting[i] = 1;
- if (!ISALNUM (i) && !isblank (i))
+ if (!ISALNUM (i) && !ISBLANK (i))
nondictionary[i] = 1;
if (ISLOWER (i))
fold_toupper[i] = toupper (i);
#include <stdio.h>
#include <getopt.h>
-#include <ctype.h>
#include <sys/types.h>
#include "system.h"
{
do
{
- if (!isdigit (*str))
+ if (!ISDIGIT (*str))
return 0;
str++;
}
#include <stdio.h>
#include <getopt.h>
-#include <ctype.h>
#include <sys/types.h>
#include <signal.h>
#include "system.h"
-#ifdef isascii
-#define ISDIGIT(c) (isascii ((c)) && isdigit ((c)))
-#else
-#define ISDIGIT(c) (isdigit ((c)))
-#endif
-
/* Number of items to tail. */
#define DEFAULT_NUMBER 10
/* Get isblank from GNU libc. */
#define _GNU_SOURCE
-#include <ctype.h>
-
-#ifndef isascii
-#define isascii(c) 1
-#endif
-
-#ifdef isblank
-#define ISBLANK(c) (isascii (c) isblank (c))
-#else
-#define ISBLANK(c) ((c) == ' ' || (c) == '\t')
-#endif
-#ifdef isgraph
-#define ISGRAPH(c) (isascii (c) isgraph (c))
-#else
-#define ISGRAPH(c) (isascii (c) isprint (c) && !isspace (c))
-#endif
-
-#define ISPRINT(c) (isascii (c) isprint (c))
-#define ISDIGIT(c) (isascii (c) isdigit (c))
-#define ISALNUM(c) (isascii (c) isalnum (c))
-#define ISALPHA(c) (isascii (c) isalpha (c))
-#define ISCNTRL(c) (isascii (c) iscntrl (c))
-#define ISLOWER(c) (isascii (c) islower (c))
-#define ISPUNCT(c) (isascii (c) ispunct (c))
-#define ISSPACE(c) (isascii (c) isspace (c))
-#define ISUPPER(c) (isascii (c) isupper (c))
-#define ISXDIGIT(c) (isascii (c) isxdigit (c))
#include <stdio.h>
#include <assert.h>
/* Get isblank from GNU libc. */
#define _GNU_SOURCE
-#include <ctype.h>
-#ifndef isblank
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#endif
+
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
-#ifdef isascii
-#define ISDIGIT(c) (isascii((c)) && isdigit((c)))
-#else
-#define ISDIGIT(c) (isdigit((c)))
-#endif
-
/* The number of bytes added at a time to the amount of memory
allocated for the output line. */
#define OUTPUT_BLOCK 256
for (; *stops; stops++)
{
- if (*stops == ',' || isblank (*stops))
+ if (*stops == ',' || ISBLANK (*stops))
{
add_tabstop (tabval);
tabval = -1;
\f
/* Get isblank from GNU libc. */
#define _GNU_SOURCE
-#include <ctype.h>
-#ifndef isblank
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#endif
+
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
for (count = 0; count < skip_fields && i < size; count++)
{
- while (i < size && isblank (lp[i]))
+ while (i < size && ISBLANK (lp[i]))
i++;
- while (i < size && !isblank (lp[i]))
+ while (i < size && !ISBLANK (lp[i]))
i++;
}